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
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- BitSet.cs
- ProtectedConfigurationSection.cs
- CodeLinePragma.cs
- String.cs
- SessionEndingEventArgs.cs
- InstanceKeyCompleteException.cs
- shaperfactoryquerycacheentry.cs
- WebPartEditorOkVerb.cs
- MachineKeyConverter.cs
- KeyGestureConverter.cs
- ConnectionDemuxer.cs
- WebInvokeAttribute.cs
- ProxyWebPartManager.cs
- ColorAnimationUsingKeyFrames.cs
- ParseNumbers.cs
- Activation.cs
- TimerElapsedEvenArgs.cs
- ISAPIWorkerRequest.cs
- InvokePatternIdentifiers.cs
- WebServiceReceiveDesigner.cs
- EntityDataSourceWrapper.cs
- GridPatternIdentifiers.cs
- HttpWebRequestElement.cs
- ContentPlaceHolder.cs
- RecordsAffectedEventArgs.cs
- TagMapCollection.cs
- BindingOperations.cs
- ClientOptions.cs
- DispatcherEventArgs.cs
- SqlTypeSystemProvider.cs
- BmpBitmapEncoder.cs
- BamlLocalizer.cs
- FtpCachePolicyElement.cs
- DoubleAnimationClockResource.cs
- ClientEventManager.cs
- PersonalizationProviderHelper.cs
- StackSpiller.Temps.cs
- CompiledRegexRunner.cs
- BackgroundWorker.cs
- safemediahandle.cs
- ReadOnlyDataSource.cs
- ModuleBuilderData.cs
- UpdateExpressionVisitor.cs
- DataGridCell.cs
- ObjectQueryExecutionPlan.cs
- AnimationClock.cs
- ValueType.cs
- XhtmlBasicCommandAdapter.cs
- KnownTypeAttribute.cs
- ObjectViewFactory.cs
- FactoryId.cs
- IRCollection.cs
- httpserverutility.cs
- WrappedIUnknown.cs
- XmlSchemaSet.cs
- translator.cs
- SimpleTextLine.cs
- UrlPath.cs
- SolidColorBrush.cs
- ProcessThreadDesigner.cs
- RangeBaseAutomationPeer.cs
- CreationContext.cs
- SafePointer.cs
- PersonalizationStateQuery.cs
- PathFigure.cs
- ScriptManager.cs
- ListViewDeleteEventArgs.cs
- CharAnimationBase.cs
- TextSearch.cs
- MissingFieldException.cs
- sqlcontext.cs
- SqlCommandSet.cs
- IndexingContentUnit.cs
- MessageDescription.cs
- HitTestFilterBehavior.cs
- SingleConverter.cs
- _NetRes.cs
- PropertyMapper.cs
- WriteStateInfoBase.cs
- ResourceReader.cs
- XmlEncoding.cs
- SafeLibraryHandle.cs
- PropertyManager.cs
- EditingMode.cs
- TrustVersion.cs
- AspCompat.cs
- DependencyPropertyKey.cs
- HtmlInputButton.cs
- TreeNodeCollection.cs
- SafeWaitHandle.cs
- AppDomainProtocolHandler.cs
- CollectionView.cs
- InvalidPropValue.cs
- NetSectionGroup.cs
- HierarchicalDataSourceControl.cs
- TypeReference.cs
- DecoderReplacementFallback.cs
- SpeechEvent.cs
- FormViewPagerRow.cs
- ApplicationProxyInternal.cs