SynchronizationOption Enumeration
.NET Framework 2.0
Specifies the type of automatic synchronization requested by the component.
Namespace: System.EnterpriseServices
Assembly: System.EnterpriseServices (in system.enterpriseservices.dll)
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. | |
| 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. | |
| Supported | An object with this value participates in synchronization, if it exists. |
The following code example demonstrates the use of the SynchronizationOption type.
Imports System Imports System.EnterpriseServices Imports System.Reflection ' 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 Class SynchronizationAttribute_SynchronizationDisabled Inherits ServicedComponent End Class 'SynchronizationAttribute_SynchronizationDisabled ' 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 Class SynchronizationAttribute_SynchronizationNotSupported Inherits ServicedComponent End Class 'SynchronizationAttribute_SynchronizationNotSupported ' An instance of this class will join its caller's activity if one exists. <Synchronization(SynchronizationOption.Supported)> _ Public Class SynchronizationAttribute_SynchronizationSupported Inherits ServicedComponent End Class 'SynchronizationAttribute_SynchronizationSupported ' 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 Class SynchronizationAttribute_SynchronizationRequired Inherits ServicedComponent End Class 'SynchronizationAttribute_SynchronizationRequired ' A new activity will always be created for an instance of this class. <Synchronization(SynchronizationOption.RequiresNew)> _ Public Class SynchronizationAttribute_SynchronizationRequiresNew Inherits ServicedComponent End Class 'SynchronizationAttribute_SynchronizationRequiresNew
import System.*;
import System.EnterpriseServices.*;
import System.Reflection.*;
// 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.
/** @attribute Synchronization(SynchronizationOption.Disabled)
*/
public class SynchronizationAttribute_SynchronizationDisabled
extends ServicedComponent
{
} //SynchronizationAttribute_SynchronizationDisabled
// 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.
/** @attribute Synchronization(SynchronizationOption.NotSupported)
*/
public class SynchronizationAttribute_SynchronizationNotSupported
extends ServicedComponent
{
} //SynchronizationAttribute_SynchronizationNotSupported
// An instance of this class will join its caller's activity if one exists.
/** @attribute Synchronization(SynchronizationOption.Supported)
*/
public class SynchronizationAttribute_SynchronizationSupported
extends ServicedComponent
{
} //SynchronizationAttribute_SynchronizationSupported
// An instance of this class will join its caller's activity if one exists.
// If not, a new activity will be created for it.
/** @attribute Synchronization(SynchronizationOption.Required)
*/
public class SynchronizationAttribute_SynchronizationRequired
extends ServicedComponent
{
} //SynchronizationAttribute_SynchronizationRequired
// A new activity will always be created for an instance of this class.
/** @attribute Synchronization(SynchronizationOption.RequiresNew)
*/
public class SynchronizationAttribute_SynchronizationRequiresNew
extends ServicedComponent
{
} //SynchronizationAttribute_SynchronizationRequiresNew
Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
Community Additions
ADD
Show: