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
- SessionParameter.cs
- FilteredAttributeCollection.cs
- BatchStream.cs
- StateManagedCollection.cs
- PackageRelationshipSelector.cs
- NavigationProperty.cs
- DependencyProperty.cs
- TreeViewImageKeyConverter.cs
- Label.cs
- PeerNameRecordCollection.cs
- WebPartZone.cs
- ParserOptions.cs
- TextServicesHost.cs
- CallInfo.cs
- ReferentialConstraintRoleElement.cs
- InvalidChannelBindingException.cs
- TreeNodeCollection.cs
- UnmanagedHandle.cs
- WindowsNonControl.cs
- ObjectListDataBindEventArgs.cs
- TimeZone.cs
- DependencyProperty.cs
- WebPartHeaderCloseVerb.cs
- InputProcessorProfiles.cs
- UnicastIPAddressInformationCollection.cs
- ValueQuery.cs
- Hashtable.cs
- DataMisalignedException.cs
- DataRelationCollection.cs
- SortQuery.cs
- FontSource.cs
- ServiceContractViewControl.Designer.cs
- DbException.cs
- XmlConverter.cs
- Metadata.cs
- DependencyObjectValidator.cs
- CharacterBufferReference.cs
- FileDataSourceCache.cs
- PrintPreviewDialog.cs
- EntityDataSourceMemberPath.cs
- WsrmFault.cs
- FormViewUpdatedEventArgs.cs
- ClientConfigurationSystem.cs
- VisualTreeHelper.cs
- SafeFindHandle.cs
- Point3D.cs
- ZipIORawDataFileBlock.cs
- WmlValidationSummaryAdapter.cs
- ProcessingInstructionAction.cs
- CounterCreationData.cs
- RegexFCD.cs
- DomainUpDown.cs
- ElementUtil.cs
- MimeTypeMapper.cs
- ImageField.cs
- SelectedPathEditor.cs
- HtmlTableRow.cs
- MailAddress.cs
- BasicViewGenerator.cs
- CustomCategoryAttribute.cs
- QuadraticBezierSegment.cs
- LateBoundBitmapDecoder.cs
- DataGridViewDataErrorEventArgs.cs
- OleDbInfoMessageEvent.cs
- uribuilder.cs
- XmlIlTypeHelper.cs
- Exceptions.cs
- UrlAuthFailureHandler.cs
- DSASignatureDeformatter.cs
- MembershipSection.cs
- VerificationAttribute.cs
- PageCatalogPart.cs
- RelativeSource.cs
- DiagnosticTraceSource.cs
- CaseStatementProjectedSlot.cs
- ContainerControl.cs
- TabControlEvent.cs
- DataControlFieldCell.cs
- JapaneseLunisolarCalendar.cs
- FactoryGenerator.cs
- ReflectionUtil.cs
- EntityContainerAssociationSet.cs
- ProvidePropertyAttribute.cs
- Style.cs
- ClientWindowsAuthenticationMembershipProvider.cs
- MediaScriptCommandRoutedEventArgs.cs
- RemoteWebConfigurationHostStream.cs
- SmiContext.cs
- SafeFileMappingHandle.cs
- ControlBindingsCollection.cs
- ScrollBarAutomationPeer.cs
- LocalizedNameDescriptionPair.cs
- DependencyObjectProvider.cs
- IDispatchConstantAttribute.cs
- XmlSerializerVersionAttribute.cs
- ArcSegment.cs
- SqlProviderServices.cs
- XsdDuration.cs
- ResourceAttributes.cs
- Symbol.cs