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
- FacetChecker.cs
- EncryptedReference.cs
- GridItemCollection.cs
- DesignerOptionService.cs
- TextAutomationPeer.cs
- NavigationCommands.cs
- DataSourceUtil.cs
- EmptyReadOnlyDictionaryInternal.cs
- Span.cs
- TargetControlTypeAttribute.cs
- ConfigXmlCDataSection.cs
- AnimatedTypeHelpers.cs
- unsafenativemethodsother.cs
- MessageAction.cs
- DataGridLinkButton.cs
- InkCanvasInnerCanvas.cs
- TextBox.cs
- FirewallWrapper.cs
- ChangesetResponse.cs
- WebPartExportVerb.cs
- WebException.cs
- WindowsGraphicsCacheManager.cs
- LinkLabelLinkClickedEvent.cs
- RepeaterItemCollection.cs
- Maps.cs
- AddInEnvironment.cs
- OleDbDataAdapter.cs
- TransmissionStrategy.cs
- ListBindingConverter.cs
- Parameter.cs
- GlyphsSerializer.cs
- HttpCachePolicyBase.cs
- xmlsaver.cs
- ConnectionPoint.cs
- MultipleViewProviderWrapper.cs
- PeerValidationBehavior.cs
- StringReader.cs
- TypeElement.cs
- LinkClickEvent.cs
- WindowsFormsLinkLabel.cs
- FixedSOMPageElement.cs
- WindowsIdentity.cs
- SiteMapDataSource.cs
- BinaryConverter.cs
- HostingEnvironmentSection.cs
- SystemTcpStatistics.cs
- WindowsUserNameSecurityTokenAuthenticator.cs
- SmiGettersStream.cs
- COM2ExtendedBrowsingHandler.cs
- GestureRecognizer.cs
- BooleanToVisibilityConverter.cs
- PolyQuadraticBezierSegment.cs
- BindingEditor.xaml.cs
- StylusDevice.cs
- BaseComponentEditor.cs
- ObsoleteAttribute.cs
- NotFiniteNumberException.cs
- SQLResource.cs
- WebPartZone.cs
- DispatchChannelSink.cs
- SHA384Cng.cs
- DataGridTextBox.cs
- DataControlImageButton.cs
- MULTI_QI.cs
- TemplateControlBuildProvider.cs
- WebPartEventArgs.cs
- NestedContainer.cs
- ScopelessEnumAttribute.cs
- ScriptControl.cs
- FormsAuthenticationCredentials.cs
- KeyPressEvent.cs
- HtmlTableRowCollection.cs
- ListBox.cs
- SocketPermission.cs
- FunctionParameter.cs
- DtdParser.cs
- AffineTransform3D.cs
- ThreadStaticAttribute.cs
- MailAddress.cs
- DataSet.cs
- SecurityChannel.cs
- dtdvalidator.cs
- xmlsaver.cs
- UserPersonalizationStateInfo.cs
- ListControl.cs
- MenuBase.cs
- ListDataBindEventArgs.cs
- EdmSchemaError.cs
- ColumnResizeAdorner.cs
- DataControlFieldHeaderCell.cs
- EdmMember.cs
- QuotedPrintableStream.cs
- BoolExpressionVisitors.cs
- EditorZoneDesigner.cs
- ParserHooks.cs
- DataGridItemAutomationPeer.cs
- CompilationUtil.cs
- RangeBase.cs
- HtmlEmptyTagControlBuilder.cs
- UrlMappingCollection.cs