CompartmentShape.GetCompartmentDescriptions 方法
取得區間裝飾的描述。
命名空間: Microsoft.VisualStudio.Modeling.Diagrams
組件: Microsoft.VisualStudio.Modeling.Sdk.Diagrams.11.0 (在 Microsoft.VisualStudio.Modeling.Sdk.Diagrams.11.0.dll 中)
語法
'宣告
Public Overridable Function GetCompartmentDescriptions As CompartmentDescription()
public virtual CompartmentDescription[] GetCompartmentDescriptions()
傳回值
型別:array<Microsoft.VisualStudio.Modeling.Diagrams.CompartmentDescription[]
區間裝飾的說明。
範例
public override DslDiagrams::CompartmentDescription[] GetCompartmentDescriptions()
{
if(compartmentDescriptions == null)
{
// Initialize the array of compartment descriptions if we haven't done so already.
// First we get any compartment descriptions in base shapes, and add on any compartments
// that are defined on this shape.
DslDiagrams::CompartmentDescription[] baseCompartmentDescriptions = base.GetCompartmentDescriptions();
int localCompartmentsOffset = 0;
if(baseCompartmentDescriptions!=null)
{
localCompartmentsOffset = baseCompartmentDescriptions.Length;
}
compartmentDescriptions = new DslDiagrams::ElementListCompartmentDescription[1+localCompartmentsOffset];
if(baseCompartmentDescriptions!=null)
{
baseCompartmentDescriptions.CopyTo(compartmentDescriptions, 0);
}
{
string title = global::Microsoft.Example.ClassDiagrams.ClassDiagrams.SingletonResourceManager.GetString("InterfaceShapeOperationsCompartmentTitle");
compartmentDescriptions[localCompartmentsOffset+0] = new DslDiagrams::ElementListCompartmentDescription("OperationsCompartment", title,
global::System.Drawing.Color.FromKnownColor(global::System.Drawing.KnownColor.LightGray), false,
global::System.Drawing.Color.FromKnownColor(global::System.Drawing.KnownColor.White), false,
null, null,
false);
}
}
return InterfaceShape.compartmentDescriptions;
}
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。