Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Channels / DelegatingStream.cs / 1 / DelegatingStream.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel.Channels { using System.IO; // Base Stream that delegates all its methods to another Stream. abstract class DelegatingStream : Stream { Stream stream; protected DelegatingStream(Stream stream) { if (stream == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("stream"); } this.stream = stream; } protected Stream BaseStream { get { return stream; } } public override bool CanRead { get { return stream.CanRead; } } public override bool CanSeek { get { return stream.CanSeek; } } public override bool CanTimeout { get { return stream.CanTimeout; } } public override bool CanWrite { get { return stream.CanWrite; } } public override long Length { get { return stream.Length; } } public override long Position { get { return stream.Position; } set { stream.Position = value; } } public override int ReadTimeout { get { return stream.ReadTimeout; } set { stream.ReadTimeout = value; } } public override int WriteTimeout { get { return stream.WriteTimeout; } set { stream.WriteTimeout = value; } } public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state) { return stream.BeginRead(buffer, offset, count, callback, state); } public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state) { return stream.BeginWrite(buffer, offset, count, callback, state); } public override void Close() { stream.Close(); } public override int EndRead(IAsyncResult result) { return stream.EndRead(result); } public override void EndWrite(IAsyncResult result) { stream.EndWrite(result); } public override void Flush() { stream.Flush(); } public override int Read(byte[] buffer, int offset, int count) { return stream.Read(buffer, offset, count); } public override int ReadByte() { return stream.ReadByte(); } public override long Seek(long offset, SeekOrigin origin) { return stream.Seek(offset, origin); } public override void SetLength(long value) { stream.SetLength(value); } public override void Write(byte[] buffer, int offset, int count) { stream.Write(buffer, offset, count); } public override void WriteByte(byte value) { stream.WriteByte(value); } } } // 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
- RoleManagerEventArgs.cs
- DesignerDataSchemaClass.cs
- TextTreeUndoUnit.cs
- PersistenceTypeAttribute.cs
- AppDomainAttributes.cs
- PolicyLevel.cs
- SqlBulkCopyColumnMappingCollection.cs
- Int64Converter.cs
- latinshape.cs
- DataSourceControlBuilder.cs
- TempFiles.cs
- sitestring.cs
- ApplicationProxyInternal.cs
- ArrangedElementCollection.cs
- XPathException.cs
- ButtonBase.cs
- EventLogPermissionHolder.cs
- ButtonChrome.cs
- ItemList.cs
- CannotUnloadAppDomainException.cs
- SortedDictionary.cs
- StructuralObject.cs
- PageOrientation.cs
- RequestQueryParser.cs
- Model3D.cs
- HideDisabledControlAdapter.cs
- URLMembershipCondition.cs
- BamlLocalizabilityResolver.cs
- XmlSchemaType.cs
- MenuItemCollection.cs
- ImageConverter.cs
- QueueProcessor.cs
- ColumnMapTranslator.cs
- WebContext.cs
- WinEventWrap.cs
- _HelperAsyncResults.cs
- XmlSchemaSimpleContentRestriction.cs
- ActivityInterfaces.cs
- Operator.cs
- documentsequencetextview.cs
- TypeForwardedFromAttribute.cs
- RegionIterator.cs
- ReplacementText.cs
- Line.cs
- ProfileParameter.cs
- ControlIdConverter.cs
- ArgumentsParser.cs
- EventRoute.cs
- UriExt.cs
- DesignTimeVisibleAttribute.cs
- ResXFileRef.cs
- DataRelation.cs
- Simplifier.cs
- SectionRecord.cs
- CompareValidator.cs
- WebPartConnectionCollection.cs
- DefaultValueConverter.cs
- Material.cs
- Unit.cs
- LayoutEvent.cs
- ViewManager.cs
- ISO2022Encoding.cs
- _AcceptOverlappedAsyncResult.cs
- translator.cs
- SettingsPropertyValueCollection.cs
- ParamArrayAttribute.cs
- BaseServiceProvider.cs
- DocumentViewerBaseAutomationPeer.cs
- BamlRecords.cs
- UpdatePanelTriggerCollection.cs
- BindingObserver.cs
- UdpDuplexChannel.cs
- ConfigurationValidatorBase.cs
- RequestSecurityTokenSerializer.cs
- Exceptions.cs
- TableItemStyle.cs
- MarkupProperty.cs
- HttpServerProtocol.cs
- InterleavedZipPartStream.cs
- UrlMappingCollection.cs
- ButtonBase.cs
- ISessionStateStore.cs
- IgnoreFileBuildProvider.cs
- FacetValues.cs
- SymmetricKey.cs
- ThumbAutomationPeer.cs
- WebPartCloseVerb.cs
- SelectionPattern.cs
- TriState.cs
- TargetPerspective.cs
- CategoryGridEntry.cs
- RoutedCommand.cs
- OleDbDataReader.cs
- SafeMarshalContext.cs
- objectresult_tresulttype.cs
- SymLanguageVendor.cs
- KeyTimeConverter.cs
- FlowLayoutSettings.cs
- CodeTypeOfExpression.cs
- XmlSchemaValidator.cs