Evidence.AddAssembly(Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Caution
This method is obsolete. Please use AddAssemblyEvidence instead.
Caution
Evidence.AddAssembly has been deprecated. Use AddAssemblyEvidence instead.
Caution
This API is now deprecated.
Adds the specified assembly evidence to the evidence set.
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)
Parameters
- id
- Object
Any evidence object.
- Attributes
Exceptions
id
is null.
id
is not serializable.
Examples
The following code example shows the use of the AddAssembly method. This example is part of a larger example provided for the Evidence class.
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()))
Remarks
Use this method for evidence derived from the assembly.
Note
This method does not perform a check to prevent adding duplicate types of evidence. Many assembly evidence objects can exist at the same time.