Evidence Evidence Evidence Evidence Constructors

定義

オーバーロード

Evidence() Evidence() Evidence()

Evidence クラスの新しい空のインスタンスを初期化します。Initializes a new empty instance of the Evidence class.

Evidence(Evidence) Evidence(Evidence) Evidence(Evidence)

既存のインスタンスの簡易コピーから Evidence クラスの新しいインスタンスを初期化します。Initializes a new instance of the Evidence class from a shallow copy of an existing one.

Evidence(Object[], Object[]) Evidence(Object[], Object[]) Evidence(Object[], Object[]) Evidence(Object[], Object[])

ホストが提供する証拠とアセンブリが提供する証拠から成る複数の証拠セットから Evidence クラスの新しいインスタンスを初期化します。Initializes a new instance of the Evidence class from multiple sets of host and assembly evidence.

Evidence(EvidenceBase[], EvidenceBase[]) Evidence(EvidenceBase[], EvidenceBase[]) Evidence(EvidenceBase[], EvidenceBase[]) Evidence(EvidenceBase[], EvidenceBase[])

ホストが提供する証拠とアセンブリが提供する証拠から成る複数の証拠セットから Evidence クラスの新しいインスタンスを初期化します。Initializes a new instance of the Evidence class from multiple sets of host and assembly evidence.

Evidence() Evidence() Evidence()

Evidence クラスの新しい空のインスタンスを初期化します。Initializes a new empty instance of the Evidence class.

public:
 Evidence();
public Evidence ();
Public Sub New ()

次のコード例の使用を示しています、Evidence()コンス トラクター。The following code example shows the use of the Evidence() constructor. この例が示されている例の一部、Evidenceクラス。This example is part of a larger example provided for the Evidence class.

Evidence^ ev1 = gcnew Evidence;
Console::WriteLine( "Created empty evidence with the default constructor." );

Evidence ev1 = new Evidence();
Console.WriteLine("Created empty evidence with the default constructor.");
Dim ev1 As New Evidence
Console.WriteLine("Created empty evidence with the default constructor.")

Evidence(Evidence) Evidence(Evidence) Evidence(Evidence)

既存のインスタンスの簡易コピーから Evidence クラスの新しいインスタンスを初期化します。Initializes a new instance of the Evidence class from a shallow copy of an existing one.

public:
 Evidence(System::Security::Policy::Evidence ^ evidence);
public Evidence (System.Security.Policy.Evidence evidence);
new System.Security.Policy.Evidence : System.Security.Policy.Evidence -> System.Security.Policy.Evidence

パラメーター

evidence
Evidence Evidence Evidence Evidence

新しいインスタンスの作成元の Evidence インスタンス。The Evidence instance from which to create the new instance. このインスタンスは詳細コピーされません。This instance is not deep-copied.

例外

evidence パラメーターが、Evidence の有効なインスタンスではありません。The evidence parameter is not a valid instance of Evidence.

次のコード例の使用を示しています、Evidence(Evidence)コンス トラクター。The following code example shows the use of the Evidence(Evidence) constructor. この例が示されている例の一部、Evidenceクラス。This example is part of a larger example provided for the Evidence class.

Console::WriteLine( "\nMake a copy of the current evidence." );
Evidence^ evidenceCopy = gcnew Evidence( myEvidence );
Console::WriteLine( "Count of new evidence items = {0}", evidenceCopy->Count );
Console::WriteLine( "Does the copy equal the current evidence? {0}", myEvidence->Equals( evidenceCopy ) );
Console.WriteLine("\nMake a copy of the current evidence.");
Evidence evidenceCopy = new Evidence(myEvidence);
Console.WriteLine("Count of new evidence items = " + evidenceCopy.Count);
Console.WriteLine("Does the copy equal the current evidence? " + myEvidence.Equals(evidenceCopy));
Console.WriteLine(ControlChars.Lf & "Make a copy of the current evidence.")
Dim evidenceCopy As New Evidence(myEvidence)
Console.WriteLine(("Count of new evidence items = " & evidenceCopy.Count.ToString()))
Console.WriteLine(("Does the copy equal the current evidence? " & myEvidence.Equals(evidenceCopy)))

Evidence(Object[], Object[]) Evidence(Object[], Object[]) Evidence(Object[], Object[]) Evidence(Object[], Object[])

警告

この API は現在使われていません。

ホストが提供する証拠とアセンブリが提供する証拠から成る複数の証拠セットから Evidence クラスの新しいインスタンスを初期化します。Initializes a new instance of the Evidence class from multiple sets of host and assembly evidence.

