コード例 #1
0
 // Must call this from derived class' constructors.
 protected void BaseConstruction(Interop.HttpApi.HTTP_REQUEST *requestBlob)
 {
     if (requestBlob != null)
     {
         _memoryBlob = requestBlob;
     }
 }
コード例 #2
0
 // ReleasePins() should be called exactly once.  It must be called before Dispose() is called, which means it must be called
 // before an object (HttpListenerRequest) which closes the RequestContext on demand is returned to the application.
 internal void ReleasePins()
 {
     Debug.Assert(_memoryBlob != null || _backingBuffer == IntPtr.Zero, "RequestContextBase::ReleasePins()|ReleasePins() called twice.");
     _originalBlobAddress = _memoryBlob;
     UnsetBlob();
     OnReleasePins();
 }
コード例 #3
0
ファイル: RequestContextBase.cs プロジェクト: dotnet/corefx
 // ReleasePins() should be called exactly once.  It must be called before Dispose() is called, which means it must be called
 // before an object (HttpListenerReqeust) which closes the RequestContext on demand is returned to the application.
 internal void ReleasePins()
 {
     Debug.Assert(_memoryBlob != null || _backingBuffer == null, "RequestContextBase::ReleasePins()|ReleasePins() called twice.");
     _originalBlobAddress = _memoryBlob;
     UnsetBlob();
     OnReleasePins();
 }
コード例 #4
0
 protected void UnsetBlob()
 {
     if (_memoryBlob != null)
     {
         GC.SuppressFinalize(this);
     }
     _memoryBlob = null;
 }
コード例 #5
0
        protected void SetBlob(Interop.HttpApi.HTTP_REQUEST *requestBlob)
        {
            Debug.Assert(_memoryBlob != null || _backingBuffer == IntPtr.Zero, "RequestContextBase::Dispose()|SetBlob() called after ReleasePins().");
            if (requestBlob == null)
            {
                UnsetBlob();
                return;
            }

            _memoryBlob = requestBlob;
        }
コード例 #6
0
ファイル: RequestContextBase.cs プロジェクト: dotnet/corefx
 // Must call this from derived class' constructors.
 protected void BaseConstruction(Interop.HttpApi.HTTP_REQUEST* requestBlob)
 {
     if (requestBlob == null)
     {
         GC.SuppressFinalize(this);
     }
     else
     {
         _memoryBlob = requestBlob;
     }
 }
コード例 #7
0
 // Must call this from derived class' constructors.
 protected void BaseConstruction(Interop.HttpApi.HTTP_REQUEST *requestBlob)
 {
     if (requestBlob == null)
     {
         GC.SuppressFinalize(this);
     }
     else
     {
         _memoryBlob = requestBlob;
     }
 }
コード例 #8
0
 protected void UnsetBlob()
 {
     _memoryBlob = null;
 }
コード例 #9
0
ファイル: RequestContextBase.cs プロジェクト: dotnet/corefx
        protected void SetBlob(Interop.HttpApi.HTTP_REQUEST* requestBlob)
        {
            Debug.Assert(_memoryBlob != null || _backingBuffer == null, "RequestContextBase::Dispose()|SetBlob() called after ReleasePins().");
            if (requestBlob == null)
            {
                UnsetBlob();
                return;
            }

            if (_memoryBlob == null)
            {
                GC.ReRegisterForFinalize(this);
            }
            _memoryBlob = requestBlob;
        }
コード例 #10
0
ファイル: RequestContextBase.cs プロジェクト: dotnet/corefx
 protected void UnsetBlob()
 {
     if (_memoryBlob != null)
     {
         GC.SuppressFinalize(this);
     }
     _memoryBlob = null;
 }