ReferenceConverter Classe

Definição

Fornece um conversor de tipo para converter referências de objetos de e para outras representações.Provides a type converter to convert object references to and from other representations.

public ref class ReferenceConverter : System::ComponentModel::TypeConverter
public class ReferenceConverter : System.ComponentModel.TypeConverter
type ReferenceConverter = class
    inherit TypeConverter
Public Class ReferenceConverter
Inherits TypeConverter
Herança
ReferenceConverter
Derivado

Comentários

O ReferenceConverter normalmente é usado dentro do contexto de componentes do site ou de um ambiente de design.The ReferenceConverter is typically used within the context of sited components or a design environment. Sem um site de componente ou um utilizável ITypeDescriptorContext , esse conversor é de pouco uso.Without a component site or a usable ITypeDescriptorContext, this converter is of little use.

Esse conversor converte uma referência de um objeto que implementa a IComponent interface e exibe suas propriedades na janela Propriedades .This converter converts a reference of an object that implements the IComponent interface and displays its properties in the Properties window.

Para obter mais informações sobre conversores de tipo, consulte a TypeConverter classe base e como: implementar um conversor de tipo.For more information about type converters, see the TypeConverter base class and How to: Implement a Type Converter.

Observação

Você nunca deve criar uma instância da ReferenceConverter classe.You should never create an instance of the ReferenceConverter class. Em vez disso, chame o GetConverter método da TypeDescriptor classe.Instead, call the GetConverter method of the TypeDescriptor class. Para obter mais informações, consulte os exemplos na TypeConverter classe base.For more information, see the examples in the TypeConverter base class.

Essa classe fornece o IsValueAllowed método para verificar se um determinado valor pode ser adicionado à coleção de valores padrão.This class provides the IsValueAllowed method to check whether a particular value can be added to the standard values collection. Se você não quiser adicionar o valor à coleção, substitua esse método.If you do not want to add the value to the collection, override this method.

Notas aos Herdeiros

Substitua o IsValueAllowed(ITypeDescriptorContext, Object) método quando não quiser adicionar um valor à coleção de valores padrão.Override the IsValueAllowed(ITypeDescriptorContext, Object) method when you do not want to add a value to the standard values collection.

Construtores

ReferenceConverter(Type)

Inicializa uma nova instância da classe ReferenceConverter.Initializes a new instance of the ReferenceConverter class.

Métodos

CanConvertFrom(ITypeDescriptorContext, Type)

Obtém um valor que indica se este conversor pode converter um objeto no tipo de origem especificado para um objeto de referência usando o contexto especificado.Gets a value indicating whether this converter can convert an object in the given source type to a reference object using the specified context.

CanConvertFrom(Type)

Retorna se este conversor pode converter um objeto do tipo indicado para o tipo deste conversor.Returns whether this converter can convert an object of the given type to the type of this converter.

(Herdado de TypeConverter)
CanConvertTo(ITypeDescriptorContext, Type)

Retorna se esse conversor pode converter o objeto para o tipo especificado, usando o contexto especificado.Returns whether this converter can convert the object to the specified type, using the specified context.

(Herdado de TypeConverter)
CanConvertTo(Type)

Retorna se esse conversor pode converter o objeto para o tipo especificado.Returns whether this converter can convert the object to the specified type.

(Herdado de TypeConverter)
ConvertFrom(ITypeDescriptorContext, CultureInfo, Object)

Converte o objeto fornecido no tipo de referência.Converts the given object to the reference type.

ConvertFrom(Object)

Converte o valor fornecido noo tipo deste conversor.Converts the given value to the type of this converter.

(Herdado de TypeConverter)
ConvertFromInvariantString(ITypeDescriptorContext, String)

Converte a cadeia de caracteres fornecida para o tipo deste conversor usando a cultura invariável e o contexto especificado.Converts the given string to the type of this converter, using the invariant culture and the specified context.

(Herdado de TypeConverter)
ConvertFromInvariantString(String)

