Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Comment element. A comment can be contained in a layer model or in a layer, and can also be linked to any number of layers.
Namespace:   Microsoft.VisualStudio.ArchitectureTools.Extensibility.Layer
Assembly:  Microsoft.VisualStudio.ArchitectureTools.Extensibility.Layer (in Microsoft.VisualStudio.ArchitectureTools.Extensibility.Layer.dll)
Syntax
public interface ILayerComment : ILayerElement
public interface class ILayerComment : ILayerElement
type ILayerComment = 
    interface
        interface ILayerElement
    end
Public Interface ILayerComment
    Inherits ILayerElement
Properties
| Name | Description | |
|---|---|---|
| .jpeg) | Body | Get/set the comment text. | 
| .jpeg) | Description | Get/set the description.(Inherited from ILayerElement.) | 
| .jpeg) | Id | Gets the unique identifier of this element.(Inherited from ILayerElement.) | 
| .jpeg) | IsDeleted | Check whether this element has been deleted.(Inherited from ILayerElement.) | 
| .jpeg) | Links | Gets the elements linked to this comment. | 
| .jpeg) | Name | Get/set the unique name.(Inherited from ILayerElement.) | 
| .jpeg) | Parent | Get the parent container, either an ILayer or an ILayerModel. | 
| .jpeg) | Properties | Gets a string dictionary that you can use to store arbitrary data with each ILayerElement.(Inherited from ILayerElement.) | 
Extension Methods
| Name | Description | |
|---|---|---|
| .gif) | CreateCommentLink(ILayer) | Overloaded. Link this comment to a layer.(Defined by Extensions.) | 
| .gif) | CreateCommentLink(ILayerComment) | Overloaded. Link this layer to a comment.(Defined by Extensions.) | 
| .gif) | Delete() | Overloaded. Delete the element.(Defined by Extensions.) | 
| .gif) | GetShape() | Get the shape that presents this layer element.(Defined by Extensions.) | 
Remarks
To obtain the comments attached to a layer element, use:
ILayerModel model = diagram.GetLayerModel(); 
IEnumerable<ILayerComment> comments = model.Comments
  .Where(comment => comment.Links
     .Any(link => link.Target == layerElement));
Notice that the Comments property of an ILayerElement gets comments that are contained within the ILayerElement - not comments that are linked to it.
See Also
CreateComment
Microsoft.VisualStudio.ArchitectureTools.Extensibility.Layer Namespace
Return to top