IClass 介面

對於可以回應訊息和事件、保存值,以及變更狀態之物件的描述或部份描述。

命名空間:  Microsoft.VisualStudio.Uml.Classes
組件:  Microsoft.VisualStudio.Uml.Interfaces (在 Microsoft.VisualStudio.Uml.Interfaces.dll 中)

語法

'宣告
Public Interface IClass _
    Inherits IBehavioredClassifier, IEncapsulatedClassifier, IStructuredClassifier, IClassifier,  _
    IType, IPackageableElement, IParameterableElement, INamespace, IRedefinableElement,  _
    INamedElement, ITemplateableElement, IElement
public interface IClass : IBehavioredClassifier, IEncapsulatedClassifier, 
    IStructuredClassifier, IClassifier, IType, IPackageableElement, IParameterableElement, 
    INamespace, IRedefinableElement, INamedElement, ITemplateableElement, IElement
public interface class IClass : IBehavioredClassifier, 
    IEncapsulatedClassifier, IStructuredClassifier, IClassifier, IType, IPackageableElement, 
    IParameterableElement, INamespace, IRedefinableElement, INamedElement, ITemplateableElement, 
    IElement
type IClass =  
    interface
        interface IBehavioredClassifier
        interface IEncapsulatedClassifier
        interface IStructuredClassifier
        interface IClassifier
        interface IType
        interface IPackageableElement
        interface IParameterableElement
        interface INamespace
        interface IRedefinableElement
        interface INamedElement
        interface ITemplateableElement
        interface IElement
    end
public interface IClass extends IBehavioredClassifier, IEncapsulatedClassifier, IStructuredClassifier, IClassifier, IType, IPackageableElement, IParameterableElement, INamespace, IRedefinableElement, INamedElement, ITemplateableElement, IElement

IClass 型別會公開下列成員。

屬性

  名稱 說明
