C# Class Timestamper.TimestampClassExtension

Inheritance: IClassExtension, IObjectClassExtension, IFeatureClassExtension, IObjectClassEvents, IObjectClassInfo
显示文件 Open project: Esri/arcobjects-sdk-community-samples Class Usage Examples

Public Methods

Method Description
CanBypassStoreMethod ( ) : System.Boolean

Indicates if updates to objects can bypass the Store method and OnChange notifications for efficiency.

Init ( IClassHelper classHelper, IPropertySet extensionProperties ) : void

Initializes the extension.

OnChange ( IObject obj ) : void

Fired when an object's attributes or geometry is updated.

OnCreate ( IObject obj ) : void

Fired when a new object is created.

OnDelete ( IObject obj ) : void

Fired when an object is deleted.

SetTimestampFields ( String createdField, String modifiedField, String userField ) : void

Changes the member variables and extension properties to store the provided field names as the created, modified and user fields (positions are also refreshed). Empty strings indicate the values should not be saved in a field.

Shutdown ( ) : void

Informs the extension that the class is being disposed of.

Private Methods

Method Description
GetCurrentUser ( ) : String

Gets the name of the extension's user. For local geodatabases, this is the username as known by the operating system (in a domain\username format). For remote geodatabases, the IDatabaseConnectionInfo interface is utilized.

InitNewExtension ( ) : void

This method should be called the first time the extension is initialized, when the extension properties are null. This will create a new set of properties with the default field names.

RegisterFunction ( Type registerType ) : void
SetFieldIndexes ( ) : void

Finds the positions of the created, modified and user fields, and verifies that the specified field has the correct data type.

UnregisterFunction ( Type registerType ) : void

Method Details

CanBypassStoreMethod() public method

Indicates if updates to objects can bypass the Store method and OnChange notifications for efficiency.
public CanBypassStoreMethod ( ) : System.Boolean
return System.Boolean

Init() public method

Initializes the extension.
public Init ( IClassHelper classHelper, IPropertySet extensionProperties ) : void
classHelper IClassHelper Provides a reference to the extension's class.
extensionProperties IPropertySet A set of properties unique to the extension.
return void

OnChange() public method

Fired when an object's attributes or geometry is updated.
public OnChange ( IObject obj ) : void
obj IObject The updated object.
return void

OnCreate() public method

Fired when a new object is created.
public OnCreate ( IObject obj ) : void
obj IObject The new object.
return void

OnDelete() public method

Fired when an object is deleted.
public OnDelete ( IObject obj ) : void
obj IObject The deleted object.
return void

SetTimestampFields() public method

Changes the member variables and extension properties to store the provided field names as the created, modified and user fields (positions are also refreshed). Empty strings indicate the values should not be saved in a field.
public SetTimestampFields ( String createdField, String modifiedField, String userField ) : void
createdField String The name of the "created" field.
modifiedField String The name of the "modified" field.
userField String The name of the "user" field.
return void

Shutdown() public method

Informs the extension that the class is being disposed of.
public Shutdown ( ) : void
return void