• Articles
  • Api Documentation
Show / Hide Table of Contents
  • Dapplo.HttpExtensions
    • AuthorizationExtensions
    • HttpBehaviour
    • HttpBehaviourExtensions
    • HttpClientExtensions
    • HttpContentExtensions
    • HttpExtensionsGlobals
    • HttpRequestMessageConfiguration
    • HttpRequestMessageExtensions
    • HttpResponse
    • HttpResponse<TResponse, TErrorResponse>
    • HttpResponse<TResponse>
    • HttpResponseMessageExtensions
    • HttpResponseWithError<TErrorResponse>
    • IChangeableHttpBehaviour
    • IHttpBehaviour
    • IHttpContentConverter
    • IHttpRequestConfiguration
    • IHttpSettings
    • IJsonSerializer
    • MiscExtensions
    • UriActionExtensions
    • UriModifyExtensions
    • UriParseExtensions
  • Dapplo.HttpExtensions.ContentConverter
    • ByteArrayHttpContentConverter
    • DefaultJsonHttpContentConverter
    • DefaultJsonHttpContentConverterConfiguration
    • FormUriEncodedContentConverter
    • StreamHttpContentConverter
    • StringConfiguration
    • StringHttpContentConverter
    • SyndicationFeedHttpContentConverter
    • XDocumentHttpContentConverter
  • Dapplo.HttpExtensions.Extensions
    • EnumExtensions
    • HttpBehaviourExtensions
    • StringExtensions
    • TypeExtensions
  • Dapplo.HttpExtensions.Factory
    • HttpClientFactory
    • HttpContentFactory
    • HttpMessageHandlerFactory
    • HttpRequestMessageFactory
    • WebProxyFactory
  • Dapplo.HttpExtensions.JsonNet
    • JsonNetJsonSerializer
    • ReadOnlyConsideringContractResolver
  • Dapplo.HttpExtensions.JsonSimple
    • DataContractJsonSerializerStrategy
    • DefaultJsonHttpContentConverter
    • IJsonSerializerStrategy
    • JsonExtensionDataAttribute
    • PocoJsonSerializerStrategy
    • SimpleJson
    • SimpleJsonSerializer
  • Dapplo.HttpExtensions.Listener
    • HttpListenerContextExtensions
    • ListenerPortExtensions
    • UriHttpListenerExtensions
  • Dapplo.HttpExtensions.OAuth
    • AuthorizeModes
    • BaseOAuthSettings
    • GrantTypes
    • ICodeReceiverSettings
    • IOAuth1Token
    • IOAuth2Token
    • IOAuthCodeReceiver
    • OAuth1HttpBehaviour
    • OAuth1HttpBehaviourFactory
    • OAuth1HttpMessageHandler
    • OAuth1Parameters
    • OAuth1RequestConfiguration
    • OAuth1Settings
    • OAuth1SignatureTransports
    • OAuth1SignatureTypes
    • OAuth1Token
    • OAuth2HttpBehaviourFactory
    • OAuth2HttpMessageHandler
    • OAuth2Settings
    • OAuth2TokenResponse
    • OAuthExtensions
  • Dapplo.HttpExtensions.OAuth.CodeReceivers
    • EmbeddedBrowserCodeReceiver
  • Dapplo.HttpExtensions.OAuth.Desktop
    • OAuthLoginForm
  • Dapplo.HttpExtensions.Support
    • HttpPartAttribute
    • HttpParts
    • HttpRequestAttribute
    • HttpResponseAttribute
    • HttpSettings
    • MediaTypes
    • ProgressStream
    • ProgressStreamReport
  • Dapplo.HttpExtensions.SystemTextJson
    • SystemTextJsonSerializer
  • Dapplo.HttpExtensions.WinForms.ContentConverter
    • BitmapConfiguration
    • BitmapHttpContentConverter
  • Dapplo.HttpExtensions.Wpf.ContentConverter
    • BitmapSourceConfiguration
    • BitmapSourceHttpContentConverter

Class ProgressStream

Wraps another stream and provides reporting for when bytes are read or written to the stream.

Inheritance
System.Object
System.MarshalByRefObject
System.IO.Stream
ProgressStream
Implements
System.IDisposable
Inherited Members
System.IO.Stream.Null
System.IO.Stream.CopyToAsync(System.IO.Stream)
System.IO.Stream.CopyToAsync(System.IO.Stream, System.Int32)
System.IO.Stream.CopyToAsync(System.IO.Stream, System.Int32, System.Threading.CancellationToken)
System.IO.Stream.CopyTo(System.IO.Stream)
System.IO.Stream.CopyTo(System.IO.Stream, System.Int32)
System.IO.Stream.Dispose()
System.IO.Stream.Dispose(System.Boolean)
System.IO.Stream.FlushAsync()
System.IO.Stream.FlushAsync(System.Threading.CancellationToken)
System.IO.Stream.CreateWaitHandle()
System.IO.Stream.BeginRead(System.Byte[], System.Int32, System.Int32, System.AsyncCallback, System.Object)
System.IO.Stream.EndRead(System.IAsyncResult)
System.IO.Stream.ReadAsync(System.Byte[], System.Int32, System.Int32)
System.IO.Stream.ReadAsync(System.Byte[], System.Int32, System.Int32, System.Threading.CancellationToken)
System.IO.Stream.BeginWrite(System.Byte[], System.Int32, System.Int32, System.AsyncCallback, System.Object)
System.IO.Stream.EndWrite(System.IAsyncResult)
System.IO.Stream.WriteAsync(System.Byte[], System.Int32, System.Int32)
System.IO.Stream.WriteAsync(System.Byte[], System.Int32, System.Int32, System.Threading.CancellationToken)
System.IO.Stream.ReadByte()
System.IO.Stream.WriteByte(System.Byte)
System.IO.Stream.Synchronized(System.IO.Stream)
System.IO.Stream.ObjectInvariant()
System.IO.Stream.CanTimeout
System.IO.Stream.ReadTimeout
System.IO.Stream.WriteTimeout
System.MarshalByRefObject.MemberwiseClone(System.Boolean)
System.MarshalByRefObject.GetLifetimeService()
System.MarshalByRefObject.InitializeLifetimeService()
System.MarshalByRefObject.CreateObjRef(System.Type)
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Dapplo.HttpExtensions.Support
Assembly: Dapplo.HttpExtensions.dll
Syntax
public class ProgressStream : Stream, IDisposable