公用屬性 ApplicableStereotypes 可套用至此項目的一組造型。 (繼承自 IElement)。
公用屬性 AppliedStereotypes 每個 IStereotypeInstance 都表示已將造型套用至此元素。 (繼承自 IElement)。
公用屬性 ClientDependencies 取得此元素為用戶端的相依性關聯性。 (繼承自 INamedElement)。
公用屬性 Description 這個項目的描述。 (繼承自 IElement)。
公用屬性 Features 取得與此類別之每個成員相關聯的屬性、操作和接收。Namespace::Member 的子集。 (繼承自 IClassifier)。
公用屬性 Generalizations 取得透過此分類器繼承功能的一般化關聯性。 (繼承自 IClassifier)。
公用屬性 Generals 取得此分類器繼承其成員的來源分類器。 (繼承自 IClassifier)。
公用屬性 InheritedMembers 取得被繼承的成員子集。 (繼承自 IClassifier)。
公用屬性 InterfaceRealizations 取得此行為實現的介面。 (繼承自 IBehavioredClassifier)。
公用屬性 IsAbstract 如果這是要在特製化類別中擴充或覆寫的部分描述,則為 true。 (繼承自 IClassifier)。
公用屬性 IsActiveClass 如果這個類別的每個執行個體都與控制項的執行緒相關聯,則為 true。
公用屬性 IsLeaf 如果不應特製化這個項目,則為 true。也就是說,它不應是一般化關聯性的目標。 (繼承自 IRedefinableElement)。
公用屬性 IsTemplate 如果這個類別是可繫結至參數的範本,則為 true。 (繼承自 IClassifier)。
公用屬性 Members 取得屬於此命名空間的元素。 (繼承自 INamespace)。
公用屬性 Name 此項目在包含它的命名空間內的名稱。在此命名空間中,應沒有其他有此名稱的元素。 (繼承自 INamedElement)。
公用屬性 Namespace 取得定義這個元素所在的命名空間。可能是 Null。 (繼承自 INamedElement)。
公用屬性 NestedClassifiers 取得此類別中所定義類別的清單。
公用屬性 OwnedAttributes 取得此類別中所定義屬性的清單。
公用屬性 OwnedBehaviors 取得在此分類器的範圍內定義的行為。 (繼承自 IBehavioredClassifier)。
公用屬性 OwnedComments 取得此元素中包含的註解 (非連結到它的註解)。 (繼承自 IElement)。
公用屬性 OwnedConnectors 取得分類器擁有的連接器,例如元件中的組譯碼和委派連接器。 (繼承自 IStructuredClassifier)。
公用屬性 OwnedElements 取得此元素所擁有的元素。每個元素都有一個擁有者,除了根 IModel 以外。 (繼承自 IElement)。
公用屬性 OwnedMembers 取得在此命名空間中定義的元素。 (繼承自 INamespace)。
公用屬性 OwnedOperations 取得此類別中所定義操作的清單。
公用屬性 OwnedPorts 取得此型別的執行個體透過其與其他執行個體互動的連接埠。 (繼承自 IEncapsulatedClassifier)。
公用屬性 OwnedRedefinableTemplateSignature (繼承自 IClassifier)。
公用屬性 Owner 取得擁有這個項目的項目。除了根 IModel 以外的每個元素都有一個擁有者。 (繼承自 IElement)。
公用屬性 OwningPackage 取得包含此項目的套件。 (繼承自 IPackageableElement)。
公用屬性 OwningTemplateParameter 如果不為空,會在範本中將此元素定義為參數。 (繼承自 IParameterableElement)。
公用屬性 Package 取得型別所屬的套件。 (繼承自 IType)。
公用屬性 PackageImports 取得此命名空間所匯入的套件。 (繼承自 INamespace)。
公用屬性 Parts 取得組成此分類器的屬性。 (繼承自 IStructuredClassifier)。
公用屬性 QualifiedName 取得此項目的名稱,在前面加上包含此項目之命名空間的完整名稱。如果名稱為空或命名空間的限定名稱為空,則為空。 (繼承自 INamedElement)。
公用屬性 SuperClasses 取得此類別繼承功能的來源類別。
公用屬性 TemplateBindings 取得使用此元素的綁定。 (繼承自 ITemplateableElement)。
公用屬性 TemplateParameter 如果不為空,會在範本中將此元素定義為參數。 (繼承自 IParameterableElement)。
公用屬性 TypedElements 取得受約束包含此型別的值的型別項目。 (繼承自 IType)。
公用屬性 UseCases 取得以此分類器為主旨的使用案例。 (繼承自 IClassifier)。
公用屬性 Visibility 定義可以參考元素的位置。Public = 在任何位置都是可見的;private = 只在主控命名空間是可見的;protected = 對具有主控命名空間之一般化關聯性的項目為可見的; package = 在主控命名空間的封裝中是可見的 (如果有的話)。預設值 = public。 (繼承自 INamedElement)。
公用屬性 VisibleAppliedStereotypes (繼承自 IElement)。

回頁首

擴充方法

  名稱 說明