Converte a cadeia de caracteres fornecida para o tipo deste conversor usando a cultura invariável.Converts the given string to the type of this converter, using the invariant culture.

(Herdado de TypeConverter)
ConvertFromString(ITypeDescriptorContext, CultureInfo, String)

Converte o texto fornecido em um objeto, usando o contexto e a informação de cultura especificados.Converts the given text to an object, using the specified context and culture information.

(Herdado de TypeConverter)
ConvertFromString(ITypeDescriptorContext, String)

Converte o texto fornecido em um objeto, usando o contexto especificado.Converts the given text to an object, using the specified context.

(Herdado de TypeConverter)
ConvertFromString(String)

Converte o texto especificado em um objeto.Converts the specified text to an object.

(Herdado de TypeConverter)
ConvertTo(ITypeDescriptorContext, CultureInfo, Object, Type)

Converte o objeto de valor especificado no tipo de referência usando o contexto e os argumentos especificados.Converts the given value object to the reference type using the specified context and arguments.

ConvertTo(Object, Type)

Converte o objeto de valor especificado para o tipo especificado, usando os argumentos.Converts the given value object to the specified type, using the arguments.

(Herdado de TypeConverter)
ConvertToInvariantString(ITypeDescriptorContext, Object)

Converte o valor especificado em uma representação de cadeia de caracteres que não varia de acordo com a cultura, usando o contexto especificado.Converts the specified value to a culture-invariant string representation, using the specified context.

(Herdado de TypeConverter)
ConvertToInvariantString(Object)

Converte o valor especificado em uma representação de cadeia de caracteres invariável da cultura.Converts the specified value to a culture-invariant string representation.

(Herdado de TypeConverter)
ConvertToString(ITypeDescriptorContext, CultureInfo, Object)

Converte o valor especificado em uma representação de cadeia de caracteres, usando as informações de contexto e cultura especificadas.Converts the given value to a string representation, using the specified context and culture information.

(Herdado de TypeConverter)
ConvertToString(ITypeDescriptorContext, Object)

Converte o valor especificado em uma representação de cadeia de caracteres, usando o contexto fornecido.Converts the given value to a string representation, using the given context.

(Herdado de TypeConverter)
ConvertToString(Object)

Converte o valor especificado em uma representação de cadeia de caracteres.Converts the specified value to a string representation.

(Herdado de TypeConverter)
CreateInstance(IDictionary)

Recria um Object dado um conjunto de valores de propriedade do objeto.Re-creates an Object given a set of property values for the object.

(Herdado de TypeConverter)
CreateInstance(ITypeDescriptorContext, IDictionary)

Cria uma instância do tipo ao qual esse TypeConverter está associado, usando o contexto especificado, dado um conjunto de valores de propriedade para o objeto.Creates an instance of the type that this TypeConverter is associated with, using the specified context, given a set of property values for the object.

(Herdado de TypeConverter)
Equals(Object)

Determina se o objeto especificado é igual ao objeto atual.Determines whether the specified object is equal to the current object.

(Herdado de Object)
GetConvertFromException(Object)

Retorna uma exceção a ser gerada quando uma conversão não puder ser executada.Returns an exception to throw when a conversion cannot be performed.

(Herdado de TypeConverter)
GetConvertToException(Object, Type)

Retorna uma exceção a ser gerada quando uma conversão não puder ser executada.Returns an exception to throw when a conversion cannot be performed.

(Herdado de TypeConverter)
GetCreateInstanceSupported()

Retorna se a alteração de um valor neste objeto requer uma chamada ao método CreateInstance(IDictionary) para criar um novo valor.Returns whether changing a value on this object requires a call to the CreateInstance(IDictionary) method to create a new value.

(Herdado de TypeConverter)
GetCreateInstanceSupported(ITypeDescriptorContext)

Retorna se a alteração de um valor neste objeto requer uma chamada para CreateInstance(IDictionary) para criar um novo valor, usando o contexto especificado.Returns whether changing a value on this object requires a call to CreateInstance(IDictionary) to create a new value, using the specified context.

