The ProducerConsumerImportProvider class provides a base class for import providers that use a producer-consumer pattern.
This class provides a simple implementation of the producer-consumer pattern, and allows the developer to focus on the import logic, rather than the threading logic. Implementers implement the mandatory methods that enumerate the raw objects of type TObject, and provide the logic to convert these objects into CSEntryChange objects. The provider takes care of constructing the CSEntryChanges and passing them back to the sync engine.
A method that is called when the CSEntryChange has been completed, but before it is returned to the sync engine. Override this method to inspect or modify the CSEntryChange before it is returned to the sync engine
Parameters
csentry CSEntryChange
The CSEntryChange object that has been created
A method that is called when the CSEntryChange has been created, but before any attribute changes have been added to it. Override this method to inspect or modify the CSEntryChange before any attributes have been added to it
Parameters
csentry CSEntryChange
The CSEntryChange object that has been created
A method that is called when the object has been retrieved from the source, but before it is converted into a CSEntryChange object. Override this method to inspect or modify the object before it is converted into a CSEntryChange object
Parameters
item TObject
The object that has been retrieved from the source
Task
A task that represents the asynchronous operation
OnInitializeAsync()
A method that is called when the provider is initialized, but before any objects are retrieved from the source. Override this method to perform any initialization logic
Returns
Task
A task that represents the asynchronous operation
OnStartProducerAsync()
A method that is called when the provider is initialized, but before any objects are retrieved from the source. Override this method to perform any initialization logic required to start producing objects
Returns
Task
A task that represents the asynchronous operation
OnCompleteProducerAsync()
A method that is called when the provider has finished producing objects. Override this method to perform any cleanup logic required after all objects have been produced
Returns
Task
A task that represents the asynchronous operation
OnStartConsumerAsync()
A method that is called when the provider has started consuming objects. Override this method to perform any initialization logic required to start consuming objects
Returns
Task
A task that represents the asynchronous operation
OnCompleteConsumerAsync()
A method that is called when the provider has finished consuming objects. Override this method to perform any cleanup logic required after all objects have been consumed and the provider is about to be terminated
Returns
Task
A task that represents the asynchronous operation
GetAnchorAttributesAsync(TObject)
Gets the list of AnchorAttributes for the specified object
Parameters
item TObject
The object to get the AnchorAttributes for