コード例 #1
0
ファイル: PdbWriter.cs プロジェクト: CAPCHIK/roslyn
 internal PdbLogger(bool logging)
 {
     _logging = logging;
     if (logging)
     {
         // do not get this from pool
         // we need a fairly large buffer here (where the pool typically contains small ones)
         // and we need just one per compile session
         // pooling will be couter-productive in such scenario
         _logData = new BlobBuilder(bufferFlushLimit);
         _incrementalHash = IncrementalHash.Create(AssemblyHashAlgorithm.Sha1);
     }
     else
     {
         _logData = null;
         _incrementalHash = null;
     }
 }
コード例 #2
0
 internal static void AppendData(this IncrementalHash hash, ArraySegment <byte> segment)
 {
     hash.AppendData(segment.Array, segment.Offset, segment.Count);
 }
コード例 #3
0
 internal static void AppendData(this IncrementalHash hash, ArraySegment <byte> segment)
 {
     RoslynDebug.AssertNotNull(segment.Array);
     hash.AppendData(segment.Array, segment.Offset, segment.Count);
 }