Evidence Klasa

Definicja

Definiuje zestaw informacji, które stanowią dane wejściowe dla decyzji dotyczących zasad zabezpieczeń. Klasa ta nie może być dziedziczona.

public ref class Evidence sealed : System::Collections::ICollection
public sealed class Evidence : System.Collections.ICollection
[System.Serializable]
public sealed class Evidence : System.Collections.ICollection
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class Evidence : System.Collections.ICollection
type Evidence = class
    interface ICollection
    interface IEnumerable
[<System.Serializable>]
type Evidence = class
    interface ICollection
    interface IEnumerable
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type Evidence = class
    interface ICollection
    interface IEnumerable
Public NotInheritable Class Evidence
Implements ICollection
Dziedziczenie
Evidence
Atrybuty
Implementuje

Przykłady

W poniższym przykładzie kodu pokazano, jak utworzyć nowe Evidence klasy z dowodami hosta i dowodami zestawów.

using namespace System;
using namespace System::Collections;
using namespace System::Security;
using namespace System::Security::Policy;
using namespace System::Security::Permissions;
using namespace System::Globalization;
public ref class Evidence_Example
{
public:
   bool CreateEvidence()
   {
      bool retVal = true;
      try
      {
         // Create empty evidence using the default contructor.
         Evidence^ ev1 = gcnew Evidence;
         Console::WriteLine( "Created empty evidence with the default constructor." );

         // Constructor used to create null host evidence.
         Evidence^ ev2a = gcnew Evidence( nullptr );
         Console::WriteLine( "Created an Evidence object with null host evidence." );

         // Constructor used to create host evidence.
         Url^ url = gcnew Url( "http://www.treyresearch.com" );
         Console::WriteLine( "Adding host evidence {0}", url );
         ev2a->AddHost( url );
         Evidence^ ev2b = gcnew Evidence( ev2a );
         Console::WriteLine( "Copy evidence into new evidence" );
         IEnumerator^ enum1 = ev2b->GetHostEnumerator();
         enum1->MoveNext();
         Console::WriteLine( enum1->Current );

         // Constructor used to create both host and assembly evidence.
         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 );
         
         // Constructor used to create null host and null assembly evidence.
         Evidence^ ev3b = gcnew Evidence( (array<Object^>^)nullptr, (array<Object^>^)nullptr );
         Console::WriteLine( "Create new evidence with null host and assembly evidence" );
      }
      catch ( Exception^ e )
      {
         Console::WriteLine( "Fatal error: {0}", e );
         return false;
      }

      return retVal;
   }

   Evidence^ DemonstrateEvidenceMembers()
   {
      Evidence^ myEvidence = gcnew Evidence;
      String^ sPubKeyBlob = "00240000048000009400000006020000"
      "00240000525341310004000001000100"
      "19390E945A40FB5730204A25FA5DC4DA"
      "B18688B412CB0EDB87A6EFC50E2796C9"
      "B41AD3040A7E46E4A02516C598678636"
      "44A0F74C39B7AB9C38C01F10AF4A5752"
      "BFBCDF7E6DD826676AD031E7BCE63393"
      "495BAD2CA4BE03B529A73C95E5B06BE7"
      "35CA0F622C63E8F54171BD73E4C8F193"
      "CB2664163719CA41F8159B8AC88F8CD3";
      array<Byte>^pubkey = HexsToArray( sPubKeyBlob );

      // Create a strong name.
      StrongName^ mSN = gcnew StrongName( gcnew StrongNamePublicKeyBlob( pubkey ),"SN01",gcnew Version( "0.0.0.0" ) );

      // Create assembly and host 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 );

      Url^ url = gcnew Url( "http://www.treyresearch.com" );
      Console::WriteLine( "Adding host evidence {0}", url );
      myEvidence->AddHost( url );
      PrintEvidence( myEvidence ).ToString();
      Console::WriteLine( "Count of evidence items = {0}", myEvidence->Count );

      Console::WriteLine( "\nCopy the evidence to an array using CopyTo, then display the array." );
      array<Object^>^evidenceArray = gcnew array<Object^>(myEvidence->Count);
      myEvidence->CopyTo( evidenceArray, 0 );
      for each (Object^ obj in evidenceArray)
      {
         Console::WriteLine(obj->ToString());
      }

      Console::WriteLine( "\nDisplay the contents of the properties." );
      Console::WriteLine( "Locked is the only property normally used by code." );
      Console::WriteLine( "IsReadOnly, IsSynchronized, and SyncRoot properties are not normally used." );
      
      Console::WriteLine( "\nThe default value for the Locked property = {0}", myEvidence->Locked );

      Console::WriteLine( "\nGet the hashcode for the evidence." );
      Console::WriteLine( "HashCode = {0}", myEvidence->GetHashCode() );

      Console::WriteLine( "\nGet the type for the evidence." );
      Console::WriteLine( "Type = {0}", myEvidence->GetType() );

      Console::WriteLine( "\nMerge new evidence with the current evidence." );
      array<Object^>^oa1 = {};
      Site^ site = gcnew Site( "www.wideworldimporters.com" );
      array<Object^>^oa2 = {url,site};
      Evidence^ newEvidence = gcnew Evidence( oa1,oa2 );
      myEvidence->Merge( newEvidence );
      Console::WriteLine( "Evidence count = {0}", PrintEvidence( myEvidence ) );

      Console::WriteLine( "\nRemove URL evidence." );
      myEvidence->RemoveType( url->GetType() );
      Console::WriteLine( "Evidence count is now: {0}", myEvidence->Count );

      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( "\nClear the current evidence." );
      myEvidence->Clear();
      Console::WriteLine( "Count is now {0}", myEvidence->Count );

      return myEvidence;
   }

   static int PrintEvidence( Evidence^ myEvidence )
   {
      int p = 0;
      Console::WriteLine( "\nCurrent evidence = " );
      if ( nullptr == myEvidence )
            return 0;

      IEnumerator^ list = myEvidence->GetEnumerator();
      IEnumerator^ myEnum1 = list;
      while ( myEnum1->MoveNext() )
      {
         Object^ obj = safe_cast<Object^>(myEnum1->Current);
         Console::WriteLine( obj );
         p++;
      }

      Console::WriteLine( "\n" );
      return p;
   }

   // Convert a hexadecimal string to an array.
   static array<Byte>^ HexsToArray( String^ sHexString )
   {
      array<Byte>^arr = gcnew array<Byte>(sHexString->Length / 2);
      for ( int i = 0; i < sHexString->Length; i += 2 )
      {
         arr[ i / 2 ] = Byte::Parse( sHexString->Substring( i, 2 ), NumberStyles::HexNumber );

      }
      return arr;
   }
};


