DateTimeValueSerializer DateTimeValueSerializer DateTimeValueSerializer DateTimeValueSerializer Class

Definición

Convierte instancias de String en y desde instancias de DateTime.Converts instances of String to and from instances of DateTime.

public ref class DateTimeValueSerializer : System::Windows::Markup::ValueSerializer
public class DateTimeValueSerializer : System.Windows.Markup.ValueSerializer
type DateTimeValueSerializer = class
    inherit ValueSerializer
Public Class DateTimeValueSerializer
Inherits ValueSerializer
Herencia
DateTimeValueSerializerDateTimeValueSerializerDateTimeValueSerializerDateTimeValueSerializer

Comentarios

ValueSerializerse usa en lugar TypeConverter de en los casos en los que la conversión de tipos requiere un estado adicional.ValueSerializer is used rather than TypeConverter for cases where type conversion requires additional state. DateTimeValueSerializerno se atribuye a un tipo con ValueSerializerAttribute.DateTimeValueSerializer is not attributed to a type with ValueSerializerAttribute. Esto se debe DateTime a que está en mscorlib y mscorlib no puede tomar dependencias de clases de atributos que no se define a sí misma.This is because DateTime is in mscorlib, and mscorlib cannot take dependencies on attribute classes that it does not define itself. En su lugar, el DateTimeValueSerializer uso de es un caso especial en el comportamiento del procesador XAML en .NET Framework comportamiento de los servicios XAML.Instead, usage of DateTimeValueSerializer is special-cased into XAML processor behavior in .NET Framework XAML Services behavior.

En las versiones anteriores de la .NET Framework, esta clase existía en el ensamblado específico de WPF WindowsBase.In previous versions of the .NET Framework, this class existed in the WPF-specific assembly WindowsBase. En .NET Framework 4.NET Framework 4 ,DateTimeValueSerializer está en el ensamblado System. Xaml.In .NET Framework 4.NET Framework 4, DateTimeValueSerializer is in the System.Xaml assembly. Vea tipos migrados de WPF a System. Xaml.See Types Migrated from WPF to System.Xaml.

Constructores

DateTimeValueSerializer() DateTimeValueSerializer() DateTimeValueSerializer() DateTimeValueSerializer()

Inicializa una nueva instancia de la clase DateTimeValueSerializer.Initializes a new instance of the DateTimeValueSerializer class.

Métodos

CanConvertFromString(String, IValueSerializerContext) CanConvertFromString(String, IValueSerializerContext) CanConvertFromString(String, IValueSerializerContext) CanConvertFromString(String, IValueSerializerContext)

Determina si la String especificada puede convertirse en una instancia de DateTime.Determines if the specified String can be convert to an instance of DateTime.

CanConvertToString(Object, IValueSerializerContext) CanConvertToString(Object, IValueSerializerContext) CanConvertToString(Object, IValueSerializerContext) CanConvertToString(Object, IValueSerializerContext)

Determina si el objeto especificado se puede convertir a String.Determines if the specified object can be converted to a String.

ConvertFromString(String, IValueSerializerContext) ConvertFromString(String, IValueSerializerContext) ConvertFromString(String, IValueSerializerContext) ConvertFromString(String, IValueSerializerContext)

Convierte String a DateTime.Converts a String into a DateTime.

ConvertToString(Object, IValueSerializerContext) ConvertToString(Object, IValueSerializerContext) ConvertToString(Object, IValueSerializerContext) ConvertToString(Object, IValueSerializerContext)

Convierte una instancia de DateTime en String.Converts an instance of DateTime to a String.

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

Determina si el objeto especificado es igual al objeto actual.Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetConvertFromException(Object) GetConvertFromException(Object) GetConvertFromException(Object) GetConvertFromException(Object)

Devuelve una excepción que se va a producir cuando no puede realizarse una conversión.Returns an exception to throw when a conversion cannot be performed.

(Inherited from ValueSerializer)
GetConvertToException(Object, Type) GetConvertToException(Object, Type) GetConvertToException(Object, Type) GetConvertToException(Object, Type)

Devuelve una excepción que se va a producir cuando no puede realizarse una conversión.Returns an exception to throw when a conversion cannot be performed.

(Inherited from ValueSerializer)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Sirve como la función hash predeterminada.Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Obtiene el Type de la instancia actual.Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Crea una copia superficial del objeto Object actual.Creates a shallow copy of the current Object.

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

Devuelve una cadena que representa el objeto actual.Returns a string that represents the current object.

(Inherited from Object)
TypeReferences(Object, IValueSerializerContext) TypeReferences(Object, IValueSerializerContext) TypeReferences(Object, IValueSerializerContext) TypeReferences(Object, IValueSerializerContext)

Obtiene una enumeración de los tipos a los que hace referencia ValueSerializer.Gets an enumeration of the types referenced by the ValueSerializer.

(Inherited from ValueSerializer)

Se aplica a

Consulte también: