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
- IdleTimeoutMonitor.cs
- GeneralTransformGroup.cs
- NativeConfigurationLoader.cs
- OperationExecutionFault.cs
- PreProcessInputEventArgs.cs
- LocalizationComments.cs
- UnauthorizedAccessException.cs
- TraceHwndHost.cs
- GenerateTemporaryTargetAssembly.cs
- XmlFormatReaderGenerator.cs
- TreeNodeClickEventArgs.cs
- TargetInvocationException.cs
- ResolveNameEventArgs.cs
- _ConnectStream.cs
- AuthenticationModuleElement.cs
- WrapPanel.cs
- SqlColumnizer.cs
- CacheMemory.cs
- EntityClassGenerator.cs
- OleDbStruct.cs
- JsonByteArrayDataContract.cs
- TransformerTypeCollection.cs
- TcpServerChannel.cs
- IssuedTokenClientElement.cs
- EventRoute.cs
- XamlReader.cs
- OleDbDataAdapter.cs
- DBSchemaTable.cs
- HttpConfigurationContext.cs
- BorderGapMaskConverter.cs
- ComponentManagerBroker.cs
- ErrorWrapper.cs
- TableDesigner.cs
- ListBindingHelper.cs
- StdValidatorsAndConverters.cs
- DataBindingHandlerAttribute.cs
- CommonDialog.cs
- XmlSchemaCompilationSettings.cs
- Window.cs
- TextBoxAutomationPeer.cs
- Visitor.cs
- AssertSection.cs
- LocationSectionRecord.cs
- ForwardPositionQuery.cs
- ToolStripItemImageRenderEventArgs.cs
- pingexception.cs
- XPathAxisIterator.cs
- IdentityNotMappedException.cs
- SweepDirectionValidation.cs
- DataGridCheckBoxColumn.cs
- IPEndPointCollection.cs
- TrackingQuery.cs
- DesignerAttribute.cs
- unsafenativemethodstextservices.cs
- OutputCacheProfile.cs
- prefixendpointaddressmessagefilter.cs
- ProcessModuleCollection.cs
- OverlappedContext.cs
- AutomationPattern.cs
- TypeSemantics.cs
- ExternalCalls.cs
- InputBuffer.cs
- AutomationEvent.cs
- XmlAttribute.cs
- DataTemplate.cs
- UniqueEventHelper.cs
- RequiredFieldValidator.cs
- MemberRelationshipService.cs
- PanelContainerDesigner.cs
- MultiSelectRootGridEntry.cs
- PaintEvent.cs
- XmlParser.cs
- AutomationPatternInfo.cs
- NonVisualControlAttribute.cs
- ObjectDataSourceDisposingEventArgs.cs
- X509ChainPolicy.cs
- XmlSchemaExporter.cs
- ConfigurationProperty.cs
- DataSet.cs
- RuntimeHelpers.cs
- SerializationBinder.cs
- StrokeSerializer.cs
- AssociationSet.cs
- HiddenFieldPageStatePersister.cs
- PartialToken.cs
- StorageComplexPropertyMapping.cs
- SiteMapProvider.cs
- TdsParser.cs
- DynamicRouteExpression.cs
- DataGridViewIntLinkedList.cs
- EnumMemberAttribute.cs
- TextRunCacheImp.cs
- Slider.cs
- PhysicalFontFamily.cs
- XmlMemberMapping.cs
- IPPacketInformation.cs
- WSFederationHttpBindingElement.cs
- XmlTextWriter.cs
- SqlNamer.cs
- RunInstallerAttribute.cs