// Main method.
int main()
{
   try
   {
      Evidence_Example^ EvidenceTest = gcnew Evidence_Example;
      bool ret = EvidenceTest->CreateEvidence();
      if ( ret )
      {
         Console::WriteLine( "Evidence successfully created." );
      }
      else
      {
         Console::WriteLine( "Evidence creation failed." );
      }
      EvidenceTest->DemonstrateEvidenceMembers();
   }
   catch ( Exception^ e ) 
   {
      Console::WriteLine( e );
      Environment::ExitCode = 101;
   }
}

using System;
using System.Collections;
using System.Security;
using System.Security.Policy;
using System.Security.Permissions;
using System.Globalization;

public class Evidence_Example
{
    public bool CreateEvidence()
    {
        bool retVal = true;

        try
        {
            // Create empty evidence using the default contructor.
            Evidence ev1 = new Evidence();
            Console.WriteLine("Created empty evidence with the default constructor.");

            // Constructor used to create null host evidence.
            Evidence ev2a = new Evidence(null);
            Console.WriteLine("Created an Evidence object with null host evidence.");

            // Constructor used to create host evidence.
            Url url = new Url("http://www.treyresearch.com");
            Console.WriteLine("Adding host evidence " + url.ToString());
            ev2a.AddHost(url);
            Evidence ev2b = new Evidence(ev2a);
            Console.WriteLine("Copy evidence into new evidence");
            IEnumerator enum1 = ev2b.GetHostEnumerator();
            enum1.MoveNext();
            Console.WriteLine(enum1.Current.ToString());
            
            // Constructor used to create both host and assembly evidence.
            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());
            
            // Constructor used to create null host and null assembly evidence.
            Evidence ev3b = new Evidence(null, null);
            Console.WriteLine("Create new evidence with null host and assembly evidence");
        }
        catch (Exception e)
        {
            Console.WriteLine("Fatal error: {0}", e.ToString());
            return false;
        }

