System.Net.GZipWrapperStream.BeginRead C# (CSharp) Метод

BeginRead() публичный Метод

public BeginRead ( byte buffer, int offset, int size, AsyncCallback callback, Object state ) : IAsyncResult
buffer byte
offset int
size int
callback AsyncCallback
state Object
Результат IAsyncResult
        public override IAsyncResult BeginRead(byte[] buffer, int offset, int size, AsyncCallback callback, Object state) {
            
            if (buffer==null) {
                throw new ArgumentNullException("buffer");
            }
            if (offset<0 || offset>buffer.Length) {
                throw new ArgumentOutOfRangeException("offset");
            }
            if (size<0 || size>buffer.Length-offset) {
                throw new ArgumentOutOfRangeException("size");
            }
            
            try{
                return base.BeginRead(buffer, offset, size, callback, state);
            }
            catch(Exception e){
                try{
                    if (NclUtilities.IsFatal(e)) throw;
                    if(e is System.IO.InvalidDataException || e is InvalidOperationException || e is IndexOutOfRangeException){
                        Close();
                    }
                }
                catch{
                }
                throw e;
            }
        }