XmlChoiceIdentifierAttribute XmlChoiceIdentifierAttribute XmlChoiceIdentifierAttribute XmlChoiceIdentifierAttribute Class

Definition

Gibt an, dass der Member durch Verwenden einer Enumeration eindeutig bestimmt werden kann.Specifies that the member can be further detected by using an enumeration.

public ref class XmlChoiceIdentifierAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Parameter | System.AttributeTargets.Property | System.AttributeTargets.ReturnValue, AllowMultiple=false)]
[System.AttributeUsage(System.AttributeTargets.Property | System.AttributeTargets.Field | System.AttributeTargets.Parameter | System.AttributeTargets.ReturnValue, AllowMultiple=false)]
[System.AttributeUsage(System.AttributeTargets.Property | System.AttributeTargets.Field | System.AttributeTargets.Parameter | System.AttributeTargets.ReturnValue)]
public class XmlChoiceIdentifierAttribute : Attribute
type XmlChoiceIdentifierAttribute = class
    inherit Attribute
Public Class XmlChoiceIdentifierAttribute
Inherits Attribute
Vererbung
XmlChoiceIdentifierAttributeXmlChoiceIdentifierAttributeXmlChoiceIdentifierAttributeXmlChoiceIdentifierAttribute
Attribute

Beispiele

Im folgenden Beispiel wird die Klasse serialisiert Choices , enthält zwei Felder, MyChoice und ManyChoices.The following example serializes a class named Choices that includes two fields, MyChoice and ManyChoices. Die XmlChoiceIdentifierAttribute gilt für jedes Feld, der angibt, (über die MemberName Eigenschaft) einer anderen Klasse-Element, das Ruft ab oder legt eine Enumeration, die den Elementwert erkennt.The XmlChoiceIdentifierAttribute is applied to each field that specifies (through the MemberName property) another class member that gets or sets an enumeration that detects the member value. Die MyChoice Feld kann auf einen einzelnen Wert festgelegt werden, mit einer entsprechenden Enumerationsmember finden Sie in der EnumType Feld.The MyChoice field can be set to a single value, with a corresponding enumeration member found in the EnumType field. Die ManyChoices -Feld gibt ein Array von Objekten zurück.The ManyChoices field returns an array of objects. Die ChoiceArray -Feld gibt ein Array von Enumerationswerten zurück.The ChoiceArray field returns an array of enumeration values. Für jedes Arraymitglied, in der ManyChoices Feld, ein entsprechenden Member gefunden in das von zurückgegebene Array die ChoiceArray Feld.For each array member in the ManyChoices field, a corresponding member is found in the array returned by the ChoiceArray field.

#using <System.dll>
#using <System.xml.dll>

using namespace System;
using namespace System::Xml;
using namespace System::Xml::Serialization;
using namespace System::IO;

[XmlType(IncludeInSchema=false)]

public enum class ItemChoiceType
{
   None, Word, Number, DecimalNumber
};

public enum class MoreChoices
{
   None, Item, Amount, Temp
};

public ref class Choices
{
public:

   // The MyChoice field can be set to any one of 
   // the types below. 

   [XmlChoiceIdentifier("EnumType")]
   [XmlElement("Word",String::typeid)]
   [XmlElement("Number",Int32::typeid)]
   [XmlElement("DecimalNumber",Double::typeid)]
   Object^ MyChoice;

   // Don't serialize this field. The EnumType field
   // contains the enumeration value that corresponds
   // to the MyChoice field value.

   [XmlIgnore]
   ItemChoiceType EnumType;

   // The ManyChoices field can contain an array
   // of choices. Each choice must be matched to
   // an array item in the ChoiceArray field.

   [XmlChoiceIdentifier("ChoiceArray")]
   [XmlElement("Item",String::typeid)]
   [XmlElement("Amount",Int32::typeid)]
   [XmlElement("Temp",Double::typeid)]
   array<Object^>^ManyChoices;

   // TheChoiceArray field contains the enumeration
   // values, one for each item in the ManyChoices array.

   [XmlIgnore]
   array<MoreChoices>^ChoiceArray;
};

void SerializeObject( String^ filename );
void DeserializeObject( String^ filename );
int main()
{
   SerializeObject( "Choices.xml" );
   DeserializeObject( "Choices.xml" );
}

void SerializeObject( String^ filename )
{
   XmlSerializer^ mySerializer = gcnew XmlSerializer( Choices::typeid );
   TextWriter^ writer = gcnew StreamWriter( filename );
   Choices^ myChoices = gcnew Choices;

   // Set the MyChoice field to a string. Set the
   // EnumType to Word.
   myChoices->MyChoice = "Book";
   myChoices->EnumType = ItemChoiceType::Word;

   // Populate an object array with three items, one
   // of each enumeration type. Set the array to the 
   // ManyChoices field.
   array<Object^>^strChoices = {"Food",5,98.6};
   myChoices->ManyChoices = strChoices;

   // For each item in the ManyChoices array, add an
   // enumeration value.
   array<MoreChoices>^ itmChoices = {MoreChoices::Item,MoreChoices::Amount,MoreChoices::Temp};
   myChoices->ChoiceArray = itmChoices;
   mySerializer->Serialize( writer, myChoices );
   writer->Close();
}

void DeserializeObject( String^ filename )
{
   XmlSerializer^ ser = gcnew XmlSerializer( Choices::typeid );

   // A FileStream is needed to read the XML document.
   FileStream^ fs = gcnew FileStream( filename,FileMode::Open );
   Choices^ myChoices = safe_cast<Choices^>(ser->Deserialize( fs ));
   fs->Close();

   // Disambiguate the MyChoice value using the enumeration.
   if ( myChoices->EnumType == ItemChoiceType::Word )
   {
      Console::WriteLine( "Word: {0}", myChoices->MyChoice->ToString() );
   }
   else
   if ( myChoices->EnumType == ItemChoiceType::Number )
   {
      Console::WriteLine( "Number: {0}", myChoices->MyChoice->ToString() );
   }
   else
   if ( myChoices->EnumType == ItemChoiceType::DecimalNumber )
   {
      Console::WriteLine( "DecimalNumber: {0}", myChoices->MyChoice->ToString() );
   }

   // Disambiguate the ManyChoices values using the enumerations.
   for ( int i = 0; i < myChoices->ManyChoices->Length; i++ )
   {
      if ( myChoices->ChoiceArray[ i ] == MoreChoices::Item )
            Console::WriteLine( "Item: {0}", myChoices->ManyChoices[ i ] );
      else
      if ( myChoices->ChoiceArray[ i ] == MoreChoices::Amount )
            Console::WriteLine( "Amount: ", myChoices->ManyChoices[ i ]->ToString() );
      if ( myChoices->ChoiceArray[ i ] == MoreChoices::Temp )
            Console::WriteLine( "Temp: {0}", myChoices->ManyChoices[ i ]->ToString() );
   }
}
using System;
using System.Xml;
using System.Xml.Serialization;
using System.IO;

public class Choices{
   // The MyChoice field can be set to any one of 
   // the types below. 
   [XmlChoiceIdentifier("EnumType")]
   [XmlElement("Word", typeof(string))]
   [XmlElement("Number", typeof(int))]
   [XmlElement("DecimalNumber", typeof(double))]
   public object MyChoice;

   // Don't serialize this field. The EnumType field
   // contains the enumeration value that corresponds
   // to the MyChoice field value.
   [XmlIgnore]
   public ItemChoiceType EnumType;

   // The ManyChoices field can contain an array
   // of choices. Each choice must be matched to
   // an array item in the ChoiceArray field.
   [XmlChoiceIdentifier("ChoiceArray")]
   [XmlElement("Item", typeof(string))]
   [XmlElement("Amount", typeof(int))]
   [XmlElement("Temp", typeof(double))]
   public object[] ManyChoices;

   // TheChoiceArray field contains the enumeration
   // values, one for each item in the ManyChoices array.
   [XmlIgnore]
   public MoreChoices[] ChoiceArray;
}

[XmlType(IncludeInSchema=false)]
public enum ItemChoiceType{
   None,
   Word, 
   Number,
   DecimalNumber
}

public enum MoreChoices{
   None,
   Item,
   Amount,
   Temp
}

public class Test{
   static void Main(){
      Test t = new Test();
      t.SerializeObject("Choices.xml");
      t.DeserializeObject("Choices.xml");
   }

