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
- LightweightCodeGenerator.cs
- TableStyle.cs
- ErrorEventArgs.cs
- PropVariant.cs
- ResourceReferenceExpressionConverter.cs
- shaper.cs
- SQLDateTimeStorage.cs
- PersonalizationStateQuery.cs
- TextBlockAutomationPeer.cs
- x509store.cs
- ScanQueryOperator.cs
- LostFocusEventManager.cs
- IdentitySection.cs
- MultiAsyncResult.cs
- DataSourceConverter.cs
- SecurityRuntime.cs
- Error.cs
- ZoomPercentageConverter.cs
- AdjustableArrowCap.cs
- SID.cs
- ProfileEventArgs.cs
- LogReservationCollection.cs
- CodeTypeDeclarationCollection.cs
- StdValidatorsAndConverters.cs
- CookielessHelper.cs
- EnvironmentPermission.cs
- CodeTryCatchFinallyStatement.cs
- CustomTypeDescriptor.cs
- SynchronizationScope.cs
- SoapSchemaImporter.cs
- Visitors.cs
- SizeConverter.cs
- HtmlInputCheckBox.cs
- HostProtectionPermission.cs
- Rotation3D.cs
- TemplateControlBuildProvider.cs
- MimeWriter.cs
- Brushes.cs
- Constraint.cs
- BitmapEffectOutputConnector.cs
- AuthenticatedStream.cs
- ErrorEventArgs.cs
- ExclusiveCanonicalizationTransform.cs
- IODescriptionAttribute.cs
- DiscoveryClientBindingElement.cs
- IncomingWebRequestContext.cs
- EdgeModeValidation.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- XsdBuildProvider.cs
- TextEditorContextMenu.cs
- WrappedIUnknown.cs
- Geometry3D.cs
- AssemblySettingAttributes.cs
- BinHexDecoder.cs
- ResourceProperty.cs
- SafeBitVector32.cs
- EntitySetBaseCollection.cs
- ExcCanonicalXml.cs
- SectionUpdates.cs
- WizardPanelChangingEventArgs.cs
- DefaultMemberAttribute.cs
- ObjectSet.cs
- EndPoint.cs
- ForceCopyBuildProvider.cs
- ColumnTypeConverter.cs
- SecurityHelper.cs
- CompletedAsyncResult.cs
- QilList.cs
- EdmToObjectNamespaceMap.cs
- Models.cs
- Debug.cs
- FixedPageAutomationPeer.cs
- Stackframe.cs
- IInstanceTable.cs
- AppSettingsReader.cs
- ConnectionPointCookie.cs
- ImportStoreException.cs
- AppDomainProtocolHandler.cs
- ChineseLunisolarCalendar.cs
- DbCommandTree.cs
- HttpRequestCacheValidator.cs
- Attributes.cs
- ButtonPopupAdapter.cs
- TreeViewItem.cs
- CollectionDataContract.cs
- CryptoProvider.cs
- BulletedListEventArgs.cs
- MetadataResolver.cs
- HierarchicalDataBoundControl.cs
- TextAnchor.cs
- SchemaImporterExtensionsSection.cs
- StringBuilder.cs
- Literal.cs
- DelegatedStream.cs
- CompareInfo.cs
- EventManager.cs
- FactoryMaker.cs
- DecimalStorage.cs
- SafeRightsManagementHandle.cs
- Point3DKeyFrameCollection.cs