XsdDataContractImporter.GetKnownTypeReferences(XmlQualifiedName) 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.
Returns a list of CodeTypeReference objects that represents the known types generated when generating code for the specified schema type.
public:
System::Collections::Generic::ICollection<System::CodeDom::CodeTypeReference ^> ^ GetKnownTypeReferences(System::Xml::XmlQualifiedName ^ typeName);
public System.Collections.Generic.ICollection<System.CodeDom.CodeTypeReference>? GetKnownTypeReferences (System.Xml.XmlQualifiedName typeName);
public System.Collections.Generic.ICollection<System.CodeDom.CodeTypeReference> GetKnownTypeReferences (System.Xml.XmlQualifiedName typeName);
member this.GetKnownTypeReferences : System.Xml.XmlQualifiedName -> System.Collections.Generic.ICollection<System.CodeDom.CodeTypeReference>
Public Function GetKnownTypeReferences (typeName As XmlQualifiedName) As ICollection(Of CodeTypeReference)
Parameters
- typeName
- XmlQualifiedName
An XmlQualifiedName that represents the schema type to look up known types for.
Returns
A IList<T> of type CodeTypeReference.
Remarks
When generating CLR types for schema types, known types are also generated for all derived types that are present in the schema. In many cases, these known types are added using attributes to the generated code. (For example, see the KnownTypeAttribute class. ) However, for the top-level type, there needs to be a way to return the set of known types generated. This method returns the CodeTypeReference for known types that were generated for a specific schema type.
For more information, see Data Contract Known Types.
Applies to
See also
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應