System.Resources.ResourceWriter.AddResourceInternal C# (CSharp) Méthode

AddResourceInternal() private méthode

private AddResourceInternal ( string name, Stream value, bool closeAfterWrite ) : void
name string
value Stream
closeAfterWrite bool
Résultat void
        private void AddResourceInternal(string name, Stream value, bool closeAfterWrite)
        {
            if (value == null)
            {
                // Check for duplicate resources whose names vary only by case.
                _caseInsensitiveDups.Add(name, null);
                _resourceList.Add(name, value);
            }
            else
            {
                // make sure the Stream is seekable
                if (!value.CanSeek)
                    throw new ArgumentException(SR.NotSupported_UnseekableStream);
 
                // Check for duplicate resources whose names vary only by case.
                _caseInsensitiveDups.Add(name, null);
                _resourceList.Add(name, new StreamWrapper(value, closeAfterWrite));
            }
        }