Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- SafeEventLogWriteHandle.cs
- GroupBoxAutomationPeer.cs
- ChangePassword.cs
- ApplicationFileParser.cs
- ZeroOpNode.cs
- ActivityTrace.cs
- Floater.cs
- StrokeFIndices.cs
- Ops.cs
- ProcessHostConfigUtils.cs
- OracleEncoding.cs
- SingleTagSectionHandler.cs
- LogRestartAreaEnumerator.cs
- ToolStripMenuItemDesigner.cs
- ClusterSafeNativeMethods.cs
- IntegrationExceptionEventArgs.cs
- Comparer.cs
- Propagator.Evaluator.cs
- DetailsViewRowCollection.cs
- User.cs
- ToolboxService.cs
- SctClaimSerializer.cs
- CodePageEncoding.cs
- Pair.cs
- ChannelDispatcher.cs
- TreeNodeStyleCollection.cs
- DataSpaceManager.cs
- DetailsViewUpdateEventArgs.cs
- ListBox.cs
- EmbeddedObject.cs
- ServiceProviders.cs
- CqlLexer.cs
- CommandConverter.cs
- ToolStripOverflowButton.cs
- SelectionRange.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- ReadOnlyCollectionBase.cs
- ClientProxyGenerator.cs
- NameTable.cs
- BaseTemplateCodeDomTreeGenerator.cs
- XmlElementAttribute.cs
- XmlReflectionMember.cs
- ConsoleEntryPoint.cs
- TextEffect.cs
- BinaryFormatterWriter.cs
- OleDbDataAdapter.cs
- MouseGesture.cs
- RowVisual.cs
- AdPostCacheSubstitution.cs
- PropertyTab.cs
- PersistenceTask.cs
- WebPartManagerInternals.cs
- BitmapEffectInput.cs
- IPHostEntry.cs
- MDIControlStrip.cs
- InlineUIContainer.cs
- SqlReorderer.cs
- BaseParagraph.cs
- URIFormatException.cs
- TdsParser.cs
- RegionData.cs
- InputMethod.cs
- SiteOfOriginPart.cs
- MarkedHighlightComponent.cs
- AmbientValueAttribute.cs
- ColorTypeConverter.cs
- FieldCollectionEditor.cs
- DescendantQuery.cs
- SecurityElement.cs
- SourceElementsCollection.cs
- CustomExpression.cs
- AnnotationResourceCollection.cs
- TextContainerHelper.cs
- SQLString.cs
- baseaxisquery.cs
- HScrollProperties.cs
- HtmlHistory.cs
- NaturalLanguageHyphenator.cs
- BitmapDownload.cs
- ManualResetEvent.cs
- SplashScreenNativeMethods.cs
- CurrentChangingEventArgs.cs
- FeedUtils.cs
- DetailsViewInsertEventArgs.cs
- InfiniteIntConverter.cs
- PersistNameAttribute.cs
- AuthStoreRoleProvider.cs
- GuidConverter.cs
- LayoutTable.cs
- FamilyTypeface.cs
- CacheOutputQuery.cs
- SByte.cs
- CookieHandler.cs
- ServiceSecurityAuditElement.cs
- UniqueID.cs
- WebScriptMetadataMessageEncoderFactory.cs
- UserControl.cs
- PipelineModuleStepContainer.cs
- HwndMouseInputProvider.cs
- StylusCollection.cs