        return retVal;
    }
    public Evidence DemonstrateEvidenceMembers()
    {
        Evidence myEvidence = new Evidence();
        string sPubKeyBlob =	"00240000048000009400000006020000" + 
            "00240000525341310004000001000100" + 
            "19390E945A40FB5730204A25FA5DC4DA" + 
            "B18688B412CB0EDB87A6EFC50E2796C9" + 
            "B41AD3040A7E46E4A02516C598678636" + 
            "44A0F74C39B7AB9C38C01F10AF4A5752" + 
            "BFBCDF7E6DD826676AD031E7BCE63393" + 
            "495BAD2CA4BE03B529A73C95E5B06BE7" + 
            "35CA0F622C63E8F54171BD73E4C8F193" + 
            "CB2664163719CA41F8159B8AC88F8CD3";
        Byte[] pubkey = HexsToArray(sPubKeyBlob);

        // Create a strong name.
        StrongName mSN = new StrongName(new StrongNamePublicKeyBlob(pubkey), "SN01", new Version("0.0.0.0"));

        // Create assembly and host evidence.
        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());
        Url url = new Url("http://www.treyresearch.com");
        Console.WriteLine("Adding host evidence " + url.ToString());
        myEvidence.AddHost(url);
        PrintEvidence(myEvidence).ToString();
        Console.WriteLine("Count of evidence items = " + myEvidence.Count.ToString());
        Console.WriteLine("\nCopy the evidence to an array using CopyTo, then display the array.");
        object[] evidenceArray = new object[myEvidence.Count];
        myEvidence.CopyTo(evidenceArray, 0);
        foreach (object obj in evidenceArray)
        {
            Console.WriteLine(obj.ToString());
        }
        Console.WriteLine("\nDisplay the contents of the properties.");
        Console.WriteLine("Locked is the only property normally used by code.");
        Console.WriteLine("IsReadOnly, IsSynchronized, and SyncRoot properties are not normally used.");
        Console.WriteLine("\nThe default value for the Locked property = " + myEvidence.Locked.ToString());
        
        Console.WriteLine("\nGet the hashcode for the evidence.");
        Console.WriteLine("HashCode = " + myEvidence.GetHashCode().ToString());
        Console.WriteLine("\nGet the type for the evidence.");
        Console.WriteLine("Type = " + myEvidence.GetType().ToString());
        Console.WriteLine("\nMerge new evidence with the current evidence.");
        Object [] oa1 = {};
        Site site = new Site("www.wideworldimporters.com");
        Object [] oa2 = { url, site };
        Evidence newEvidence = new Evidence(oa1, oa2);
        myEvidence.Merge(newEvidence);
        Console.WriteLine("Evidence count = " + PrintEvidence(myEvidence).ToString());
        Console.WriteLine("\nRemove URL evidence.");
        myEvidence.RemoveType(url.GetType());
        Console.WriteLine("Evidence count is now: " + myEvidence.Count.ToString());
        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("\nClear the current evidence.");
        myEvidence.Clear();
        Console.WriteLine("Count is now " + myEvidence.Count.ToString());
        return myEvidence;
    }
    public static int PrintEvidence(Evidence myEvidence)
    {
        int p = 0;
        Console.WriteLine("\nCurrent evidence = ");
        if (null == myEvidence) return 0;
        IEnumerator list = myEvidence.GetEnumerator();
        while (list.MoveNext())
        {
            Console.WriteLine(list.Current.ToString());
        }

        Console.WriteLine("\n");
        return p;
    }
    // Convert a hexidecimal string to an array.
    public static byte[] HexsToArray(string sHexString)
    {
        Byte[] array = new Byte[sHexString.Length/2];
        for (int i = 0; i < sHexString.Length; i += 2)
        {
            array[i / 2] = Byte.Parse(sHexString.Substring(i, 2), NumberStyles.HexNumber);
        }
        return array;
    }

    // Main method.
    public static void Main()
    {
        try
        {
            Evidence_Example EvidenceTest = new Evidence_Example();
            bool ret = EvidenceTest.CreateEvidence();
            if (ret)
            {
                Console.WriteLine("Evidence successfully created.");
            }
            else
            {
                Console.WriteLine("Evidence creation failed.");
            }
            
            EvidenceTest.DemonstrateEvidenceMembers();
        }
        catch(Exception e)
        {
    
            Console.WriteLine(e.ToString());
            Environment.ExitCode = 101;
        }
    }
}
Imports System.Collections
Imports System.Security
Imports System.Security.Policy
Imports System.Security.Permissions
Imports System.Globalization

