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
- CodeMethodInvokeExpression.cs
- ContextDataSourceView.cs
- ElementHostAutomationPeer.cs
- ProofTokenCryptoHandle.cs
- NameTable.cs
- MetaModel.cs
- DataKey.cs
- HttpCacheVary.cs
- WindowHideOrCloseTracker.cs
- QilChoice.cs
- HierarchicalDataSourceControl.cs
- Exception.cs
- ProgressBarAutomationPeer.cs
- EventSource.cs
- AddressAccessDeniedException.cs
- NameScope.cs
- SerialErrors.cs
- EditBehavior.cs
- UnsafeNativeMethodsMilCoreApi.cs
- safelinkcollection.cs
- path.cs
- DispatchWrapper.cs
- RelationshipConstraintValidator.cs
- FunctionImportElement.cs
- NamespaceCollection.cs
- TimeoutValidationAttribute.cs
- MarshalByRefObject.cs
- HorizontalAlignConverter.cs
- PageSetupDialog.cs
- Publisher.cs
- XmlParserContext.cs
- CacheOutputQuery.cs
- SimpleExpression.cs
- PageContent.cs
- IIS7WorkerRequest.cs
- PropertyGeneratedEventArgs.cs
- CopyNodeSetAction.cs
- PropertyGridEditorPart.cs
- BitArray.cs
- PassportPrincipal.cs
- DesignerFrame.cs
- GradientStop.cs
- Vector3DConverter.cs
- DataList.cs
- DirectoryInfo.cs
- PenThread.cs
- ThreadAbortException.cs
- FontCollection.cs
- TextSyndicationContentKindHelper.cs
- Keyboard.cs
- KeyToListMap.cs
- VectorCollectionValueSerializer.cs
- FrameworkReadOnlyPropertyMetadata.cs
- DemultiplexingDispatchMessageFormatter.cs
- NativeMethods.cs
- UnsafeNativeMethods.cs
- SoapMessage.cs
- Decimal.cs
- ComMethodElementCollection.cs
- TextMessageEncoder.cs
- ClientConfigPaths.cs
- ButtonChrome.cs
- DashStyles.cs
- VScrollBar.cs
- PermissionToken.cs
- addressfiltermode.cs
- DataTableCollection.cs
- Light.cs
- XpsResourceDictionary.cs
- PropertyDescriptorGridEntry.cs
- PathFigureCollection.cs
- DataFormats.cs
- ListViewInsertionMark.cs
- DefaultHttpHandler.cs
- ListViewGroupItemCollection.cs
- _IPv6Address.cs
- BinaryUtilClasses.cs
- RegexCapture.cs
- ToolZoneDesigner.cs
- FilterException.cs
- EventProviderWriter.cs
- ManipulationInertiaStartingEventArgs.cs
- CheckBoxList.cs
- ToolStripDropTargetManager.cs
- MemberExpression.cs
- TimelineGroup.cs
- Viewport3DVisual.cs
- EntityDataSourceDataSelectionPanel.cs
- QueryCacheKey.cs
- coordinatorfactory.cs
- BlockCollection.cs
- DBAsyncResult.cs
- EmptyEnumerator.cs
- TraceRecord.cs
- Point3DCollectionConverter.cs
- XPathDescendantIterator.cs
- ToolTipAutomationPeer.cs
- PathFigureCollectionConverter.cs
- UpdateRecord.cs
- HtmlTableRowCollection.cs