C# Class nHydrate.Dsl.Design.Converters.VisibilityTypeEnumConverter.EnumFieldDescriptor

This class represents an enumeration field in the property grid.
Inheritance: SimplePropertyDescriptor
Afficher le fichier Open project: nHydrate/nHydrate

Méthodes publiques

Méthode Description
CanResetValue ( object component ) : bool

Retrieves a value indicating whether the enumeration field can be reset to the default value.

EnumFieldDescriptor ( Type componentType, string name, ITypeDescriptorContext context ) : System

Creates an instance of the enumeration field descriptor class.

GetValue ( object component ) : object

Retrieves the value of the enumeration field.

ResetValue ( object component ) : void

Resets the enumeration field to its default value.

SetValue ( object component, object value ) : void

Sets the value of the enumeration field.

ShouldSerializeValue ( object component ) : bool

Retrieves a value indicating whether the enumeration field is set to a non-default value.

Private Methods

Méthode Description
GetDefaultValue ( ) : bool

Retrieves the enumerations field’s default value.

Method Details

CanResetValue() public méthode

Retrieves a value indicating whether the enumeration field can be reset to the default value.
public CanResetValue ( object component ) : bool
component object
Résultat bool

EnumFieldDescriptor() public méthode

Creates an instance of the enumeration field descriptor class.
public EnumFieldDescriptor ( Type componentType, string name, ITypeDescriptorContext context ) : System
componentType System.Type The type of the enumeration.
name string The name of the enumeration field.
context ITypeDescriptorContext The current context.
Résultat System

GetValue() public méthode

Retrieves the value of the enumeration field.
public GetValue ( object component ) : object
component object /// The instance of the enumeration type which to retrieve the field value for. ///
Résultat object

ResetValue() public méthode

Resets the enumeration field to its default value.
public ResetValue ( object component ) : void
component object
Résultat void

SetValue() public méthode

Sets the value of the enumeration field.
public SetValue ( object component, object value ) : void
component object /// The instance of the enumeration type which to set the field value to. ///
value object /// True if the enumeration field should included to the enumeration; /// otherwise, False. ///
Résultat void

ShouldSerializeValue() public méthode

Retrieves a value indicating whether the enumeration field is set to a non-default value.
public ShouldSerializeValue ( object component ) : bool
component object
Résultat bool