Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- TextCharacters.cs
- XmlEncoding.cs
- LostFocusEventManager.cs
- SessionPageStatePersister.cs
- TextParaLineResult.cs
- DataControlCommands.cs
- RoleManagerEventArgs.cs
- LocalizationComments.cs
- WebHeaderCollection.cs
- CDSsyncETWBCLProvider.cs
- ServiceBuildProvider.cs
- AuthenticationService.cs
- WCFBuildProvider.cs
- XamlTemplateSerializer.cs
- Axis.cs
- SqlProvider.cs
- ClientBuildManagerTypeDescriptionProviderBridge.cs
- SQLChars.cs
- _WinHttpWebProxyDataBuilder.cs
- DocobjHost.cs
- DataGridViewColumnHeaderCell.cs
- ValueSerializer.cs
- TypeDescriptionProvider.cs
- FileReader.cs
- WpfKnownMemberInvoker.cs
- ExclusiveTcpListener.cs
- BasicCommandTreeVisitor.cs
- AgileSafeNativeMemoryHandle.cs
- DataGridrowEditEndingEventArgs.cs
- VirtualizingPanel.cs
- EllipticalNodeOperations.cs
- AppDomainManager.cs
- PropertySegmentSerializer.cs
- GridViewPageEventArgs.cs
- Image.cs
- ResXFileRef.cs
- FormView.cs
- OracleParameterBinding.cs
- ModelItemKeyValuePair.cs
- Page.cs
- BindingWorker.cs
- CodeDOMProvider.cs
- StreamMarshaler.cs
- XmlAttributeProperties.cs
- StateInitializationDesigner.cs
- Timeline.cs
- ObjectContextServiceProvider.cs
- XmlObjectSerializerWriteContextComplexJson.cs
- SimpleApplicationHost.cs
- RSAOAEPKeyExchangeDeformatter.cs
- ObjectAssociationEndMapping.cs
- AppSecurityManager.cs
- RSACryptoServiceProvider.cs
- QilPatternFactory.cs
- DnsPermission.cs
- RbTree.cs
- DecimalConverter.cs
- DbConnectionPoolCounters.cs
- FixedPosition.cs
- ConfigXmlWhitespace.cs
- CrossContextChannel.cs
- Validator.cs
- BitmapDecoder.cs
- WorkBatch.cs
- DesignerEventService.cs
- HelpHtmlBuilder.cs
- BidOverLoads.cs
- Polyline.cs
- XmlHierarchicalDataSourceView.cs
- ISessionStateStore.cs
- LicenseManager.cs
- DataGridViewSelectedCellCollection.cs
- PropertyRecord.cs
- HiddenFieldPageStatePersister.cs
- StrokeCollection2.cs
- ToolStripSplitButton.cs
- ChannelTraceRecord.cs
- PseudoWebRequest.cs
- EdmItemError.cs
- _Rfc2616CacheValidators.cs
- XPathSelfQuery.cs
- MsdtcClusterUtils.cs
- CodeCatchClauseCollection.cs
- SudsWriter.cs
- UiaCoreProviderApi.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- FontNameEditor.cs
- XPathParser.cs
- SafeNativeMethods.cs
- PagesSection.cs
- ApplicationGesture.cs
- GPStream.cs
- Int32Rect.cs
- TextParaLineResult.cs
- SqlUtils.cs
- DbXmlEnabledProviderManifest.cs
- Point.cs
- remotingproxy.cs
- HandlerWithFactory.cs
- MsmqBindingBase.cs