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

This class represents an enumeration field in the property grid.
Inheritance: SimplePropertyDescriptor
Show file Open project: nHydrate/nHydrate

Public Methods

Method 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

Method Description
GetDefaultValue ( ) : bool

Retrieves the enumerations field’s default value.

Method Details

CanResetValue() public method

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

EnumFieldDescriptor() public method

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.
return System

GetValue() public method

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. ///
return object

ResetValue() public method

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

SetValue() public method

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. ///
return void

ShouldSerializeValue() public method

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