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
- ResourceWriter.cs
- BaseUriHelper.cs
- AsyncCodeActivity.cs
- ConfigXmlAttribute.cs
- MobileCategoryAttribute.cs
- RemoteWebConfigurationHostServer.cs
- documentsequencetextcontainer.cs
- QualificationDataAttribute.cs
- XmlAttributeHolder.cs
- DbProviderFactories.cs
- LinkButton.cs
- securitycriticaldata.cs
- TextEditorParagraphs.cs
- RemoteEndpointMessageProperty.cs
- bindurihelper.cs
- ComponentChangedEvent.cs
- ButtonPopupAdapter.cs
- XhtmlMobileTextWriter.cs
- TextBoxRenderer.cs
- WindowVisualStateTracker.cs
- GridViewCellAutomationPeer.cs
- JobStaple.cs
- ComboBoxRenderer.cs
- PagerSettings.cs
- IsolatedStorage.cs
- Literal.cs
- BrowserDefinitionCollection.cs
- XmlChildNodes.cs
- MetadataPropertyvalue.cs
- Stylus.cs
- NativeMethodsOther.cs
- BamlVersionHeader.cs
- HttpApplicationFactory.cs
- Triplet.cs
- UserMapPath.cs
- Trace.cs
- FileDialog_Vista_Interop.cs
- CorrelationValidator.cs
- TriggerCollection.cs
- Glyph.cs
- OptimalBreakSession.cs
- MessageSmuggler.cs
- IOThreadTimer.cs
- CodeDelegateCreateExpression.cs
- ObjectListShowCommandsEventArgs.cs
- SurrogateSelector.cs
- DataServiceQueryProvider.cs
- DataViewSettingCollection.cs
- PageTextBox.cs
- DefaultHttpHandler.cs
- OdbcFactory.cs
- FlowDocumentScrollViewer.cs
- Button.cs
- HttpServerUtilityBase.cs
- VolatileEnlistmentState.cs
- ComplexPropertyEntry.cs
- Graph.cs
- WorkflowApplicationEventArgs.cs
- TimeManager.cs
- BitmapMetadataBlob.cs
- XamlToRtfParser.cs
- MiniAssembly.cs
- DropDownButton.cs
- ClassHandlersStore.cs
- TextPenaltyModule.cs
- TypeProvider.cs
- __Error.cs
- SequentialUshortCollection.cs
- InvokePattern.cs
- SortFieldComparer.cs
- ReadOnlyDataSource.cs
- EncryptedPackage.cs
- ResourceProviderFactory.cs
- MonikerSyntaxException.cs
- TemplateControlParser.cs
- TextBounds.cs
- MetadataArtifactLoaderFile.cs
- ColorIndependentAnimationStorage.cs
- ContextInformation.cs
- CalendarDateChangedEventArgs.cs
- SimpleTextLine.cs
- TextCompositionEventArgs.cs
- XamlSerializerUtil.cs
- ImageAutomationPeer.cs
- SQLInt16Storage.cs
- XPathAncestorIterator.cs
- FeatureSupport.cs
- HotSpotCollectionEditor.cs
- CompilationRelaxations.cs
- CodeObjectCreateExpression.cs
- ObjectDataSourceView.cs
- SecurityTokenValidationException.cs
- DecoderNLS.cs
- TraceContextEventArgs.cs
- DataContractAttribute.cs
- MimeXmlReflector.cs
- CustomErrorsSection.cs
- HMACSHA1.cs
- MenuEventArgs.cs
- StackBuilderSink.cs