(Herdado de TypeConverter)
GetHashCode()

Serve como a função de hash padrão.Serves as the default hash function.

(Herdado de Object)
GetProperties(ITypeDescriptorContext, Object)

Retorna uma coleção de propriedades para o tipo de matriz especificado pelo parâmetro de valor, usando o contexto especificado.Returns a collection of properties for the type of array specified by the value parameter, using the specified context.

(Herdado de TypeConverter)
GetProperties(ITypeDescriptorContext, Object, Attribute[])

Retorna uma coleção de propriedades para o tipo de matriz especificado pelo parâmetro de valor, usando o contexto e os atributos especificados.Returns a collection of properties for the type of array specified by the value parameter, using the specified context and attributes.

(Herdado de TypeConverter)
GetProperties(Object)

Retorna uma coleção de propriedades para o tipo de matriz especificado pelo parâmetro de valor.Returns a collection of properties for the type of array specified by the value parameter.

(Herdado de TypeConverter)
GetPropertiesSupported()

Retorna se este objeto dá suporte a propriedades.Returns whether this object supports properties.

(Herdado de TypeConverter)
GetPropertiesSupported(ITypeDescriptorContext)

Retorna se este objeto é compatível com as propriedades, usando o contexto especificado.Returns whether this object supports properties, using the specified context.

(Herdado de TypeConverter)
GetStandardValues()

Retorna uma coleção de valores padrão do contexto padrão para o tipo de dados para o qual esse conversor de tipo foi criado.Returns a collection of standard values from the default context for the data type this type converter is designed for.

(Herdado de TypeConverter)
GetStandardValues(ITypeDescriptorContext)

Obtém uma coleção de valores padrão para o tipo de dados de referência.Gets a collection of standard values for the reference data type.

GetStandardValuesExclusive()

Retorna se a coleção de valores padrão retornada de GetStandardValues() é uma lista exclusiva.Returns whether the collection of standard values returned from GetStandardValues() is an exclusive list.

(Herdado de TypeConverter)
GetStandardValuesExclusive(ITypeDescriptorContext)

Obtém um valor que indica se a lista de valores padrão retornada do GetStandardValues(ITypeDescriptorContext) é uma lista exclusiva.Gets a value indicating whether the list of standard values returned from GetStandardValues(ITypeDescriptorContext) is an exclusive list.

GetStandardValuesSupported()

Retorna se este objeto dá suporte a um conjunto padrão de valores que podem ser escolhidos em uma lista.Returns whether this object supports a standard set of values that can be picked from a list.

(Herdado de TypeConverter)
GetStandardValuesSupported(ITypeDescriptorContext)

Obtém um valor que indica se esse objeto é compatível com um conjunto padrão de valores que podem ser escolhidos de uma lista.Gets a value indicating whether this object supports a standard set of values that can be picked from a list.

GetType()

Obtém o Type da instância atual.Gets the Type of the current instance.

(Herdado de Object)
IsValid(ITypeDescriptorContext, Object)

Retorna se o objeto de valor fornecido é válido para esse tipo e para o contexto especificado.Returns whether the given value object is valid for this type and for the specified context.

(Herdado de TypeConverter)
IsValid(Object)

Retorna se o objeto de valor especificado é válido para esse tipo.Returns whether the given value object is valid for this type.

(Herdado de TypeConverter)
IsValueAllowed(ITypeDescriptorContext, Object)

Retorna um valor que indica se um valor específico pode ser adicionado à coleção de valores padrão.Returns a value indicating whether a particular value can be added to the standard values collection.

MemberwiseClone()

Cria uma cópia superficial do Object atual.Creates a shallow copy of the current Object.

(Herdado de Object)
SortProperties(PropertyDescriptorCollection, String[])

Classifica uma coleção de propriedades.Sorts a collection of properties.

(Herdado de TypeConverter)
ToString()

Retorna uma cadeia de caracteres que representa o objeto atual.Returns a string that represents the current object.

(Herdado de Object)

Aplica-se a