   private void SerializeObject(string filename){
      XmlSerializer mySerializer = 
      new XmlSerializer(typeof(Choices));
      TextWriter writer = new StreamWriter(filename);
      Choices myChoices = new Choices();

      // Set the MyChoice field to a string. Set the
      // EnumType to Word.
      myChoices.MyChoice= "Book";
      myChoices.EnumType = ItemChoiceType.Word;

      // Populate an object array with three items, one
      // of each enumeration type. Set the array to the 
      // ManyChoices field.
      object[] strChoices = new object[]{"Food",  5, 98.6};
      myChoices.ManyChoices=strChoices;

      // For each item in the ManyChoices array, add an
      // enumeration value.
      MoreChoices[] itmChoices = new MoreChoices[]
      {MoreChoices.Item, 
      MoreChoices.Amount,
      MoreChoices.Temp};
      myChoices.ChoiceArray=itmChoices;
      
      mySerializer.Serialize(writer, myChoices);
      writer.Close();
   }

   private void DeserializeObject(string filename){
      XmlSerializer ser = new XmlSerializer(typeof(Choices));

      // A FileStream is needed to read the XML document.
      FileStream fs = new FileStream(filename, FileMode.Open);
      Choices myChoices = (Choices)
      ser.Deserialize(fs);
      fs.Close();

      // Disambiguate the MyChoice value using the enumeration.
      if(myChoices.EnumType == ItemChoiceType.Word){
      	   Console.WriteLine("Word: " +  
      	   	myChoices.MyChoice.ToString());
      	}
      else if(myChoices.EnumType == ItemChoiceType.Number){
      	   Console.WriteLine("Number: " +
      	   	myChoices.MyChoice.ToString());
      	}
      else if(myChoices.EnumType == ItemChoiceType.DecimalNumber){
      	   Console.WriteLine("DecimalNumber: " +
      	   	myChoices.MyChoice.ToString());
      	}

      // Disambiguate the ManyChoices values using the enumerations.
      for(int i = 0; i<myChoices.ManyChoices.Length; i++){
      if(myChoices.ChoiceArray[i] == MoreChoices.Item)
      	Console.WriteLine("Item: " + (string) myChoices.ManyChoices[i]);
      else if(myChoices.ChoiceArray[i] == MoreChoices.Amount)
      	Console.WriteLine("Amount: " + myChoices.ManyChoices[i].ToString());
      if(myChoices.ChoiceArray[i] == MoreChoices.Temp)
      	Console.WriteLine("Temp: " + (string) myChoices.ManyChoices[i].ToString());
      	}
      
   }
}
Imports System
Imports System.Xml
Imports System.Xml.Serialization
Imports System.IO

Public Class Choices
   ' The MyChoice field can be set to any one of 
   ' the types below. 
   <XmlChoiceIdentifier("EnumType"), _
   XmlElement("Word", GetType(String)), _
   XmlElement("Number", GetType(Integer)), _
   XmlElement("DecimalNumber", GetType(double))> _
   Public MyChoice As Object 

   ' Don't serialize this field. The EnumType field
   ' contains the enumeration value that corresponds
   ' to the MyChoice field value.
   <XmlIgnore> _
   Public EnumType As ItemChoiceType 

   'The ManyChoices field can contain an array
   ' of choices. Each choice must be matched to
   ' an array item in the ChoiceArray field.
   <XmlChoiceIdentifier("ChoiceArray"), _
   XmlElement("Item", GetType(string)), _
   XmlElement("Amount", GetType(Integer)), _
   XmlElement("Temp", GetType(double))> _
   Public ManyChoices() As Object

   ' TheChoiceArray field contains the enumeration
   ' values, one for each item in the ManyChoices array.
   <XmlIgnore> _
   Public ChoiceArray() As MoreChoices
End Class

<XmlType(IncludeInSchema:=false)> _
Public Enum ItemChoiceType
   None
   Word 
   Number
   DecimalNumber
End Enum

<XmlType(IncludeInSchema:=false)> _
Public Enum MoreChoices
   None
   Item
   Amount
   Temp
End Enum