public:
 Evidence(cli::array <System::Object ^> ^ hostEvidence, cli::array <System::Object ^> ^ assemblyEvidence);
[System.Obsolete]
[System.Obsolete("This constructor is obsolete. Please use the constructor which takes arrays of EvidenceBase instead.")]
public Evidence (object[] hostEvidence, object[] assemblyEvidence);
new System.Security.Policy.Evidence : obj[] * obj[] -> System.Security.Policy.Evidence
Public Sub New (hostEvidence As Object(), assemblyEvidence As Object())

パラメーター

hostEvidence
Object[]

新しいインスタンスの作成元となる、ホストが提供する証拠。The host evidence from which to create the new instance.

assemblyEvidence
Object[]

新しいインスタンスの作成元となる、アセンブリが提供する証拠。The assembly evidence from which to create the new instance.

次のコード例の使用を示しています、Evidence(Object[], Object[])コンス トラクター。The following code example shows the use of the Evidence(Object[], Object[]) constructor. この例が示されている例の一部、Evidenceクラス。This example is part of a larger example provided for the Evidence class.

array<Object^>^oa1 = {};
Site^ site = gcnew Site( "www.wideworldimporters.com" );
array<Object^>^oa2 = {url,site};
Evidence^ ev3a = gcnew Evidence( oa1,oa2 );
enum1 = ev3a->GetHostEnumerator();
IEnumerator^ enum2 = ev3a->GetAssemblyEnumerator();
enum2->MoveNext();
Object^ obj1 = enum2->Current;
enum2->MoveNext();
Console::WriteLine( "URL = {0}  Site = {1}", obj1, enum2->Current );

Object [] oa1 = {};
Site site = new Site("www.wideworldimporters.com");
Object [] oa2 = { url, site };
Evidence ev3a = new Evidence(oa1, oa2);
enum1 = ev3a.GetHostEnumerator();
IEnumerator enum2 = ev3a.GetAssemblyEnumerator();
enum2.MoveNext();
Object obj1 = enum2.Current;
enum2.MoveNext();
Console.WriteLine("URL = " + obj1.ToString() + "  Site = " + enum2.Current.ToString());
Dim oa1() As [Object]
Dim site As New Site("www.wideworldimporters.com")
Dim oa2 As [Object]() = {url, site}
Dim ev3a As New Evidence(oa1, oa2)
enum1 = ev3a.GetHostEnumerator()
Dim enum2 As IEnumerator = ev3a.GetAssemblyEnumerator()
enum2.MoveNext()
Dim obj1 As [Object] = enum2.Current
enum2.MoveNext()
Console.WriteLine(("URL = " & obj1.ToString() & "  Site = " & enum2.Current.ToString()))

Evidence(EvidenceBase[], EvidenceBase[]) Evidence(EvidenceBase[], EvidenceBase[]) Evidence(EvidenceBase[], EvidenceBase[]) Evidence(EvidenceBase[], EvidenceBase[])

ホストが提供する証拠とアセンブリが提供する証拠から成る複数の証拠セットから Evidence クラスの新しいインスタンスを初期化します。Initializes a new instance of the Evidence class from multiple sets of host and assembly evidence.

public:
 Evidence(cli::array <System::Security::Policy::EvidenceBase ^> ^ hostEvidence, cli::array <System::Security::Policy::EvidenceBase ^> ^ assemblyEvidence);
public Evidence (System.Security.Policy.EvidenceBase[] hostEvidence, System.Security.Policy.EvidenceBase[] assemblyEvidence);
new System.Security.Policy.Evidence : System.Security.Policy.EvidenceBase[] * System.Security.Policy.EvidenceBase[] -> System.Security.Policy.Evidence
Public Sub New (hostEvidence As EvidenceBase(), assemblyEvidence As EvidenceBase())

パラメーター

hostEvidence
EvidenceBase[]

新しいインスタンスの作成元となる、ホストが提供する証拠。The host evidence from which to create the new instance.

assemblyEvidence
EvidenceBase[]

新しいインスタンスの作成元となる、アセンブリが提供する証拠。The assembly evidence from which to create the new instance.

注釈

このコンス トラクターを継承する証拠オブジェクトを使用して、クラスの新しいインスタンスを作成する、EvidenceBaseクラス。This constructor creates a new instance of the class by using evidence objects that inherit from the EvidenceBase class.

適用対象