WorkItem Members
Defines the work item into which smart parts run.
The following tables list the members exposed by the WorkItem type.
Public Constructors
Name | Description | |
---|---|---|
WorkItem | Initializes a new instance of the WorkItem class. |
Top
Public Properties
(see also Protected Properties )
Name | Description | |
---|---|---|
Commands | List of commands registered with the WorkItem. | |
EventTopics | Returns a collection describing the EventTopic objects in this WorkItem. | |
ID | Gets/sets the ID of this WorkItem. The ID is used for persistence of the WorkItem. By default, the ID will be a GUID. If you set a new ID, the old state data will be lost and replaced with new, empty state. | |
Items | Gets a list of all the objects and services contained in this WorkItem. | |
Parent | Gets the parent WorkItem. | |
RootWorkItem | Gets the root WorkItem (the one at the top of the hierarchy). | |
Services | Returns the collection of services associated with this WorkItem. | |
SmartParts | Returns a collection describing the child smart parts (objects with the SmartPartAttribute applied to them) in this WorkItem. | |
State | Gets the State associated with this WorkItem. | |
Status | Gets the current WorkItemStatus of the WorkItem. | |
TraceSource | Sets the TraceSource used by the WorkItem to log messages. | |
UIExtensionSites | Returns a collection of UIExtensionSites in the WorkItem. | |
WorkItems | Returns a collection describing the child WorkItem objects in this WorkItem. | |
Workspaces | Returns a collection describing the IWorkspace objects in this WorkItem. |
Top
Protected Properties
Name | Description | |
---|---|---|
InnerBuilder | Provides protected access to the builder contained within the workitem. | |
InnerLocator | Provides protected access to the locator contained within the workitem. |
Top
Public Methods
(see also Protected Methods )
Name | Description | |
---|---|---|
Activate | Activates the WorkItem. | |
Deactivate | Deactivates the WorkItem. | |
DeleteState | Deletes the saved state of the WorkItem. The local copy of the state is not changed. | |
Dispose | Overloaded. | |
Equals | Overloaded. (Inherited from Object.) | |
GetHashCode | (Inherited from Object.) | |
GetSmartPartInfo | Returns smart part information for a control. | |
GetType | (Inherited from Object.) | |
InitializeWorkItem | Initializes the WorkItem after construction. This method is typically called by the parent WorkItem during the process of building a new child WorkItem. | |
Load | Loads the work item. | |
OnBuiltUp | See OnBuiltUp for more information. | |
OnTearingDown | See OnTearingDown for more information. | |
ReferenceEquals | (Inherited from Object.) | |
RegisterSmartPartInfo | Registers a ISmartPartInfo view data for a given control. | |
Run | Runs the work item by calling the OnRunStarted method, which will raise the RunStarted event and eventually the custom starting business logic a derived class placed on it. | |
Save | Saves the state of this work item. | |
Terminate | Terminates the work item. | |
ToString | (Inherited from Object.) |
Top
Protected Methods
Name | Description | |
---|---|---|
BuildUp | Used when the creator of a root WorkItem needs to ensure that the WorkItem has properly built itself (so its dependencies get injected properly). | |
CreateCommand | Called to create a new Command instance to add to the Commands collection. | |
CreateEventTopic | Called to create a new EventTopic instance to add to the EventTopics collection. | |
Dispose | Overloaded. | |
Finalize | (Inherited from Object.) | |
FinishInitialization | Finishes the initialization of WorkItem classes by calling the IWorkItemExtensionService and OnInitialized. For root WorkItems, this will be called by the CabApplication after the modules are loaded (so root WorkItem extensions work). For child WorkItems, this will be called during OnBuiltUp automatically. | |
InitializeRootWorkItem | Initializes a root WorkItem. Intended to be called by the user who creates the first WorkItem using new. Subsequent child WorkItem classes are automatically initialized through dependency injection from their parent. | |
InitializeServices | Initializes the built-in services exposed by the WorkItem. | |
MemberwiseClone | (Inherited from Object.) | |
OnActivated | Fires the Activated event. | |
OnActivating | Fires the Activating event. | |
OnDeactivated | Fires the Deactivated event. | |
OnDeactivating | Fires the Deactivating event. | |
OnDisposed | Fires the Disposed event. | |
OnIdChanged | Fires the IdChanged event. | |
OnInitialized | Fires the Initialized event. | |
OnObjectAdded | Fires the ObjectRemoved event. | |
OnObjectRemoved | Fires the ObjectRemoved event. | |
OnRunStarted | Fires the RunStarted event. Derived classes can override this method to place custom business logic to execute when the Run method is called on the WorkItem. | |
OnTerminated | Fires the Terminated event. | |
OnTerminating | Fires the Terminating event. |
Top
Public Events
Name | Description | |
---|---|---|
Activated | Occurs when the WorkItem is activated. | |
Activating | Occurs when the WorkItem is activating. | |
Deactivated | Occurs when the WorkItem is deactivated. | |
Deactivating | Occurs when the WorkItem is deactivated. | |
Disposed | Occurs when the WorkItem is disposed. | |
IdChanged | Occurs when the ID is changed. | |
Initialized | Occurs when the WorkItem is initialized. | |
RunStarted | Occurs when the Run method is executed. | |
Terminated | Occurs when the WorkItem is terminated. | |
Terminating | Occurs before a WorkItem is terminated. |
Top