Public Class Test
   Shared Sub Main()
      Dim t  As Test = New Test()
      t.SerializeObject("Choices.xml")
      t.DeserializeObject("Choices.xml")
   End Sub

   private Sub SerializeObject(filename As string)
      Dim mySerializer As XmlSerializer = _
      New XmlSerializer(GetType(Choices))
      Dim writer As TextWriter = New StreamWriter(filename)
      Dim myChoices As Choices = New Choices()

      ' Set the MyChoice field to a string. Set the
      ' EnumType to Word.
      myChoices.MyChoice= "Book"
      myChoices.EnumType = ItemChoiceType.Word

      ' Populate an object array with three items, one
      ' of each enumeration type. Set the array to the 
      ' ManyChoices field.
      Dim strChoices () As Object = New object(){"Food",  5, 98.6}
      myChoices.ManyChoices=strChoices

      ' For each item in the ManyChoices array, add an
      ' enumeration value.
      Dim itmChoices () As MoreChoices = New MoreChoices() _
      {MoreChoices.Item, _
      MoreChoices.Amount, _
      MoreChoices.Temp}
      myChoices.ChoiceArray=itmChoices
      
      mySerializer.Serialize(writer, myChoices)
      writer.Close()
   End Sub

   private Sub DeserializeObject(filename As string)
      Dim ser As XmlSerializer = New XmlSerializer(GetType(Choices))
      

      ' A FileStream is needed to read the XML document.
      Dim fs As FileStream = New FileStream(filename, FileMode.Open)
      
      Dim myChoices As Choices = CType(ser.Deserialize(fs), Choices)

      fs.Close()

      ' Disambiguate the MyChoice value Imports the enumeration.
      if myChoices.EnumType = ItemChoiceType.Word Then
      	   Console.WriteLine("Word: " & _
      	   myChoices.MyChoice.ToString())
      	
      else if myChoices.EnumType = ItemChoiceType.Number Then 
      	   Console.WriteLine("Number: " & _
      	   	myChoices.MyChoice.ToString())
      	
      else if myChoices.EnumType = ItemChoiceType.DecimalNumber Then
         Console.WriteLine("DecimalNumber: " & _
      	   	myChoices.MyChoice.ToString())
      	End If

      ' Disambiguate the ManyChoices values Imports the enumerations.
      Dim i As Integer
      for i = 0 to myChoices.ManyChoices.Length -1
      if myChoices.ChoiceArray(i) = MoreChoices.Item Then
      	Console.WriteLine("Item: " +  _
      	myChoices.ManyChoices(i).ToString())
      else if myChoices.ChoiceArray(i) = MoreChoices.Amount Then
      	Console.WriteLine("Amount: " + _
      	myChoices.ManyChoices(i).ToString())
      else if (myChoices.ChoiceArray(i) = MoreChoices.Temp)
      	Console.WriteLine("Temp: " + _
      	myChoices.ManyChoices(i).ToString())
      	End If
      	Next i
      
   End Sub
End Class

Hinweise

Die XML-Schemadefinition-Element mit dem Namen xsi:choice wird verwendet, um ein komplexes Element definieren, die nur ein untergeordnetes Element in einer Instanz enthalten kann (Maxoccurs = 1).The XML schema element definition named xsi:choice is used to define a complex element that can contain only one child in an instance (maxoccurs = 1). Dieses kann eine von mehreren Typen, und es kann einen von mehreren Namen aufweisen.That child can be one of several types, and it can have one of several names. Jeder Name bezieht sich auf einen bestimmten Typ; Allerdings können mehrere Namen desselben Typs zugeordnet sein.Each name is associated with a specific type; however, several names can be associated with the same type. Aus diesem Grund ist eine Instanz eines solchen Elements undeutlich.Because of this, an instance of such an element is indistinct. Betrachten Sie beispielsweise das folgende Schemafragment, die dieses Schemafragment Element mit dem Namen definiert MyChoice.For example, consider the following schema fragment that defines such an indistinct element named MyChoice.

<xsd:complexType name="MyChoice">  
 <xsd:sequence>  
 <xsd:choice minOccurs="0" maxOccurs="1">  
 <xsd:element minOccurs="1" maxOccurs="1" name="ChoiceOne" type="xsd:string" />  
 <xsd:element minOccurs="1" maxOccurs="1" name="ChoiceTwo" type="xsd:string" />  
 </xsd:choice>  
 </xsd:sequence>  
</xsd:complexType>  

Die XmlChoiceIdentifierAttribute können Sie einen speziellen Enumerationswert für jede Instanz des Elements zuweisen.The XmlChoiceIdentifierAttribute allows you to assign a special enumeration value to each instance of the member. Sie müssen entweder die Enumeration selbst erstellen oder er kann generiert werden, durch die XML Schema Definition Tool (Xsd.exe).You must either create the enumeration yourself or it can be generated by the XML Schema Definition Tool (Xsd.exe). Der folgende C#-Code zeigt wie die XmlChoiceIdentifierAttribute gilt für eine Item -Felds ist; die MemberName identifiziert das Feld, das die Enumeration, die weitere verwendet wird enthält, um die Auswahl zu erkennen.The following C# code shows how the XmlChoiceIdentifierAttribute is applied to an Item field; the MemberName property identifies the field that contains the enumeration that is further used to detect the choice.

