.NET 소스코드 찾아보다 느낀점
부끄럽지만 그동안 .NET 소스코드를 찾아본 적이 없었다.
잠깐씩 블록단위로 본적은 있어도 이번처럼 심도있게 본적은 없었다.
TransactionScope은 어떻게 Nested Transaction이 가능하도록 구현했는지 궁금해서 찾아보기 시작했다.
찾아보다가 내부적으로 CommittableTransaction이라는 객체를 이용하는 것을 봤다.
그러다가 나도 모르는 사이에 TransactionScope에서 벗어나서
CommittableTransaction 클래스를 열심히 공부하고 있었다.
그러다가 문득 '아니 나 이거 왜 보고 있지?'하고 MS docs를 찾기 시작했다.
역시나 docs.microsoft.com에 문서화되어 있었다.
다음에 오픈소스를 볼 때는 문서화된 것과 아닌 것들을 잘 구분해서 시간을 절약해야겠다.
https://docs.microsoft.com/en-us/dotnet/api/system.transactions.committabletransaction?view=net-6.0
CommittableTransaction Class (System.Transactions)
Describes a committable transaction.
docs.microsoft.com
.NET 소스코드는 아래에서 볼 수 있다.
https://github.com/dotnet/runtime
GitHub - dotnet/runtime: .NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps. - GitHub - dotnet/runtime: .NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
github.com