Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / SecureProtocols / AuthenticatedStream.cs / 1305376 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- UserControlParser.cs
- QilGenerator.cs
- ElementUtil.cs
- _ConnectionGroup.cs
- FormClosingEvent.cs
- SqlRecordBuffer.cs
- PropertyEmitter.cs
- SqlTypeSystemProvider.cs
- EventListenerClientSide.cs
- SwitchElementsCollection.cs
- InfoCardRSAPKCS1KeyExchangeFormatter.cs
- FileSystemWatcher.cs
- DecoderExceptionFallback.cs
- EditorPartCollection.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- AdornerPresentationContext.cs
- Switch.cs
- CommandBinding.cs
- SerializerWriterEventHandlers.cs
- NativeMethods.cs
- GlyphElement.cs
- ConvertersCollection.cs
- PropertyRecord.cs
- PersonalizationStateInfoCollection.cs
- FactoryRecord.cs
- DefaultMemberAttribute.cs
- XmlSiteMapProvider.cs
- BufferModeSettings.cs
- SoapMessage.cs
- EndpointAddressElementBase.cs
- DebugHandleTracker.cs
- UntypedNullExpression.cs
- LinqDataSourceInsertEventArgs.cs
- Point3DCollection.cs
- SecurityMessageProperty.cs
- KeyFrames.cs
- XmlSchemaAnnotation.cs
- DeviceSpecificChoiceCollection.cs
- ControlAdapter.cs
- sqlmetadatafactory.cs
- FlowchartSizeFeature.cs
- VerificationException.cs
- XPathScanner.cs
- ImageInfo.cs
- FormattedText.cs
- RootContext.cs
- QilParameter.cs
- TimeoutException.cs
- Timer.cs
- DataGridViewCheckBoxCell.cs
- XamlWriter.cs
- PartialCachingAttribute.cs
- Crc32Helper.cs
- TransformedBitmap.cs
- Triplet.cs
- TemplateInstanceAttribute.cs
- ApplicationTrust.cs
- CryptoProvider.cs
- Int32EqualityComparer.cs
- UnmanagedHandle.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- MobileTemplatedControlDesigner.cs
- RoleBoolean.cs
- Vector3DCollection.cs
- SelectedDatesCollection.cs
- ActiveDesignSurfaceEvent.cs
- SqlTriggerAttribute.cs
- Triplet.cs
- IndexOutOfRangeException.cs
- DesignerAdapterAttribute.cs
- SortQuery.cs
- ClientType.cs
- CallbackDebugElement.cs
- TextServicesProperty.cs
- ToolboxCategory.cs
- XmlSchemaCollection.cs
- sitestring.cs
- SystemMulticastIPAddressInformation.cs
- StrokeCollection2.cs
- SystemUdpStatistics.cs
- Memoizer.cs
- MappingSource.cs
- AutomationPattern.cs
- EntityCommandDefinition.cs
- Listbox.cs
- ThemeInfoAttribute.cs
- LoginView.cs
- ProfileGroupSettings.cs
- KeyValueInternalCollection.cs
- IntSecurity.cs
- Link.cs
- CasesDictionary.cs
- LogExtent.cs
- AnnotationObservableCollection.cs
- FormsAuthenticationUser.cs
- TemplateKeyConverter.cs
- FixedSOMImage.cs
- DecimalAnimationUsingKeyFrames.cs
- HostedElements.cs
- GACIdentityPermission.cs