注释元素。 注释可包含在层模型或层中,也可以链接到任何数量的层。
命名空间:  Microsoft.VisualStudio.ArchitectureTools.Extensibility.Layer
程序集:  Microsoft.VisualStudio.ArchitectureTools.Extensibility.Layer(在 Microsoft.VisualStudio.ArchitectureTools.Extensibility.Layer.dll 中)
语法
声明
Public Interface ILayerComment _
    Inherits ILayerElement
public interface ILayerComment : ILayerElement
public interface class ILayerComment : ILayerElement
type ILayerComment =  
    interface
        interface ILayerElement
    end
public interface ILayerComment extends ILayerElement
ILayerComment 类型公开以下成员。
属性
| 名称 | 说明 | |
|---|---|---|
![]()  | 
Body | 获取/设置注释文本。 | 
![]()  | 
Description | 获取/设置说明。 (继承自 ILayerElement。) | 
![]()  | 
Id | 获取此元素的唯一标识符。 (继承自 ILayerElement。) | 
![]()  | 
IsDeleted | 检查是否已删除该元素。 (继承自 ILayerElement。) | 
![]()  | 
Links | 获取链接到此注释的元素。 | 
![]()  | 
Name | 获取/设置唯一的名称。 (继承自 ILayerElement。) | 
![]()  | 
Parent | 获取父容器,ILayer 或者是 ILayerModel。 | 
![]()  | 
Properties | 获取可以用来存储任何数据与每个 ILayerElement 的字符串字典。 (继承自 ILayerElement。) | 
页首
扩展方法
| 名称 | 说明 | |
|---|---|---|
![]()  | 
CreateCommentLink(ILayer) | 已重载。 将此注释链接到层。 (由 Extensions 定义。) | 
![]()  | 
CreateCommentLink(ILayerComment) | 已重载。 将此层链接到注释。 (由 Extensions 定义。) | 
![]()  | 
Delete | 删除元素。 (由 Extensions 定义。) | 
![]()  | 
GetShape | 获取表示该层元素的形状。 (由 Extensions 定义。) | 
页首
备注
要获取附加到层元素的注释,请使用:
ILayerModel model = diagram.GetLayerModel(); 
IEnumerable<ILayerComment> comments = model.Comments
  .Where(comment => comment.Links
     .Any(link => link.Target == layerElement));
请注意,ILayerElement 的 Comments 属性可获取包含在 ILayerElement 内而不是链接到它的注释。
请参见
参考
Microsoft.VisualStudio.ArchitectureTools.Extensibility.Layer 命名空间
CreateComment()
.gif)
.gif)