| ISharedObjects Interface |
Namespace: Sdl.FileTypeSupport.Framework.NativeApi
The ISharedObjects type exposes the following members.
| Name | Description | |
|---|---|---|
| GetSharedObjectT |
Gets the shared object with the specified id; cast to the specified type.
If no object with this id is shared, the method returns null. If an object
with the specified id exists, but is not of the specified type, an exception
is thrown.
| |
| PublishSharedObject |
Any component may publish objects to be shared by calling this method.
The object will be added to the available shared objects, and the SharedObjectPublished
event will be raised.
|
| Name | Description | |
|---|---|---|
| SharedObjectIds |
Iterator for the ids of all currently published shared objects
| |
| SharedObjects |
Iterator for all currently published shared objects
| |
| SharedObjectsWithIds |
Iterator for all currently published shared objects and their associated ids
as key/value pairs, in which the id acts as the key.
|
| Name | Description | |
|---|---|---|
| SharedObjectPublished |
Raised if an additional object is published by some component.
|
Shared objects can be accessed directly using a key (an id), or by iterating over the collection. The SharedObjectPublished event is raised if additional shared objects are published. Any component can publish shared objects by calling PublishSharedObject(String, Object, IdConflictResolution).
Shared objects can be used for a number of purposes. Below are some examples:
The host application may pass a translation memory interface as a shared object to the components used for processing a file. A file type supporting 3rd party XLIFF may look for such an object, and if found, use it to populate the translation memory with embedded translation suggestions from >alt-trans< elements in the XLIFF file.
SDL Trados Studio may want to pass settings bundles to file processing components. Publishing the settings bundle as a shared object will make it available to any file type components that implement this interface. Components can query for the settings bundle, and if found, they can then use it.
A native content processor may communicate information to a native parser via a shared object.