Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- SqlCrossApplyToCrossJoin.cs
- NullableBoolConverter.cs
- AutomationElementCollection.cs
- EmptyEnumerator.cs
- IntSecurity.cs
- ToolZone.cs
- SettingsPropertyValue.cs
- ProjectionNode.cs
- GlobalizationSection.cs
- HierarchicalDataBoundControl.cs
- SQLBytesStorage.cs
- ISAPIRuntime.cs
- SafeEventHandle.cs
- EntryIndex.cs
- StorageMappingItemCollection.cs
- XmlQueryRuntime.cs
- CodeComment.cs
- ProtocolInformationWriter.cs
- PopOutPanel.cs
- COAUTHIDENTITY.cs
- DataGridComponentEditor.cs
- SystemDiagnosticsSection.cs
- AnnotationDocumentPaginator.cs
- ListViewDeletedEventArgs.cs
- ConvertersCollection.cs
- UpDownBase.cs
- CryptoStream.cs
- CodeNamespaceCollection.cs
- WebPartDisplayModeCollection.cs
- XmlDocumentFragment.cs
- DescendantBaseQuery.cs
- DLinqDataModelProvider.cs
- CharacterBuffer.cs
- Clause.cs
- GridViewHeaderRowPresenter.cs
- CapabilitiesPattern.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- SchemaCreator.cs
- OutputCacheModule.cs
- IgnoreSectionHandler.cs
- SystemIPAddressInformation.cs
- BaseContextMenu.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- DefaultAutoFieldGenerator.cs
- OleDbSchemaGuid.cs
- ImmutableObjectAttribute.cs
- DataSetSchema.cs
- FontStretches.cs
- Semaphore.cs
- ActivityDesigner.cs
- NonBatchDirectoryCompiler.cs
- FacetChecker.cs
- EntityUtil.cs
- TraceListeners.cs
- PermissionSet.cs
- ReflectionTypeLoadException.cs
- CommonXSendMessage.cs
- MessageQueuePermissionEntry.cs
- CheckPair.cs
- ErrorRuntimeConfig.cs
- ValuePatternIdentifiers.cs
- Point3DIndependentAnimationStorage.cs
- WaitHandleCannotBeOpenedException.cs
- AccessViolationException.cs
- DataGridViewTextBoxColumn.cs
- GPRECT.cs
- LocalizableResourceBuilder.cs
- XpsS0ValidatingLoader.cs
- URLIdentityPermission.cs
- UniqueIdentifierService.cs
- TreeViewEvent.cs
- SafeCancelMibChangeNotify.cs
- WebEncodingValidatorAttribute.cs
- Membership.cs
- CustomServiceCredentials.cs
- TypeResolver.cs
- SchemaLookupTable.cs
- JsonClassDataContract.cs
- CopyAction.cs
- RubberbandSelector.cs
- MimePart.cs
- AudienceUriMode.cs
- AssemblyInfo.cs
- DataGridViewTextBoxEditingControl.cs
- SafeNativeMethods.cs
- IndexingContentUnit.cs
- DependencyProperty.cs
- ListItemConverter.cs
- SecurityProtocolCorrelationState.cs
- Sequence.cs
- COM2FontConverter.cs
- TcpAppDomainProtocolHandler.cs
- Predicate.cs
- ObjectCache.cs
- DataGridColumnHeaderCollection.cs
- mactripleDES.cs
- ConsoleKeyInfo.cs
- NavigationProgressEventArgs.cs
- UnsafeMethods.cs
- PassportAuthenticationEventArgs.cs