公用擴充方法 AddReference 將字串連結到元素,通常該字串是像 URI、modelbus 參考或工作項目 ID 之類的參考。使用名稱來顯示參考的型別。傳回表示連結的 IReference 物件。 (以 UmlExtensions 定義。)
公用擴充方法 ApplyStereotype 將造型套用於元素。建立以造型代表模型項目擴充的 IStereotypeInstance。 (以 ProfileStereotypeExtensions 定義。)
公用擴充方法 CreateAttribute 在 Class 中建立新的 IProperty 物件 (以 ClassExtensions 定義。)
公用擴充方法 CreateConnector 將來源項目連接到目標項目 (例如,組件或連接埠)。如果來源或目標未於組件,則同時指定。 (以 ConnectableElementExtensions 定義。)
公用擴充方法 CreateGeneralization 建立這個分類器的新的一般化。在這個和另一個指定的分類器之間建立的 IGeneralization 關聯性。 (以 ClassifierExtensions 定義。)
公用擴充方法 CreateInteraction 在 BehavioredClassifier 中建立新的 IInteraction 物件 (以 BehavioredClassifierExtensions 定義。)
公用擴充方法 CreateNestedActivity 建立活動,描述此項目的行為。 (以 BehavioredClassifierExtensions 定義。)
公用擴充方法 CreateOperation 在 Class 中建立新的 IOperation 物件 (以 ClassExtensions 定義。)
公用擴充方法 CreatePackageImport 將套件匯入命名空間中。建立套件的 IPackageImport 連結。 (以 NamespaceExtensions 定義。)
公用擴充方法 CreatePart() 多載。 使用未指定的型別,建立新的組件。 (以 StructuredClassifierExtensions 定義。)
公用擴充方法 CreatePart(IComponent) 多載。 使用指定的型別或新的型別,建立新的組件。指定 null 類型以建立新的元件作為部件的類型。 (以 StructuredClassifierExtensions 定義。)
公用擴充方法 CreateTemplateBinding 將指定的分類器繫結到指定的範本分類器。如果需要,請使用 CreateSubstitution 新增參數替換。 (以 TemplateBindingExtensions 定義。)
公用擴充方法 CreateTemplateParameter(IParameterableElement) 多載。 建立參考指定 parameteredElement 的範本參數。 (以 TemplateBindingExtensions 定義。)
公用擴充方法 CreateTemplateParameter(TemplateParameterKind, String) 多載。 以指定的名稱建立範本參數。 (以 TemplateBindingExtensions 定義。)
公用擴充方法 CreateTemplateSignature 在指定的分類器建立範本簽章。 (以 TemplateBindingExtensions 定義。)
公用擴充方法 Delete 刪除此項目和任何關聯性、擁有的元素,以及圖形。 (以 UmlExtensions 定義。)
公用擴充方法 DeleteAllReference 移除指定標籤的所有參考。 (以 UmlExtensions 定義。)
公用擴充方法 FindTemplateParameter 按名稱尋找範本參數。 (以 TemplateBindingExtensions 定義。)
公用擴充方法 GetDependencyClients 傳回依賴這個的項目的集合。 (以 NamedElementExtensions 定義。)
公用擴充方法 GetDependencySuppliers 傳回這個所依賴的項目的集合。 (以 NamedElementExtensions 定義。)
公用擴充方法 GetId 取得可識別此元素的 GUID。 (以 UmlExtensions 定義。)
公用擴充方法 GetImportedPackages 命名空間的匯入封裝。 (以 PackageExtensions 定義。)
公用擴充方法 GetModelStore 取得包含此元素的 IModelStore。 (以 UmlExtensions 定義。)
公用擴充方法 GetOutgoingAssociationEnds 連結至此分類器之關聯的另一端。從關聯端,您可以取得連結的分類器及其型別。 (以 ClassifierExtensions 定義。)
公用擴充方法 GetRealizedInterfaces 傳回指定的分類器所實作的 IInterfaces 集合。 (以 BehavioredClassifierExtensions 定義。)
公用擴充方法 GetReferences 取得予此元素相關聯之指定標記的 IReferences。 (以 UmlExtensions 定義。)
公用擴充方法 GetRelatedElements<T> 取得與此元素具有指定類型關聯性的元素。 (以 UmlExtensions 定義。)
公用擴充方法 GetRelatedLinks<T> 取得此項目與指定型別的關聯性。 (以 UmlExtensions 定義。)
公用擴充方法 GetSpecifics 傳回特製化此分類器的所有分類器。 (以 ClassifierExtensions 定義。)
公用擴充方法 SetOwner 變更擁有者。 (以 SetOwnerExtensions 定義。)
公用擴充方法 Shapes 所有圖形,在任何開啟中的圖表或指定的開啟圖表顯示模型項目。 (以 PresentationHelpers 定義。)

回頁首

備註

注意事項注意事項

這個型別中定義的方法是擴充方法。若要使用方法,您必須將專案參考加入至 .NET 組件 Microsoft.VisualStudio.ArchitectureTools.Extensibility.dll,而且必須將指示詞 using Microsoft.VisualStudio.ArchitectureTools.Extensibility.Uml; 包含在程式碼中。

請參閱

參考

Microsoft.VisualStudio.Uml.Classes 命名空間