←Select platform

DisposeStream Property

Summary

Determine whether the underlying framework stream should be disposed when this ILeadStream is disposed.

Syntax
C#
VB
public bool DisposeStream { get; } 
Public ReadOnly Property DisposeStream() As Boolean 
   Get 

Property Value

true if the underlying framework Stream should be disposed when this ILeadStream disposes; otherwise, false.

Remarks

The value of DisposeStream is set by the implementation class to determine whether to dispose (close) the stream when this ILeadStream object is disposed.

When the value is true, this ILeadStream object will call IDisposable.Dispose on the framework stream when its own Dispose method is called. This is performed when ILeadStream owns the underlying framework stream.

When the value is false, the ILeadStream object will not call Dispose on the framework stream. This is performed when ILeadStream does not own the underlying framework stream.

For instance, LeadStream takes a framework stream as an input in the constructor and a autoDisposeStream boolean parameter passed by the user. Therefore, the user can control whether ownership of the underlying stream is passed to ILeadStream.

LeadFileStream and HttpClientLeadStream will set the stream once it is successfully opened. These objects own the underlying framework stream and the value of their DisposeStream values will always be true.

Refer to RasterCodecs Async Operations for more information and examples.

Requirements

For .NET Framework: A reference to the Leadtools.Async.dll assembly is required to use this functionality.

For .NET Standard: This functionality is included in the Leadtools.dll assembly.

Target Platforms

Help Version 20.0.2020.4.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

Leadtools Assembly