İngilizce dilinde oku

Aracılığıyla paylaş


SynchronizationOption Sabit listesi

Tanım

Bileşen tarafından istenen otomatik eşitleme türünü belirtir.

C#
[System.Serializable]
public enum SynchronizationOption
Devralma
SynchronizationOption
Öznitelikler

Alanlar

Name Değer Description
Disabled 0

COM+, nesnenin bağlamını belirlerken bileşenin eşitleme gereksinimlerini yoksayar.

NotSupported 1

Bu değere sahip bir nesne, çağıranın durumundan bağımsız olarak hiçbir zaman eşitlemeye katılmaz. Bu ayar yalnızca işlemsel olmayan ve tam zamanında (JIT) etkinleştirme kullanmayan bileşenler için kullanılabilir.

Required 3

Bileşenden oluşturulan tüm nesnelerin eşitlenmesini sağlar.

RequiresNew 4

Bu değere sahip bir nesne, COM+'nın çağrıya katılan tüm bileşenler adına bağlamları ve daireleri yönettiği yeni bir eşitlemeye katılmalıdır.

Supported 2

Bu değere sahip bir nesne varsa eşitlemeye katılır.

Örnekler

Aşağıdaki kod örneğinde türün kullanımı gösterilmektedir SynchronizationOption .

C#
using System;
using System.EnterpriseServices;
using 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 :
    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 class SynchronizationAttribute_SynchronizationNotSupported :
    ServicedComponent
{
}

// An instance of this class will join its caller's activity if one exists.
[Synchronization(SynchronizationOption.Supported)]
public class SynchronizationAttribute_SynchronizationSupported :
    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 class SynchronizationAttribute_SynchronizationRequired :
    ServicedComponent
{
}

// A new activity will always be created for an instance of this class.
[Synchronization(SynchronizationOption.RequiresNew)]
public class SynchronizationAttribute_SynchronizationRequiresNew :
    ServicedComponent
{
}

Şunlara uygulanır

Ürün Sürümler
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1