XamlType Construtores

Definição

Inicializa uma nova instância da XamlType classe.

Sobrecargas

Name Descrição
XamlType(Type, XamlSchemaContext)

Inicializa uma nova instância da XamlType classe com base na informação do tipo CLR subjacente.

XamlType(String, IList<XamlType>, XamlSchemaContext)

Inicializa uma nova instância da XamlType classe com base num nome de string para o tipo.

XamlType(Type, XamlSchemaContext, XamlTypeInvoker)

Inicializa uma nova instância da XamlType classe com base na informação do tipo subjacente e numa XamlTypeInvoker implementação.

XamlType(String, String, IList<XamlType>, XamlSchemaContext)

Inicializa uma nova instância da XamlType classe com base no namespace XAML e num nome de string para o tipo. Este construtor destina-se exclusivamente à análise e registo de nós XAML de usos de tipos que se sabe não terem suporte no sistema de tipos de suporte e no contexto do esquema XAML.

XamlType(Type, XamlSchemaContext)

Inicializa uma nova instância da XamlType classe com base na informação do tipo CLR subjacente.

public:
 XamlType(Type ^ underlyingType, System::Xaml::XamlSchemaContext ^ schemaContext);
public XamlType(Type underlyingType, System.Xaml.XamlSchemaContext schemaContext);
new System.Xaml.XamlType : Type * System.Xaml.XamlSchemaContext -> System.Xaml.XamlType
Public Sub New (underlyingType As Type, schemaContext As XamlSchemaContext)

Parâmetros

underlyingType
Type

O CLR Type subjacente para o tipo XAML a construir.

schemaContext
XamlSchemaContext

Contexto de esquema XAML para leitores ou escritores XAML.

Exceções

Um ou mais de underlyingType ou schemaContext são null.

Aplica-se a

XamlType(String, IList<XamlType>, XamlSchemaContext)

Inicializa uma nova instância da XamlType classe com base num nome de string para o tipo.

protected:
 XamlType(System::String ^ typeName, System::Collections::Generic::IList<System::Xaml::XamlType ^> ^ typeArguments, System::Xaml::XamlSchemaContext ^ schemaContext);
protected XamlType(string typeName, System.Collections.Generic.IList<System.Xaml.XamlType> typeArguments, System.Xaml.XamlSchemaContext schemaContext);
new System.Xaml.XamlType : string * System.Collections.Generic.IList<System.Xaml.XamlType> * System.Xaml.XamlSchemaContext -> System.Xaml.XamlType
Protected Sub New (typeName As String, typeArguments As IList(Of XamlType), schemaContext As XamlSchemaContext)

Parâmetros

typeName
String

O nome do tipo a criar.

typeArguments
IList<XamlType>

Os argumentos de tipo para um XamlType que representam um tipo genérico. Pode ser (e muitas vezes é) null, o que indica que o tipo representado não é um tipo genérico.

schemaContext
XamlSchemaContext

Contexto de esquema XAML para leitores e escritores XAML.

Exceções

Um ou mais de typeName ou schemaContext são null.

Observações

Isto é um construtor protegido. Atualmente não existem classes públicas derivadas que utilizem este caminho específico para construção. Como consumidor do existente XamlType, deve usar as outras assinaturas do construtor (XamlType(Type, XamlSchemaContext, XamlTypeInvoker), XamlType(Type, XamlSchemaContext), ou XamlType(String, String, IList<XamlType>, XamlSchemaContext)) para inicializar um XamlType objeto.

Aplica-se a

XamlType(Type, XamlSchemaContext, XamlTypeInvoker)

Inicializa uma nova instância da XamlType classe com base na informação do tipo subjacente e numa XamlTypeInvoker implementação.

public:
 XamlType(Type ^ underlyingType, System::Xaml::XamlSchemaContext ^ schemaContext, System::Xaml::Schema::XamlTypeInvoker ^ invoker);
public XamlType(Type underlyingType, System.Xaml.XamlSchemaContext schemaContext, System.Xaml.Schema.XamlTypeInvoker invoker);
new System.Xaml.XamlType : Type * System.Xaml.XamlSchemaContext * System.Xaml.Schema.XamlTypeInvoker -> System.Xaml.XamlType
Public Sub New (underlyingType As Type, schemaContext As XamlSchemaContext, invoker As XamlTypeInvoker)

Parâmetros

underlyingType
Type

O tipo subjacente para o tipo XAML a construir.

schemaContext
XamlSchemaContext

Contexto do esquema XAML para o leitor XAML.

invoker
XamlTypeInvoker

A XamlTypeInvoker implementação que gere chamadas de reflexão em tempo de execução contra o XamlType.

Exceções

Um ou mais de underlyingType ou schemaContext são null.

Aplica-se a

XamlType(String, String, IList<XamlType>, XamlSchemaContext)

Inicializa uma nova instância da XamlType classe com base no namespace XAML e num nome de string para o tipo. Este construtor destina-se exclusivamente à análise e registo de nós XAML de usos de tipos que se sabe não terem suporte no sistema de tipos de suporte e no contexto do esquema XAML.

public:
 XamlType(System::String ^ unknownTypeNamespace, System::String ^ unknownTypeName, System::Collections::Generic::IList<System::Xaml::XamlType ^> ^ typeArguments, System::Xaml::XamlSchemaContext ^ schemaContext);
public XamlType(string unknownTypeNamespace, string unknownTypeName, System.Collections.Generic.IList<System.Xaml.XamlType> typeArguments, System.Xaml.XamlSchemaContext schemaContext);
new System.Xaml.XamlType : string * string * System.Collections.Generic.IList<System.Xaml.XamlType> * System.Xaml.XamlSchemaContext -> System.Xaml.XamlType
Public Sub New (unknownTypeNamespace As String, unknownTypeName As String, typeArguments As IList(Of XamlType), schemaContext As XamlSchemaContext)

Parâmetros

unknownTypeNamespace
String

O espaço de nomes XAML para o tipo, como uma cadeia.

unknownTypeName
String

O nome do tipo no espaço de nomes XAML fornecido unknownTypeNamespace .

typeArguments
IList<XamlType>

Os argumentos de tipo para um XamlType que representam um tipo genérico. Pode ser (e muitas vezes é) null, o que indica que o tipo representado não é um tipo genérico.

schemaContext
XamlSchemaContext

Contexto de esquema XAML para leitores ou escritores XAML.

Exceções

Um ou mais de unknownTypeNamespace, unknownTypeName, ou schemaContext são null.

Observações

Use este construtor apenas para tipos "desconhecidos" onde um tipo XAML que corresponde a um sistema de tipos subjacente não está disponível. Este construtor pode não produzir um resultado onde XamlType.IsUnknown seja true. Em vez disso, a lógica refletora padrão reporta o tipo subjacente como XamlLanguage.Object. No entanto, este comportamento pode mudar devido à LookupIsUnknown sobreposição.

Aplica-se a