Public Class Evidence_Example

    Public Function CreateEvidence() As Boolean
        Dim retVal As Boolean = True

        Try
            ' Create empty evidence using the default contructor.
            Dim ev1 As New Evidence
            Console.WriteLine("Created empty evidence with the default constructor.")

            ' Constructor used to create null host evidence.
            Dim ev2a As New Evidence(Nothing)
            Console.WriteLine("Created an Evidence object with null host evidence.")

            ' Constructor used to create host evidence.
            Dim url As New Url("http://www.treyresearch.com")
            Console.WriteLine(("Adding host evidence " & url.ToString()))
            ev2a.AddHost(url)
            Dim ev2b As New Evidence(ev2a)
            Console.WriteLine("Copy evidence into new evidence")
            Dim enum1 As IEnumerator = ev2b.GetHostEnumerator()
            enum1.MoveNext()
            Console.WriteLine(enum1.Current.ToString())
            ' Constructor used to create both host and assembly evidence.
            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()))
            ' Constructor used to create null host and null assembly evidence.
            Dim ev3b As New Evidence(Nothing, Nothing)
            Console.WriteLine("Create new evidence with null host and assembly evidence")

        Catch e As Exception
            Console.WriteLine("Fatal error: {0}", e.ToString())
            Return False
        End Try

        Return retVal
    End Function 'CreateEvidence

    Public Function DemonstrateEvidenceMembers() As Evidence
        Dim myEvidence As New Evidence
        Dim sPubKeyBlob As String = "00240000048000009400000006020000" & "00240000525341310004000001000100" & "19390E945A40FB5730204A25FA5DC4DA" & "B18688B412CB0EDB87A6EFC50E2796C9" & "B41AD3040A7E46E4A02516C598678636" & "44A0F74C39B7AB9C38C01F10AF4A5752" & "BFBCDF7E6DD826676AD031E7BCE63393" & "495BAD2CA4BE03B529A73C95E5B06BE7" & "35CA0F622C63E8F54171BD73E4C8F193" & "CB2664163719CA41F8159B8AC88F8CD3"
        Dim pubkey As [Byte]() = HexsToArray(sPubKeyBlob)

        ' Create a strong name.
        Dim mSN As New StrongName(New StrongNamePublicKeyBlob(pubkey), "SN01", New Version("0.0.0.0"))

        ' Create assembly and host evidence.
        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()))
        Dim url As New Url("http://www.treyresearch.com")
        Console.WriteLine(("Adding host evidence " & url.ToString()))
        myEvidence.AddHost(url)
        PrintEvidence(myEvidence).ToString()
        Console.WriteLine(("Count of evidence items = " & myEvidence.Count.ToString()))
        Console.WriteLine(ControlChars.Lf & "Copy the evidence to an array using CopyTo, then display the array.")
        Dim evidenceArray(myEvidence.Count - 1) As Object
        myEvidence.CopyTo(evidenceArray, 0)
        Dim obj As Object
        For Each obj In evidenceArray
            Console.WriteLine(obj.ToString())
        Next obj
        Console.WriteLine(ControlChars.Lf & "Display the contents of the properties.")
        Console.WriteLine("Locked is the only property normally used by code.")
        Console.WriteLine("IsReadOnly, IsSynchronized, and SyncRoot properties are not normally used.")
        Console.WriteLine((ControlChars.Lf & "The default value for the Locked property = " & myEvidence.Locked.ToString()))
        Console.WriteLine(ControlChars.Lf & "Get the hashcode for the evidence.")
        Console.WriteLine(("HashCode = " & myEvidence.GetHashCode().ToString()))
        Console.WriteLine(ControlChars.Lf & "Get the type for the evidence.")
        Console.WriteLine(("Type = " & myEvidence.GetType().ToString()))
        Console.WriteLine(ControlChars.Lf & "Merge new evidence with the current evidence.")
        Dim oa1() As [Object]
        Dim site As New Site("www.wideworldimporters.com")
        Dim oa2 As [Object]() = {url, site}
        Dim newEvidence As New Evidence(oa1, oa2)
        myEvidence.Merge(newEvidence)

        Console.WriteLine(("Evidence count = " & PrintEvidence(myEvidence).ToString()))
        Console.WriteLine(ControlChars.Lf & "Remove URL evidence.")
        myEvidence.RemoveType(url.GetType())
        Console.WriteLine(("Evidence count is now: " & myEvidence.Count.ToString()))
        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)))
        Console.WriteLine(ControlChars.Lf & "Clear the current evidence.")
        myEvidence.Clear()
        Console.WriteLine(("Count is now " & myEvidence.Count.ToString()))
        Return myEvidence
    End Function 'DemonstrateEvidenceMembers

    Public Shared Function PrintEvidence(ByVal myEvidence As Evidence) As Integer
        Dim p As Integer = 0
        Console.WriteLine(ControlChars.Lf & "Current evidence = ")
        If myEvidence Is Nothing Then
            Return 0
        End If
        Dim list As IEnumerator = myEvidence.GetEnumerator()
        Dim obj As Object
        While list.MoveNext()
            Console.WriteLine(list.Current.ToString())
            p = p + 1
        End While
        Console.WriteLine(ControlChars.Lf)
        Return p
    End Function 'PrintEvidence

    ' Convert a hexidecimal string to an array.
    Public Shared Function HexsToArray(ByVal sHexString As String) As Byte()
        Dim array(sHexString.Length / 2) As [Byte]
        Dim i As Integer
        For i = 0 To sHexString.Length - 2 Step 2
            array((i / 2)) = [Byte].Parse(sHexString.Substring(i, 2), NumberStyles.HexNumber)
        Next i
        Return array
    End Function 'HexsToArray




    ' Main method.
    Public Shared Sub Main()
        Try
            Dim EvidenceTest As New Evidence_Example
            Dim ret As Boolean = EvidenceTest.CreateEvidence()
            If ret Then
                Console.WriteLine("Evidence successfully created.")
            Else
                Console.WriteLine("Evidence creation failed.")
            End If

            EvidenceTest.DemonstrateEvidenceMembers()
        Catch e As Exception
            Console.WriteLine(e.ToString())
            Environment.ExitCode = 101
        End Try
    End Sub
