Evidence.AddAssembly(Object) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
警告
This method is obsolete. Please use AddAssemblyEvidence instead.
警告
Evidence.AddAssembly has been deprecated. Use AddAssemblyEvidence instead.
警告
此 API 現已淘汰。
加入指定的組件辨識項到辨識項集合。
public:
void AddAssembly(System::Object ^ id);
[System.Obsolete("This method is obsolete. Please use AddAssemblyEvidence instead.")]
public void AddAssembly (object id);
[System.Obsolete("Evidence.AddAssembly has been deprecated. Use AddAssemblyEvidence instead.")]
public void AddAssembly (object id);
public void AddAssembly (object id);
[System.Obsolete]
public void AddAssembly (object id);
[<System.Obsolete("This method is obsolete. Please use AddAssemblyEvidence instead.")>]
member this.AddAssembly : obj -> unit
[<System.Obsolete("Evidence.AddAssembly has been deprecated. Use AddAssemblyEvidence instead.")>]
member this.AddAssembly : obj -> unit
member this.AddAssembly : obj -> unit
[<System.Obsolete>]
member this.AddAssembly : obj -> unit
Public Sub AddAssembly (id As Object)
參數
- id
- Object
任何辨識項物件。
- 屬性
例外狀況
id
為 null。
id
不可序列化。
範例
下列程式代碼範例顯示 方法的使用 AddAssembly 方式。 此範例是針對 類別提供的較大範例的 Evidence 一部分。
Console::WriteLine( "Adding assembly evidence." );
myEvidence->AddAssembly( "SN01" );
myEvidence->AddAssembly( gcnew Version( "0.0.0.0" ) );
myEvidence->AddAssembly( mSN );
Console::WriteLine( "Count of evidence items = {0}", myEvidence->Count );
Console.WriteLine("Adding assembly evidence.");
myEvidence.AddAssembly("SN01");
myEvidence.AddAssembly(new Version("0.0.0.0"));
myEvidence.AddAssembly(mSN);
Console.WriteLine("Count of evidence items = " + myEvidence.Count.ToString());
Console.WriteLine("Adding assembly evidence.")
myEvidence.AddAssembly("SN01")
myEvidence.AddAssembly(New Version("0.0.0.0"))
myEvidence.AddAssembly(mSN)
Console.WriteLine(("Count of evidence items = " & myEvidence.Count.ToString()))
備註
針對衍生自元件的辨識項,請使用這個方法。
注意
這個方法不會執行檢查,以防止新增重複的辨識項類型。 許多元件辨識項物件可以同時存在。