Table of Contents

Class IdGenerator

Namespace
Framework.Common.Id
Assembly
Assembly-CSharp.dll

Thread-safe 단조 증가 uint ID 생성기. 0은 예약값(미초기화 상태 표현).

public static class IdGenerator
Inheritance
object
IdGenerator

Remarks

Interlocked.Increment로 멀티스레드 환경에서도 안전하게 사용 가능. 앱 수명 동안 단조 증가하며 재사용하지 않는다.

Methods

Next()

Thread-safe 단조 증가 ID 반환. 0은 절대 반환하지 않음.

public static uint Next()

Returns

uint

1 이상의 고유 uint ID.