public class Choices{  
 [XmlChoiceIdentifier("ItemType")]  
 [XmlChoiceIdentifier("ChoiceOne")]  
 [XmlChoiceIdentifier("ChoiceTwo")]  
 public string MyChoice;  

 // Do not serialize this next field:  
 [XmlIgnore]  
 public ItemChoiceType ItemType;  
}  
// Do not include this enumeration in the XML schema.  
[XmlType(IncludeInSchema = false)]  
public enum ItemChoiceType{  
 ChoiceOne,  
 ChoiceTwo,  
}  

Wenn dieser Code vorhanden ist, Sie serialisieren und Deserialisieren können diese Klasse durch Festlegen der ItemType Feld auf eine entsprechende Enumeration.When this code is in place, you can serialize and deserialize this class by setting the ItemType field to an appropriate enumeration. Beispielsweise zum Serialisieren der Choice -Klasse, die C#-Code ähnelt der folgenden Darstellung.For example, to serialize the Choice class, the C# code resembles the following.

Choices mc = new Choices();  
mc.MyChoice = "Item Choice One";  
mc.ItemType = ItemChoiceType.ChoiceOne;  

Beim Deserialisieren von ähnelt der C#-Code dem folgenden:When deserializing, the C# code resembles the following:

MyChoice mc = (MyChoice) myXmlSerializer.Deserialize(myReader);  
if(mc.ItemType == ItemChoiceType.ChoiceOne)  
 {  
     // Handle choice one.  
 }  
if(mc.ItemType == ItemChoiceType.ChoiceTwo)  
 {  
     // Handle choice two.  
 }  
if(mc.ItemType != null)  
 {  
     throw CreateUnknownTypeException(mc.Item);  
 }  

Beim zweiten Szenario ist bei der XmlChoiceIdentifierAttribute wird verwendet.There is a second scenario when the XmlChoiceIdentifierAttribute is used. Im folgenden Schema wird der Member ein Feld, ein Array von Elementen zurückgibt (MaxOccurs = "unbounded").In the following schema, the member is a field that returns an array of items (maxOccurs="unbounded"). Das Array kann Objekte enthalten die erste Wahl ("D-a-t-a"), und der zweite Option ("MoreData").The array can contain objects of the first choice ("D-a-t-a"), and of the second choice ("MoreData").

<xsd:complexType name="MyChoice">  
 <xsd:sequence>  
 <xsd:choice minOccurs="0" maxOccurs="unbounded">  
 <xsd:element minOccurs="1" maxOccurs="1" name="D-a-t-a" type="xsd:string" />  
 <xsd:element minOccurs="1" maxOccurs="1" name="MoreData" type="xsd:string" />  
 </xsd:choice>  
 </xsd:sequence>  
</xsd:complexType>  

Die resultierende Klasse wird dann ein Feld verwendet, um ein Array von Elementen zurückzugeben.The resulting class then uses a field to return an array of items. Für jedes Element im Array, ein entsprechendes ItemChoiceType Enumeration muss auch vorhanden sein.For each item in the array, a corresponding ItemChoiceType enumeration must also be found. Die entsprechenden Enumerationen sind in den zurückgegebenen Array enthalten die ItemsElementName Feld.The matching enumerations are contained in the array returned by the ItemsElementName field.

public class MyChoice {  
 [System.Xml.Serialization.XmlElementAttribute("D-a-t-a", typeof(string), IsNullable=false)]  
 [System.Xml.Serialization.XmlElementAttribute("MoreData", typeof(string), IsNullable=false)]  
 [System.Xml.Serialization.XmlChoiceIdentifierAttribute("ItemsElementName")]  
 public string[] Items;  
 [System.Xml.Serialization.XmlElementAttribute(IsNullable=false)]  
 [System.Xml.Serialization.XmlIgnoreAttribute()]  
 public ItemsChoiceType[] ItemsElementName;  
}  
[System.Xml.Serialization.XmlTypeAttribute(IncludeInSchema=false)]  
public enum ItemsChoiceType {  
 [System.Xml.Serialization.XmlEnumAttribute("D-a-t-a")]  
 Data,  
 MoreData,  
}  