Constructors

| Improve this Doc View Source

ProgressStream(Stream)

Creates a new ProgressStream supplying the stream for it to report on.

Declaration
public ProgressStream(Stream streamToReportOn)
Parameters
Type Name Description
System.IO.Stream streamToReportOn

The underlying stream that will be reported on when bytes are read or written.

Properties

| Improve this Doc View Source

BytesMoved

RaisedCalled when bytes are either read or written to the stream.

Declaration
public Action<object, ProgressStreamReport> BytesMoved { get; set; }
Property Value
Type Description
Action<System.Object, ProgressStreamReport>
| Improve this Doc View Source

BytesRead

Called when bytes are read from the stream.

Declaration
public Action<object, ProgressStreamReport> BytesRead { get; set; }
Property Value
Type Description
Action<System.Object, ProgressStreamReport>
| Improve this Doc View Source

BytesWritten

RaisedCalled when bytes are written to the stream.

Declaration
public Action<object, ProgressStreamReport> BytesWritten { get; set; }
Property Value
Type Description
Action<System.Object, ProgressStreamReport>
| Improve this Doc View Source

CanRead

Declaration
public override bool CanRead { get; }
Property Value
Type Description
System.Boolean
Overrides
System.IO.Stream.CanRead
| Improve this Doc View Source

CanSeek

Declaration
public override bool CanSeek { get; }
Property Value
Type Description
System.Boolean
Overrides
System.IO.Stream.CanSeek
| Improve this Doc View Source

CanWrite

Declaration
public override bool CanWrite { get; }
Property Value
Type Description
System.Boolean
Overrides
System.IO.Stream.CanWrite
| Improve this Doc View Source

Length

Declaration
public override long Length { get; }
Property Value
Type Description
System.Int64
Overrides
System.IO.Stream.Length
| Improve this Doc View Source

Position

Declaration
public override long Position { get; set; }
Property Value
Type Description
System.Int64
Overrides
System.IO.Stream.Position

Methods

| Improve this Doc View Source

Close()

Declaration
public override void Close()
Overrides
System.IO.Stream.Close()
| Improve this Doc View Source

Flush()

Declaration
public override void Flush()
Overrides
System.IO.Stream.Flush()
| Improve this Doc View Source

OnBytesMoved(Int32, Boolean)

Called when bytes are moved

Declaration
protected virtual void OnBytesMoved(int bytesMoved, bool isRead)
Parameters
Type Name Description
System.Int32 bytesMoved

int with the number of bytes which are moved

System.Boolean isRead

true if the bytes were read, false if written

| Improve this Doc View Source

OnBytesRead(Int32)

Called when bytes are read.

Declaration
protected virtual void OnBytesRead(int bytesMoved)
Parameters
Type Name Description
System.Int32 bytesMoved

int with the number of bytes

| Improve this Doc View Source

OnBytesWritten(Int32)

Called when bytes are written

Declaration
protected virtual void OnBytesWritten(int bytesMoved)
Parameters
Type Name Description
System.Int32 bytesMoved

int with the number of bytes

| Improve this Doc View Source

Read(Byte[], Int32, Int32)

Declaration
public override int Read(byte[] buffer, int offset, int count)
Parameters
Type Name Description
System.Byte[] buffer
System.Int32 offset
System.Int32 count
Returns
Type Description
System.Int32
Overrides
System.IO.Stream.Read(System.Byte[], System.Int32, System.Int32)
| Improve this Doc View Source

Seek(Int64, SeekOrigin)

Declaration
public override long Seek(long offset, SeekOrigin origin)
Parameters
Type Name Description
System.Int64 offset
System.IO.SeekOrigin origin
Returns
Type Description
System.Int64
Overrides
System.IO.Stream.Seek(System.Int64, System.IO.SeekOrigin)
| Improve this Doc View Source

SetLength(Int64)

Declaration
public override void SetLength(long value)
Parameters
Type Name Description
System.Int64 value
Overrides
System.IO.Stream.SetLength(System.Int64)
| Improve this Doc View Source

Write(Byte[], Int32, Int32)

Declaration
public override void Write(byte[] buffer, int offset, int count)
Parameters
Type Name Description
System.Byte[] buffer
System.Int32 offset
System.Int32 count
Overrides
System.IO.Stream.Write(System.Byte[], System.Int32, System.Int32)

Implements

System.IDisposable
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © Dapplo