Właściwość IComment.AnnotatedElements —
Pobiera elementy, do których dołączono komentarz.
Przestrzeń nazw: Microsoft.VisualStudio.Uml.Classes
Zestaw: Microsoft.VisualStudio.Uml.Interfaces (w Microsoft.VisualStudio.Uml.Interfaces.dll)
Składnia
'Deklaracja
ReadOnly Property AnnotatedElements As IList(Of IElement)
IList<IElement> AnnotatedElements { get; }
property IList<IElement^>^ AnnotatedElements {
IList<IElement^>^ get ();
}
abstract AnnotatedElements : IList<IElement>
function get AnnotatedElements () : IList<IElement>
Wartość właściwości
Typ: System.Collections.Generic.IList<IElement>
Uwagi
Aby uzyskać komentarze, które są połączone z danego elementu, należy użyć:
IEnumerable
<IComment> comments = store.AllInstances<IComment>()
.Where(eachComment => eachComment.AnnotatedElements.Contains(element));
Zabezpieczenia programu .NET Framework
- Pełne zaufanie do bezpośredniego wywołującego. Tego elementu członkowskiego nie można używać w kodzie częściowo zaufanym. Aby uzyskać więcej informacji, zobacz Przy użyciu bibliotek z częściowo zaufanego kodu..