Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / Net / System / Net / SecureProtocols / AuthenticatedStream.cs / 1 / AuthenticatedStream.cs
/*++ Copyright (c) 2003 Microsoft Corporation Module Name: AuthenticatedStream.cs Abstract: A public contact for a base abstract authenticated stream. Author: Alexei Vopilov Sept 28-2003 Revision History: --*/ namespace System.Net.Security { using System; using System.IO; using System.Threading; using System.Security.Permissions; using System.Security.Principal; public abstract class AuthenticatedStream: Stream { private Stream _InnerStream; private bool _LeaveStreamOpen; protected AuthenticatedStream(Stream innerStream, bool leaveInnerStreamOpen) { if (innerStream == null || innerStream == Stream.Null) { throw new ArgumentNullException("innerStream"); } if (!innerStream.CanRead || !innerStream.CanWrite) { throw new ArgumentException(SR.GetString(SR.net_io_must_be_rw_stream), "innerStream"); } _InnerStream = innerStream; _LeaveStreamOpen = leaveInnerStreamOpen; } public bool LeaveInnerStreamOpen { get { return _LeaveStreamOpen; } } // // protected Stream InnerStream { get { return _InnerStream; } } // // protected override void Dispose(bool disposing) { #if DEBUG using (GlobalLog.SetThreadKind(ThreadKinds.User)) { #endif try { if (disposing) { if (_LeaveStreamOpen) { _InnerStream.Flush(); } else { _InnerStream.Close(); } } } finally { base.Dispose(disposing); } #if DEBUG } #endif } // // General informational properties // public abstract bool IsAuthenticated {get;} public abstract bool IsMutuallyAuthenticated {get;} public abstract bool IsEncrypted {get;} public abstract bool IsSigned {get;} public abstract bool IsServer {get;} } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. /*++ Copyright (c) 2003 Microsoft Corporation Module Name: AuthenticatedStream.cs Abstract: A public contact for a base abstract authenticated stream. Author: Alexei Vopilov Sept 28-2003 Revision History: --*/ namespace System.Net.Security { using System; using System.IO; using System.Threading; using System.Security.Permissions; using System.Security.Principal; public abstract class AuthenticatedStream: Stream { private Stream _InnerStream; private bool _LeaveStreamOpen; protected AuthenticatedStream(Stream innerStream, bool leaveInnerStreamOpen) { if (innerStream == null || innerStream == Stream.Null) { throw new ArgumentNullException("innerStream"); } if (!innerStream.CanRead || !innerStream.CanWrite) { throw new ArgumentException(SR.GetString(SR.net_io_must_be_rw_stream), "innerStream"); } _InnerStream = innerStream; _LeaveStreamOpen = leaveInnerStreamOpen; } public bool LeaveInnerStreamOpen { get { return _LeaveStreamOpen; } } // // protected Stream InnerStream { get { return _InnerStream; } } // // protected override void Dispose(bool disposing) { #if DEBUG using (GlobalLog.SetThreadKind(ThreadKinds.User)) { #endif try { if (disposing) { if (_LeaveStreamOpen) { _InnerStream.Flush(); } else { _InnerStream.Close(); } } } finally { base.Dispose(disposing); } #if DEBUG } #endif } // // General informational properties // public abstract bool IsAuthenticated {get;} public abstract bool IsMutuallyAuthenticated {get;} public abstract bool IsEncrypted {get;} public abstract bool IsSigned {get;} public abstract bool IsServer {get;} } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XmlDataDocument.cs
- SafeProcessHandle.cs
- Validator.cs
- MinimizableAttributeTypeConverter.cs
- CustomAssemblyResolver.cs
- CompositeFontParser.cs
- HttpFileCollection.cs
- SiteMapNode.cs
- WebPartDisplayModeEventArgs.cs
- PathGeometry.cs
- TimelineGroup.cs
- ClientSession.cs
- coordinator.cs
- PerfCounters.cs
- CardSpaceSelector.cs
- StringInfo.cs
- TextBlockAutomationPeer.cs
- WorkflowService.cs
- XPathNodeList.cs
- SiteMapDataSourceDesigner.cs
- QuaternionRotation3D.cs
- ControlBuilderAttribute.cs
- NetworkInformationException.cs
- Point4D.cs
- ZipIOCentralDirectoryBlock.cs
- SoapCodeExporter.cs
- _DomainName.cs
- _ChunkParse.cs
- ThreadInterruptedException.cs
- NetworkStream.cs
- invalidudtexception.cs
- Span.cs
- UnionExpr.cs
- XmlSchemaInfo.cs
- TrustManagerPromptUI.cs
- TextSimpleMarkerProperties.cs
- DesignBinding.cs
- HttpHostedTransportConfiguration.cs
- ToolboxItemFilterAttribute.cs
- Brush.cs
- TransformPattern.cs
- XmlQueryTypeFactory.cs
- ExtenderHelpers.cs
- Menu.cs
- IntPtr.cs
- SubMenuStyleCollection.cs
- HttpChannelBindingToken.cs
- ShapingEngine.cs
- ProcessModelSection.cs
- coordinatorscratchpad.cs
- FrameworkObject.cs
- EmptyControlCollection.cs
- RolePrincipal.cs
- AuthenticationModulesSection.cs
- SqlGenerator.cs
- RecognizerBase.cs
- DbParameterCollection.cs
- BinaryObjectInfo.cs
- PopOutPanel.cs
- OleDbConnectionFactory.cs
- SoapAttributeOverrides.cs
- httpapplicationstate.cs
- WebPartEditVerb.cs
- DockPanel.cs
- CallbackValidator.cs
- assertwrapper.cs
- EventLogPropertySelector.cs
- XpsImage.cs
- DrawingDrawingContext.cs
- CachingHintValidation.cs
- WebExceptionStatus.cs
- DataPagerField.cs
- LogStream.cs
- Shape.cs
- CodeDOMUtility.cs
- ClassicBorderDecorator.cs
- TemplateEditingService.cs
- TimersDescriptionAttribute.cs
- PermissionAttributes.cs
- BlobPersonalizationState.cs
- DBConcurrencyException.cs
- OperationAbortedException.cs
- EdgeProfileValidation.cs
- XmlSchemaComplexContentExtension.cs
- DnsPermission.cs
- XslCompiledTransform.cs
- XslTransformFileEditor.cs
- SiteMapNode.cs
- PlaceHolder.cs
- SamlAdvice.cs
- MemberCollection.cs
- ToolStripOverflow.cs
- CSharpCodeProvider.cs
- PixelShader.cs
- InlineCollection.cs
- AlternateViewCollection.cs
- Authorization.cs
- CqlLexerHelpers.cs
- ArrayHelper.cs
- SvcMapFileSerializer.cs