Transaction Transaction Transaction Transaction Class

정의

트랜잭션을 나타냅니다.Represents a transaction.

public ref class Transaction : IDisposable, System::Runtime::Serialization::ISerializable
[System.Serializable]
public class Transaction : IDisposable, System.Runtime.Serialization.ISerializable
type Transaction = class
    interface IDisposable
    interface ISerializable
Public Class Transaction
Implements IDisposable, ISerializable
상속
TransactionTransactionTransactionTransaction
파생
특성
구현

설명

System.Transactions 네임스페이스는 Transaction 클래스 기반의 명시적 프로그래밍 모델과 TransactionScope 클래스를 사용하는 암시적 프로그래밍 모델을 둘 다 제공합니다. 후자의 경우 인프라에서 자동으로 트랜잭션을 관리합니다.The System.Transactions namespace provides both an explicit programming model based on the Transaction class, as well as an implicit programming model using the TransactionScope class, in which transactions are automatically managed by the infrastructure. 암시적 모델을 쉽게 사용 하 여 개발을 위한 매우 권장 합니다.We recommend highly that you use the easier implicit model for development. 시작 하려면 참조는 구현 하는 암시적 트랜잭션을 사용 하 여 트랜잭션 범위 항목입니다.To get started, see the Implementing An Implicit Transaction Using Transaction Scope topic. 트랜잭션 애플리케이션 작성에 대 한 자세한 내용은 참조 하세요. 쓰기는 트랜잭션 애플리케이션합니다.For more information on writing a transactional application, see Writing A Transactional Application.

Transaction 클래스에 인 리스트 먼 트에 대 한 리소스 관리자를 구현 하는 개발자가 사용 하는 메서드가 포함 되어 있습니다.The Transaction class contains methods used by developers implementing resource managers for enlistment. 또한 트랜잭션을 복제 하 고 현재 트랜잭션 컨텍스트를 제어 하기 위한 기능을 제공 합니다.It also provides functionalities for cloning a transaction and controlling the current transaction context. 정적을 사용 하 여, 설정 된 경우 현재 트랜잭션을 가져올 수 있습니다 Current 속성입니다.You can obtain the current transaction, if one is set, using the static Current property.

속성

Current Current Current Current

앰비언트 트랜잭션을 가져오거나 설정합니다.Gets or sets the ambient transaction.

IsolationLevel IsolationLevel IsolationLevel IsolationLevel

트랜잭션의 격리 수준을 가져옵니다.Gets the isolation level of the transaction.

PromoterType PromoterType PromoterType PromoterType

트랜잭션을 승격할 때 확장 메서드에서 반환한 byte[]의 형식을 고유하게 식별합니다.Uniquely identifies the format of the byte[] returned by the Promote method when the transaction is promoted.

TransactionInformation TransactionInformation TransactionInformation TransactionInformation

트랜잭션에 대한 추가 정보를 검색합니다.Retrieves additional information about a transaction.

메서드

BeginCommitInternal(AsyncCallback) BeginCommitInternal(AsyncCallback) BeginCommitInternal(AsyncCallback) BeginCommitInternal(AsyncCallback)
Clone() Clone() Clone() Clone()

트랜잭션의 복제본을 만듭니다.Creates a clone of the transaction.

DependentClone(DependentCloneOption) DependentClone(DependentCloneOption) DependentClone(DependentCloneOption) DependentClone(DependentCloneOption)

트랜잭션의 종속 복제본을 만듭니다.Creates a dependent clone of the transaction.

Dispose() Dispose() Dispose() Dispose()

개체에서 보유하는 리소스를 해제합니다.Releases the resources that are held by the object.

EndCommitInternal(IAsyncResult) EndCommitInternal(IAsyncResult) EndCommitInternal(IAsyncResult) EndCommitInternal(IAsyncResult)
EnlistDurable(Guid, IEnlistmentNotification, EnlistmentOptions) EnlistDurable(Guid, IEnlistmentNotification, EnlistmentOptions) EnlistDurable(Guid, IEnlistmentNotification, EnlistmentOptions) EnlistDurable(Guid, IEnlistmentNotification, EnlistmentOptions)

트랜잭션에 참여할 2단계 커밋을 지원하는 영속적 리소스 관리자를 참여시킵니다.Enlists a durable resource manager that supports two phase commit to participate in a transaction.

EnlistDurable(Guid, ISinglePhaseNotification, EnlistmentOptions) EnlistDurable(Guid, ISinglePhaseNotification, EnlistmentOptions) EnlistDurable(Guid, ISinglePhaseNotification, EnlistmentOptions) EnlistDurable(Guid, ISinglePhaseNotification, EnlistmentOptions)

트랜잭션에 참여할 1단계 커밋 최적화를 지원하는 영속적 리소스 관리자를 참여시킵니다.Enlists a durable resource manager that supports single phase commit optimization to participate in a transaction.

EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification) EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification) EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification) EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification)

PSPE(Promotable Single Phase Enlistment)를 통해 내부 트랜잭션이 있는 리소스 관리자를 등록합니다.Enlists a resource manager that has an internal transaction using a promotable single phase enlistment (PSPE).

EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification, Guid) EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification, Guid) EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification, Guid) EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification, Guid)

PSPE(Promotable Single Phase Enlistment)를 통해 내부 트랜잭션이 있는 리소스 관리자를 등록합니다.Enlists a resource manager that has an internal transaction using a promotable single phase enlistment (PSPE).

EnlistVolatile(IEnlistmentNotification, EnlistmentOptions) EnlistVolatile(IEnlistmentNotification, EnlistmentOptions) EnlistVolatile(IEnlistmentNotification, EnlistmentOptions) EnlistVolatile(IEnlistmentNotification, EnlistmentOptions)

트랜잭션에 참여하기 위해 2단계 커밋을 지원하는 일시적 리소스 관리자를 등록합니다.Enlists a volatile resource manager that supports two phase commit to participate in a transaction.

EnlistVolatile(ISinglePhaseNotification, EnlistmentOptions) EnlistVolatile(ISinglePhaseNotification, EnlistmentOptions) EnlistVolatile(ISinglePhaseNotification, EnlistmentOptions) EnlistVolatile(ISinglePhaseNotification, EnlistmentOptions)

트랜잭션에 참여할 1단계 커밋 최적화를 지원하는 일시적 리소스 관리자를 참여시킵니다.Enlists a volatile resource manager that supports single phase commit optimization to participate in a transaction.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

이 트랜잭션과 지정된 개체가 같은지 여부를 확인합니다.Determines whether this transaction and the specified object are equal.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

이 인스턴스의 해시 코드를 반환합니다.Returns the hash code for this instance.

GetPromotedToken() GetPromotedToken() GetPromotedToken() GetPromotedToken()

트랜잭션을 승격할 때 확장 메서드가 반환한 byte[]를 가져옵니다.Gets the byte[] returned by the Promote method when the transaction is promoted.

GetType() GetType() GetType() GetType()

현재 인스턴스의 Type을 가져옵니다.Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.Creates a shallow copy of the current Object.

(Inherited from Object)
PromoteAndEnlistDurable(Guid, IPromotableSinglePhaseNotification, ISinglePhaseNotification, EnlistmentOptions) PromoteAndEnlistDurable(Guid, IPromotableSinglePhaseNotification, ISinglePhaseNotification, EnlistmentOptions) PromoteAndEnlistDurable(Guid, IPromotableSinglePhaseNotification, ISinglePhaseNotification, EnlistmentOptions) PromoteAndEnlistDurable(Guid, IPromotableSinglePhaseNotification, ISinglePhaseNotification, EnlistmentOptions)

트랜잭션에 참여할 2단계 커밋을 지원하는 영속적 리소스 관리자를 승격 및 참여시킵니다.Promotes and enlists a durable resource manager that supports two phase commit to participate in a transaction.

Rollback() Rollback() Rollback() Rollback()

트랜잭션을 롤백(중단)합니다.Rolls back (aborts) the transaction.

Rollback(Exception) Rollback(Exception) Rollback(Exception) Rollback(Exception)

트랜잭션을 롤백(중단)합니다.Rolls back (aborts) the transaction.

SetDistributedTransactionIdentifier(IPromotableSinglePhaseNotification, Guid) SetDistributedTransactionIdentifier(IPromotableSinglePhaseNotification, Guid) SetDistributedTransactionIdentifier(IPromotableSinglePhaseNotification, Guid) SetDistributedTransactionIdentifier(IPromotableSinglePhaseNotification, Guid)

비MSDTC 프로모터를 통해 생성된 분산 트랜잭션 식별자를 설정합니다.Sets the distributed transaction identifier generated by the non-MSDTC promoter.

ToString() ToString() ToString() ToString()

현재 개체를 나타내는 문자열을 반환합니다.Returns a string that represents the current object.

(Inherited from Object)

이벤트

TransactionCompleted TransactionCompleted TransactionCompleted TransactionCompleted

트랜잭션이 완료되었음을 나타냅니다.Indicates that the transaction is completed.

연산자

Equality(Transaction, Transaction) Equality(Transaction, Transaction) Equality(Transaction, Transaction) Equality(Transaction, Transaction)

지정된 두 Transaction 인스턴스가 같은지 여부를 테스트합니다.Tests whether two specified Transaction instances are equivalent.

Inequality(Transaction, Transaction) Inequality(Transaction, Transaction) Inequality(Transaction, Transaction) Inequality(Transaction, Transaction)

Transaction 인스턴스가 다른지 여부를 나타내는 값을 반환합니다.Returns a value that indicates whether two Transaction instances are not equal.

명시적 인터페이스 구현

ISerializable.GetObjectData(SerializationInfo, StreamingContext) ISerializable.GetObjectData(SerializationInfo, StreamingContext) ISerializable.GetObjectData(SerializationInfo, StreamingContext) ISerializable.GetObjectData(SerializationInfo, StreamingContext)

이 트랜잭션을 serialize하는 데 필요한 데이터가 있는 SerializationInfo를 가져옵니다.Gets a SerializationInfo with the data required to serialize this transaction.

적용 대상

스레드 보안

이 형식은 스레드로부터 안전합니다.This type is thread safe.

추가 정보