Click or drag to resize
ISharedObjects Interface
Implemented by the framework to provide access to objects that have been published in order to be shared across components used for content processing. Components that are 'interested' in shared objects receive an instance of this interface by implementing ISharedObjectsAware.

Namespace: Sdl.FileTypeSupport.Framework.NativeApi
Assembly: Sdl.FileTypeSupport.Framework.Core (in Sdl.FileTypeSupport.Framework.Core.dll) Version: 1.0.0.0 (1.0.2551.0)
Syntax
public interface ISharedObjects

The ISharedObjects type exposes the following members.

Properties
  NameDescription
Public propertySharedObjectIds
Iterator for the ids of all currently published shared objects
Public propertySharedObjects
Iterator for all currently published shared objects
Public propertySharedObjectsWithIds
Iterator for all currently published shared objects and their associated ids as key/value pairs, in which the id acts as the key.
Top
Methods
  NameDescription
Public methodGetSharedObjectT
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.
Public methodPublishSharedObject
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.
Top
Events
  NameDescription
Public eventSharedObjectPublished
Raised if an additional object is published by some component.
Top
Remarks

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.

See Also
Community
Edit

Be the first to Edit the community content of this topic.
Comments