Share via


ILayerContainer.Comments Property

Get the comments that are contained in this element (not the comments that are linked to it).

Namespace:  Microsoft.VisualStudio.ArchitectureTools.Extensibility.Layer
Assembly:  Microsoft.VisualStudio.ArchitectureTools.Extensibility.Layer (in Microsoft.VisualStudio.ArchitectureTools.Extensibility.Layer.dll)

Syntax

'Declaration
ReadOnly Property Comments As IEnumerable(Of ILayerComment)
IEnumerable<ILayerComment> Comments { get; }
property IEnumerable<ILayerComment^>^ Comments {
    IEnumerable<ILayerComment^>^ get ();
}
abstract Comments : IEnumerable<ILayerComment> with get
function get Comments () : IEnumerable<ILayerComment>

Property Value

Type: IEnumerable<ILayerComment>

Remarks

This property gets the comments contained within the container - not those that are linked to it.

To obtain the comments that are attached to a layer element, use:

ILayerModel model = diagram.GetLayerModel(); 
IEnumerable<ILayerComment> comments = model.Comments 
.Where(comment => comment.Links.Any(link => link.Target == layerElement));

.NET Framework Security

See Also

Reference

ILayerContainer Interface

Microsoft.VisualStudio.ArchitectureTools.Extensibility.Layer Namespace

CreateComment