src/Microsoft.DocAsCode.Build.Engine/ResourceFileReaders/ArchiveResourceReader.cs
/// <summary>
/// TODO: This is not thread safe, only expose GetResource in interface
/// </summary>
/// <param name="name"></param>
/// <returns></returns>
This is not thread safe, only expose GetResource in interface
This is not thread safe only expose GetResource in interface
public override Stream GetResourceStream(string name)
        {
            if (IsEmpty) return null;
            lock (_locker)
            {
                var memoryStream = new MemoryStream();
                using (var stream = GetResourceStreamCore(name))
                {
                    if (stream == null)
                    {
                        return null;
                    }
                    stream.CopyTo(memoryStream);
                }
                memoryStream.Seek(0, SeekOrigin.Begin);
                return memoryStream;
            }
        }
public override Stream GetResourceStream ( string name ) { if ( IsEmpty ) return null ; lock ( _locker ) { var memoryStream = new MemoryStream ( ) ; using ( var stream = GetResourceStreamCore ( name ) ) { if ( stream == null ) { return null ; } stream . CopyTo ( memoryStream ) ; } memoryStream . Seek ( 0 , SeekOrigin . Begin ) ; return memoryStream ; } }
TODO: This is not thread safe, only expose GetResource in interface
TODO : This is not thread safe only expose GetResource in interface
None
name
string
None