Beim Deserialisieren eines Objekts, das eine Palette von Wahlmöglichkeiten enthält, verwenden Sie eine (z. B. eine If... then... dann-Struktur) zu bestimmen, wie Deserialisieren ein bestimmtes Werts.When deserializing an object that includes a range of choices, use a control structure (such as an if...then...else structure) to determine how to deserialize a particular value. Klicken Sie in der Struktur des Steuerelements überprüfen Sie den Enumerationswert, und Deserialisieren Sie den Wert entsprechend zu.In the control structure, check the enumeration value and deserialize the value accordingly.

Konstruktoren

XmlChoiceIdentifierAttribute() XmlChoiceIdentifierAttribute() XmlChoiceIdentifierAttribute() XmlChoiceIdentifierAttribute()

Initialisiert eine neue Instanz der XmlChoiceIdentifierAttribute-Klasse.Initializes a new instance of the XmlChoiceIdentifierAttribute class.

XmlChoiceIdentifierAttribute(String) XmlChoiceIdentifierAttribute(String) XmlChoiceIdentifierAttribute(String) XmlChoiceIdentifierAttribute(String)

Initialisiert eine neue Instanz der XmlChoiceIdentifierAttribute-Klasse.Initializes a new instance of the XmlChoiceIdentifierAttribute class.

Eigenschaften

MemberName MemberName MemberName MemberName

Ruft den Namen des Felds ab, das die Enumeration zurückgibt, mit der Typen bestimmt werden, oder legt diesen fest.Gets or sets the name of the field that returns the enumeration to use when detecting types.

TypeId TypeId TypeId TypeId

Ruft bei Implementierung in einer abgeleiteten Klasse einen eindeutigen Bezeichner für dieses Attribute ab.When implemented in a derived class, gets a unique identifier for this Attribute.

(Inherited from Attribute)

Methoden

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Gibt einen Wert zurück, der angibt, ob diese Instanz gleich einem angegebenen Objekt ist.Returns a value that indicates whether this instance is equal to a specified object.

(Inherited from Attribute)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Gibt den Hashcode für diese Instanz zurück.Returns the hash code for this instance.

(Inherited from Attribute)
GetType() GetType() GetType() GetType()

Ruft den Type der aktuellen Instanz ab.Gets the Type of the current instance.

(Inherited from Object)
IsDefaultAttribute() IsDefaultAttribute() IsDefaultAttribute() IsDefaultAttribute()

Gibt beim Überschreiben in einer abgeleiteten Klasse an, ob der Wert der Instanz der Standardwert für die abgeleitete Klasse ist.When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class.

(Inherited from Attribute)
Match(Object) Match(Object) Match(Object) Match(Object)

Beim Überschreiben in einer abgeleiteten Klasse wird ein Wert zurückgegeben, der angibt, ob diese Instanz einem bestimmten Objekt entspricht.When overridden in a derived class, returns a value that indicates whether this instance equals a specified object.

(Inherited from Attribute)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Erstellt eine flache Kopie des aktuellen Object.Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Gibt eine Zeichenfolge zurück, die das aktuelle Objekt darstellt.Returns a string that represents the current object.

(Inherited from Object)

Explizite Schnittstellenimplementierungen

_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) _Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) _Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) _Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

Ordnet eine Reihe von Namen einer entsprechenden Reihe von Dispatchbezeichnern zu.Maps a set of names to a corresponding set of dispatch identifiers.

(Inherited from Attribute)
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr) _Attribute.GetTypeInfo(UInt32, UInt32, IntPtr) _Attribute.GetTypeInfo(UInt32, UInt32, IntPtr) _Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)

Ruft die Typinformationen für ein Objekt ab, mit deren Hilfe die Typinformationen für eine Schnittstelle abgerufen werden können.Retrieves the type information for an object, which can be used to get the type information for an interface.

(Inherited from Attribute)
_Attribute.GetTypeInfoCount(UInt32) _Attribute.GetTypeInfoCount(UInt32) _Attribute.GetTypeInfoCount(UInt32) _Attribute.GetTypeInfoCount(UInt32)

Ruft die Anzahl der Schnittstellen mit Typinformationen ab, die von einem Objekt bereitgestellt werden (0 oder 1).Retrieves the number of type information interfaces that an object provides (either 0 or 1).

(Inherited from Attribute)
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) _Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) _Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) _Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

Stellt den Zugriff auf von einem Objekt verfügbar gemachte Eigenschaften und Methoden bereit.Provides access to properties and methods exposed by an object.

(Inherited from Attribute)

Gilt für:

Siehe auch