This documentation is archived and is not being maintained.
SynchronizationOption Enumeration
Visual Studio 2010
Specifies the type of automatic synchronization requested by the component.
Assembly: System.EnterpriseServices (in System.EnterpriseServices.dll)
| Member name | Description | |
|---|---|---|
| Disabled | COM+ ignores the synchronization requirements of the component when determining context for the object. | |
| NotSupported | An object with this value never participates in synchronization, regardless of the status of its caller. This setting is only available for components that are non-transactional and do not use just-in-time (JIT) activation. | |
| Supported | An object with this value participates in synchronization, if it exists. | |
| Required | Ensures that all objects created from the component are synchronized. | |
| RequiresNew | An object with this value must participate in a new synchronization where COM+ manages contexts and apartments on behalf of all components involved in the call. |
The following code example demonstrates the use of the SynchronizationOption type.
#using <System.EnterpriseServices.dll> using namespace System; using namespace System::EnterpriseServices; // References: // System.EnterpriseServices // An instance of this class will not join an activity, but can share its // caller's context even if its caller is configured as NotSupported, // Supported, Required, or RequiresNew. [Synchronization(SynchronizationOption::Disabled)] public ref class SynchronizationAttribute_SynchronizationDisabled : public ServicedComponent { }; // An instance of this class will not join an activity, and will share its // caller's context only if its caller is also configured as NotSupported. [Synchronization(SynchronizationOption::NotSupported)] public ref class SynchronizationAttribute_SynchronizationNotSupported : public ServicedComponent { }; // An instance of this class will join its caller's activity if one exists. [Synchronization(SynchronizationOption::Supported)] public ref class SynchronizationAttribute_SynchronizationSupported : public ServicedComponent { }; // An instance of this class will join its caller's activity if one exists. // If not, a new activity will be created for it. [Synchronization(SynchronizationOption::Required)] public ref class SynchronizationAttribute_SynchronizationRequired : public ServicedComponent { }; // A new activity will always be created for an instance of this class. [Synchronization(SynchronizationOption::RequiresNew)] public ref class SynchronizationAttribute_SynchronizationRequiresNew : public ServicedComponent { };
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: