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
- AvTraceDetails.cs
- SAPIEngineTypes.cs
- TextRunTypographyProperties.cs
- MultipartIdentifier.cs
- ScrollPatternIdentifiers.cs
- TextDecorations.cs
- SessionIDManager.cs
- DataGridCaption.cs
- HttpListenerPrefixCollection.cs
- contentDescriptor.cs
- OleDbFactory.cs
- CompModSwitches.cs
- BinaryFormatterSinks.cs
- XamlPointCollectionSerializer.cs
- ReadOnlyPropertyMetadata.cs
- MsmqIntegrationAppDomainProtocolHandler.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- DataControlPagerLinkButton.cs
- ServiceNameCollection.cs
- SqlExpressionNullability.cs
- ProcessProtocolHandler.cs
- IApplicationTrustManager.cs
- BitVec.cs
- UriTemplateMatchException.cs
- SequenceNumber.cs
- RectangleHotSpot.cs
- TextAction.cs
- InternalCache.cs
- DataFormats.cs
- RegexNode.cs
- RichTextBoxConstants.cs
- PresentationTraceSources.cs
- DataListItem.cs
- XmlBufferReader.cs
- Figure.cs
- FormatVersion.cs
- XmlReflectionMember.cs
- TextSelectionProcessor.cs
- IsolatedStorageFilePermission.cs
- RuntimeHelpers.cs
- CompiledAction.cs
- SessionStateSection.cs
- BaseProcessProtocolHandler.cs
- XPathNodeIterator.cs
- EntityContainerEntitySet.cs
- XmlSchemaAttributeGroupRef.cs
- RuntimeConfigLKG.cs
- ImageMapEventArgs.cs
- NameValueSectionHandler.cs
- LayoutDump.cs
- MultipleViewProviderWrapper.cs
- UrlPropertyAttribute.cs
- cookiecontainer.cs
- RequestNavigateEventArgs.cs
- EntityModelSchemaGenerator.cs
- IItemProperties.cs
- ConnectionProviderAttribute.cs
- BitmapImage.cs
- CLRBindingWorker.cs
- MD5CryptoServiceProvider.cs
- UIElementAutomationPeer.cs
- HostedHttpRequestAsyncResult.cs
- arc.cs
- NonParentingControl.cs
- PropertyCollection.cs
- EntityDataSourceSelectedEventArgs.cs
- UIElementIsland.cs
- SecurityTraceRecordHelper.cs
- PermissionRequestEvidence.cs
- ConsumerConnectionPointCollection.cs
- Material.cs
- ZipIOExtraFieldZip64Element.cs
- CorrelationToken.cs
- WorkingDirectoryEditor.cs
- Polyline.cs
- ImageBrush.cs
- MarkupExtensionReturnTypeAttribute.cs
- UniqueContractNameValidationBehavior.cs
- Separator.cs
- CharacterString.cs
- TypeHelpers.cs
- SqlErrorCollection.cs
- Literal.cs
- _IPv6Address.cs
- basecomparevalidator.cs
- EncoderNLS.cs
- designeractionlistschangedeventargs.cs
- PolicyLevel.cs
- BufferedGraphics.cs
- ListDictionaryInternal.cs
- RequiredFieldValidator.cs
- brushes.cs
- WebPartUtil.cs
- RewritingSimplifier.cs
- XMLSchema.cs
- WinFormsSpinner.cs
- DelegatingTypeDescriptionProvider.cs
- ConnectionManagementElementCollection.cs
- Cell.cs
- HtmlSelect.cs