End Class

Uwagi

Typowe formy dowodów obejmują podpisy i lokalizację pochodzenia kodu, ale potencjalnie mogą być czymś. Obiekty dowolnego typu rozpoznawane przez zasady zabezpieczeń reprezentują dowody.

Zasady zabezpieczeń składają się z grup kodu; określony zestaw (podstawowa jednostka kodu do udzielania uprawnień zabezpieczeń) jest członkiem grupy kodu, jeśli spełnia warunek członkostwa grupy kodu. Dowody to zestaw danych wejściowych zasad, których warunki członkostwa używają do określenia, do których grup kodu należy zestaw.

Klasa Evidence jest kolekcją (patrz ICollection) zawierającą zestaw obiektów reprezentujących dowody. Ta klasa posiada dwa zestawy, które odpowiadają źródle dowodów: dowody hosta i dowody zestawów.

Zasady mogą uzyskiwać dowody z dwóch różnych źródeł podczas oceniania uprawnień do kodu.

  • Host evidence jest dostarczany przez hosta i może być udostępniany tylko przez hosty, które otrzymały ControlEvidence uprawnienie. Zazwyczaj jest to dowód pochodzenia kodu i podpisów cyfrowych w zestawie. Dowody dotyczące pochodzenia zwykle obejmują Urldowody , Sitei Zone . Podpisy odnoszą się do wydawcy oprogramowania (podpis AuthentiCode X.509v3) i tożsamości silnych nazw. Oba rodzaje tożsamości opartej na podpisach cyfrowych są wbudowane w zestaw, ale muszą być weryfikowane i przekazywane do zasad przez hosta; po załadowaniu system zabezpieczeń weryfikuje podpis. Następnie system tworzy odpowiednie dowody i przekazuje je do zasad tylko wtedy, gdy odpowiedni podpis jest prawidłowy.

  • Assembly evidence jest częścią samego zestawu. Deweloperzy lub administratorzy mogą dołączać niestandardowe dowody do zestawu w celu rozszerzenia zestawu dowodów na zasady. Dowód zestawu można dodać tylko w momencie generowania zestawu, który występuje przed podpisaniem zestawu. Domyślne zasady systemu zabezpieczeń ignorują dowody dostarczone przez zestaw, ale można je rozszerzyć, aby je zaakceptować.

