C# Class ArcDataBinding.FieldPropertyDescriptor

This class provides a PropertyDescriptor for a single field of an IRow
This class can be used by an ITypedList implementation to provide a property description for a single field in an ITable.
Inheritance: System.ComponentModel.PropertyDescriptor
Datei anzeigen Open project: Esri/arcobjects-sdk-community-samples Class Usage Examples

Public Methods

Method Description
CanResetValue ( object component ) : bool

Returns whether resetting an object changes its value.

FieldPropertyDescriptor ( ITable wrappedTable, string fieldName, int fieldIndex ) : System

Initializes a new instance of the FieldPropertyDescriptor class.

GetValue ( object component ) : object

Gets the current value of the property on a component.

This will return the field value for all fields apart from geometry, raster and Blobs. These fields will return the string equivalent of the geometry type.

ResetValue ( object component ) : void

Resets the value for this property of the component to the default value.

SetValue ( object component, object value ) : void

Sets the value of the component to a different value.

If the field this instance represents does not have a coded value domain, this method simply sets the given value and stores the row within an edit operation. If the field does have a coded value domain, the method first needs to check that the given value is valid. If we are displaying the coded values, the value passed to this method will be a string and we will need to see if it is one of the names in the cv domain. If we are not displaying the coded values, we will still need to check that the given value is within the domain. If the value is not within the domain, an error will be displayed and the method will return. Note that the string comparison is case sensitive.

ShouldSerializeValue ( object component ) : bool

When overridden in a derived class, determines a value indicating whether the value of this property needs to be persisted.

Private Methods

Method Description
EsriFieldTypeToSystemType ( IField field ) : Type

Converts the specified ESRI field type to a .NET type.

GetGeometryTypeAsString ( object value ) : string

Gets the geometry type as string.

Method Details

CanResetValue() public method

Returns whether resetting an object changes its value.
public CanResetValue ( object component ) : bool
component object The component to test for reset capability. /// This will be an IRow
return bool

FieldPropertyDescriptor() public method

Initializes a new instance of the FieldPropertyDescriptor class.
public FieldPropertyDescriptor ( ITable wrappedTable, string fieldName, int fieldIndex ) : System
wrappedTable ITable The wrapped table.
fieldName string Name of the field within wrappedTable.
fieldIndex int Index of the field within wrappedTable.
return System

GetValue() public method

Gets the current value of the property on a component.
This will return the field value for all fields apart from geometry, raster and Blobs. These fields will return the string equivalent of the geometry type.
public GetValue ( object component ) : object
component object The component (an IRow) with the property for /// which to retrieve the value.
return object

ResetValue() public method

Resets the value for this property of the component to the default value.
public ResetValue ( object component ) : void
component object The component (an IRow) with the property value /// that is to be reset to the default value.
return void

SetValue() public method

Sets the value of the component to a different value.
If the field this instance represents does not have a coded value domain, this method simply sets the given value and stores the row within an edit operation. If the field does have a coded value domain, the method first needs to check that the given value is valid. If we are displaying the coded values, the value passed to this method will be a string and we will need to see if it is one of the names in the cv domain. If we are not displaying the coded values, we will still need to check that the given value is within the domain. If the value is not within the domain, an error will be displayed and the method will return. Note that the string comparison is case sensitive.
public SetValue ( object component, object value ) : void
component object The component (an IRow) with the property value /// that is to be set.
value object The new value.
return void

ShouldSerializeValue() public method

When overridden in a derived class, determines a value indicating whether the value of this property needs to be persisted.
public ShouldSerializeValue ( object component ) : bool
component object The component (an IRow) with the property to be examined for /// persistence.
return bool