Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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;} } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Vars.cs
- Group.cs
- EdmComplexTypeAttribute.cs
- DrawingVisualDrawingContext.cs
- CacheDependency.cs
- AuthenticationService.cs
- DataSourceView.cs
- XmlSchemaDatatype.cs
- FormClosedEvent.cs
- StylusSystemGestureEventArgs.cs
- SessionParameter.cs
- DynamicValueConverter.cs
- EventItfInfo.cs
- DialogWindow.cs
- ColorConverter.cs
- SpellerError.cs
- EventLogQuery.cs
- ConditionValidator.cs
- PropertyTab.cs
- DataSourceHelper.cs
- SecondaryIndex.cs
- RTLAwareMessageBox.cs
- StringToken.cs
- TextFormatterContext.cs
- CompatibleComparer.cs
- ConfigUtil.cs
- _ListenerAsyncResult.cs
- LazyTextWriterCreator.cs
- CharEntityEncoderFallback.cs
- DataGridDesigner.cs
- FormView.cs
- Dynamic.cs
- RadioButtonStandardAdapter.cs
- TemplateColumn.cs
- ProcessMonitor.cs
- InternalControlCollection.cs
- BCryptHashAlgorithm.cs
- MetadataCollection.cs
- EventLogEntryCollection.cs
- PaperSize.cs
- PropertyGridView.cs
- KeyboardNavigation.cs
- NativeMethodsOther.cs
- ApplicationFileParser.cs
- PriorityItem.cs
- DragStartedEventArgs.cs
- StringUtil.cs
- OneWayBindingElement.cs
- _NTAuthentication.cs
- StringUtil.cs
- ItemList.cs
- XmlBufferReader.cs
- PeerTransportSecurityElement.cs
- RelativeSource.cs
- Label.cs
- DataGridViewRowConverter.cs
- RuleElement.cs
- EntityViewGenerationAttribute.cs
- DesignBindingEditor.cs
- CodeCommentStatementCollection.cs
- BamlBinaryWriter.cs
- UserControlBuildProvider.cs
- WebEventTraceProvider.cs
- Root.cs
- SoundPlayer.cs
- peernodestatemanager.cs
- DataObjectFieldAttribute.cs
- IsolatedStorageFilePermission.cs
- SecurityContextSecurityToken.cs
- DataSourceXmlElementAttribute.cs
- DbSourceParameterCollection.cs
- ClientBuildManagerCallback.cs
- TextBoxBase.cs
- CodeMemberField.cs
- ItemsChangedEventArgs.cs
- CapiHashAlgorithm.cs
- EncryptedXml.cs
- GenericNameHandler.cs
- SystemFonts.cs
- MessageEncodingBindingElementImporter.cs
- SqlServices.cs
- PropertyChangingEventArgs.cs
- ResizeGrip.cs
- AtomEntry.cs
- WindowsBrush.cs
- BuildProvider.cs
- DataGridViewCellEventArgs.cs
- ToolBarOverflowPanel.cs
- GradientSpreadMethodValidation.cs
- DesignerWithHeader.cs
- controlskin.cs
- SimpleWorkerRequest.cs
- PrintDialogException.cs
- ToolStripHighContrastRenderer.cs
- DiscardableAttribute.cs
- TargetConverter.cs
- MappingItemCollection.cs
- DataGridItemEventArgs.cs
- HashAlgorithm.cs
- VirtualDirectoryMapping.cs