Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / SecureProtocols / AuthenticatedStream.cs / 1305376 / 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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- linebase.cs
- StyleCollection.cs
- BaseCodeDomTreeGenerator.cs
- BroadcastEventHelper.cs
- IgnoreSection.cs
- RenameRuleObjectDialog.cs
- PageThemeCodeDomTreeGenerator.cs
- TreeView.cs
- AttributeQuery.cs
- NegotiateStream.cs
- PageParserFilter.cs
- BrowserDefinition.cs
- DataSourceBooleanViewSchemaConverter.cs
- SafePointer.cs
- odbcmetadatacollectionnames.cs
- DataFormats.cs
- EnumerableRowCollection.cs
- TextDecorationLocationValidation.cs
- EnumBuilder.cs
- ChameleonKey.cs
- X509Certificate2Collection.cs
- OperationGenerator.cs
- ArrayExtension.cs
- DbConnectionHelper.cs
- SQLInt64.cs
- TransformProviderWrapper.cs
- CodeParameterDeclarationExpressionCollection.cs
- Property.cs
- EntityClientCacheEntry.cs
- SortQuery.cs
- RayMeshGeometry3DHitTestResult.cs
- Cursor.cs
- Options.cs
- WebPartTransformer.cs
- Visual3D.cs
- MaskedTextBox.cs
- DesignerForm.cs
- EpmCustomContentWriterNodeData.cs
- GeneralTransformGroup.cs
- NetworkInformationException.cs
- Model3DCollection.cs
- Transactions.cs
- UrlPath.cs
- JsonSerializer.cs
- XmlParserContext.cs
- Int16Animation.cs
- TextDecorations.cs
- FontFamilyValueSerializer.cs
- UriScheme.cs
- MenuCommandService.cs
- InternalMappingException.cs
- TaskCanceledException.cs
- AffineTransform3D.cs
- Substitution.cs
- XmlSerializerAssemblyAttribute.cs
- DependencyPropertyValueSerializer.cs
- XsltLibrary.cs
- InputLangChangeRequestEvent.cs
- Int32Animation.cs
- SourceInterpreter.cs
- DiagnosticsConfigurationHandler.cs
- DelayedRegex.cs
- CodeNamespaceImportCollection.cs
- validation.cs
- BamlBinaryWriter.cs
- WaitHandle.cs
- TimeSpanSecondsConverter.cs
- OleDbRowUpdatedEvent.cs
- XmlDataCollection.cs
- SynchronizationHandlesCodeDomSerializer.cs
- DataColumn.cs
- Expressions.cs
- RewritingPass.cs
- BuildProvider.cs
- ControlBindingsCollection.cs
- ControlEvent.cs
- MarshalByRefObject.cs
- NameObjectCollectionBase.cs
- DispatcherProcessingDisabled.cs
- RenderDataDrawingContext.cs
- WindowsEditBox.cs
- CompilationUnit.cs
- WorkflowServiceNamespace.cs
- DispatcherHookEventArgs.cs
- NegationPusher.cs
- SplitterEvent.cs
- WindowsEditBoxRange.cs
- EntityClassGenerator.cs
- UriGenerator.cs
- RecognitionEventArgs.cs
- SQLInt64Storage.cs
- ListMarkerSourceInfo.cs
- SpAudioStreamWrapper.cs
- ManifestSignedXml.cs
- ValidationSummary.cs
- CalendarAutomationPeer.cs
- ExtentJoinTreeNode.cs
- PagedControl.cs
- PixelFormat.cs
- UserNameSecurityTokenProvider.cs