コード例 #1
0
ファイル: ScratchPad.cs プロジェクト: Rhombulus/Mime
 public static void Begin()
 {
     if (_pad == null)
         _pad = new ScratchPadContainer();
     else
         _pad.AddRef();
 }
コード例 #2
0
        public static void Begin()
        {
            var pad = (ScratchPadContainer)Thread.GetData(scratchPadTlsSlot);

            if (pad == null)
            {
                pad = new ScratchPadContainer();

                Thread.SetData(scratchPadTlsSlot, pad);
            }
            else
            {
                pad.AddRef();
            }
        }
コード例 #3
0
ファイル: ScratchPad.cs プロジェクト: Rhombulus/Mime
 public static void End()
 {
     if (_pad == null || !_pad.Release())
         return;
     _pad = null;
 }