Konstruktory

Evidence()

Inicjuje Evidence nowe puste wystąpienie klasy.

Evidence(Evidence)

Inicjuje nowe wystąpienie Evidence klasy z płytkiej kopii istniejącej.

Evidence(EvidenceBase[], EvidenceBase[])

Inicjuje Evidence nowe wystąpienie klasy z wielu zestawów dowodów hosta i zestawu.

Evidence(Object[], Object[])
Nieaktualne.
Nieaktualne.
Nieaktualne.

Inicjuje Evidence nowe wystąpienie klasy z wielu zestawów dowodów hosta i zestawu.

Właściwości

Count
Nieaktualne.
Nieaktualne.
Nieaktualne.

Pobiera liczbę obiektów dowodów w zestawie dowodów.

IsReadOnly

Pobiera wartość wskazującą, czy zestaw dowodów jest tylko do odczytu.

IsSynchronized

Pobiera wartość wskazującą, czy zestaw dowodów jest bezpieczny wątkowo.

Locked

Pobiera lub ustawia wartość wskazującą, czy dowody są zablokowane.

SyncRoot

Pobiera katalog główny synchronizacji.

Metody

AddAssembly(Object)
Nieaktualne.
Nieaktualne.
Nieaktualne.

Dodaje określony dowód zestawu do zestawu dowodów.

AddAssemblyEvidence<T>(T)

Dodaje obiekt dowodowy określonego typu do listy dowodów dostarczonych przez zestaw.

AddHost(Object)
Nieaktualne.
Nieaktualne.
Nieaktualne.

Dodaje określone dowody dostarczone przez hosta do zestawu dowodów.

AddHostEvidence<T>(T)

Dodaje dowody hosta określonego typu do zbierania dowodów hosta.

Clear()

Usuwa dowody hosta i zestawu z zestawu dowodów.

Clone()

Zwraca zduplikowaną kopię tego obiektu dowodu.

CopyTo(Array, Int32)
Nieaktualne.
Nieaktualne.
Nieaktualne.

Kopiuje obiekty dowodów do obiektu Array.

Equals(Object)

Określa, czy określony Evidence obiekt jest równy bieżącemu Evidence.

Equals(Object)

Określa, czy dany obiekt jest taki sam, jak bieżący obiekt.

(Odziedziczone po Object)
GetAssemblyEnumerator()

Wylicza dowody dostarczone przez zestaw.

GetAssemblyEvidence<T>()

Pobiera dowody zestawu określonego typu z kolekcji.

GetEnumerator()
Nieaktualne.
Nieaktualne.
Nieaktualne.

Wylicza wszystkie dowody w zestawie, zarówno dostarczone przez hosta, jak i dostarczone przez zestaw.

GetHashCode()

Pobiera kod skrótu Evidence dla obiektu, który jest odpowiedni do użycia w algorytmach tworzenia skrótów i strukturach danych, takich jak tabela skrótów.

GetHashCode()

Służy jako domyślna funkcja skrótu.

(Odziedziczone po Object)
GetHostEnumerator()

Wylicza dowody dostarczone przez hosta.

GetHostEvidence<T>()

Pobiera dowody hosta określonego typu z kolekcji.

GetType()

Type Pobiera wartość bieżącego wystąpienia.

(Odziedziczone po Object)
MemberwiseClone()

Tworzy płytkią kopię bieżącego Objectelementu .

(Odziedziczone po Object)
Merge(Evidence)

Scala określony zestaw dowodów z bieżącym zestawem dowodów.

RemoveType(Type)

Usuwa dowody dla danego typu z wyliczenia hosta i zestawu.

ToString()

Zwraca ciąg reprezentujący bieżący obiekt.

(Odziedziczone po Object)

Metody rozszerzania

Cast<TResult>(IEnumerable)

Rzutuje elementy elementu IEnumerable na określony typ.

OfType<TResult>(IEnumerable)

Filtruje elementy IEnumerable elementu na podstawie określonego typu.

AsParallel(IEnumerable)

Umożliwia równoległość zapytania.

AsQueryable(IEnumerable)

Konwertuje element IEnumerable na .IQueryable

Dotyczy