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
- ProcessActivityTreeOptions.cs
- AssemblyBuilderData.cs
- localization.cs
- URL.cs
- Int64.cs
- DataGridTable.cs
- ArgumentNullException.cs
- DynamicControl.cs
- HashCryptoHandle.cs
- CapabilitiesRule.cs
- ReceiveActivity.cs
- XmlQuerySequence.cs
- HiddenField.cs
- Registration.cs
- MachineKeySection.cs
- ResourceDisplayNameAttribute.cs
- WebPartConnectionsEventArgs.cs
- DataGridBoolColumn.cs
- Automation.cs
- ToolStripTemplateNode.cs
- XmlWriterSettings.cs
- SelectionProviderWrapper.cs
- ErrorWebPart.cs
- TextParaLineResult.cs
- CryptoHelper.cs
- ReadOnlyHierarchicalDataSource.cs
- OracleMonthSpan.cs
- TableStyle.cs
- ExceptionRoutedEventArgs.cs
- Timer.cs
- LoopExpression.cs
- RoleExceptions.cs
- OracleRowUpdatedEventArgs.cs
- Descriptor.cs
- SparseMemoryStream.cs
- FloaterParagraph.cs
- WithStatement.cs
- PropertyOverridesDialog.cs
- GetPageNumberCompletedEventArgs.cs
- ScriptResourceInfo.cs
- EntityDataSourceEntityTypeFilterConverter.cs
- DrawingBrush.cs
- ComContractElementCollection.cs
- SettingsAttributeDictionary.cs
- SmtpClient.cs
- Menu.cs
- XmlName.cs
- EntityPropertyMappingAttribute.cs
- SelectionChangedEventArgs.cs
- Brush.cs
- SmtpException.cs
- WorkflowServiceHostFactory.cs
- SimpleType.cs
- HwndTarget.cs
- XmlDocumentType.cs
- SQLRoleProvider.cs
- EncoderReplacementFallback.cs
- NumericUpDownAcceleration.cs
- TransactedBatchContext.cs
- LifetimeServices.cs
- CacheChildrenQuery.cs
- SqlFlattener.cs
- DbConnectionStringBuilder.cs
- StrongNameMembershipCondition.cs
- xmlglyphRunInfo.cs
- ReadContentAsBinaryHelper.cs
- PermissionSetEnumerator.cs
- PrimarySelectionGlyph.cs
- MetafileHeader.cs
- LambdaCompiler.Address.cs
- Utility.cs
- FormatSettings.cs
- HttpFileCollection.cs
- FunctionQuery.cs
- ClockGroup.cs
- ExecutedRoutedEventArgs.cs
- ADMembershipUser.cs
- TransformValueSerializer.cs
- ExtenderProvidedPropertyAttribute.cs
- WindowsScroll.cs
- ObjectConverter.cs
- DataGridViewRowConverter.cs
- RuleElement.cs
- ToolStripPanelRenderEventArgs.cs
- StyleTypedPropertyAttribute.cs
- ResolveDuplexCD1AsyncResult.cs
- DataRecord.cs
- ConcurrentDictionary.cs
- mediaeventargs.cs
- EventLogPermission.cs
- PeerInvitationResponse.cs
- VirtualPath.cs
- RowUpdatingEventArgs.cs
- OleDbPropertySetGuid.cs
- SelfIssuedAuthRSAPKCS1SignatureDeformatter.cs
- ScrollEventArgs.cs
- XmlChildNodes.cs
- PostBackTrigger.cs
- HierarchicalDataSourceConverter.cs
- XPathAncestorIterator.cs