←Select platform

AutoDisposeStream Property

Summary

Indicates whether LEADDocument should dispose of the stream passed to DocumentFactory.LoadFromStream.

Syntax
C#
VB
C++
public bool AutoDisposeStream {get; set;} 
Public Property AutoDisposeStream() As Boolean 
   Get 
   Set 
public:  
   property bool AutoDisposeStream 
   { 
      bool get() 
      void set(bool value) 
   } 

Property Value

true if LEADDocument should dispose of the stream passed to DocumentFactory.LoadFromStream; otherwise, false. The default value is false.

Remarks

This property controls the ownership of the stream parameter passed to DocumentFactory.LoadFromStream.

The LEADDocument class will use the stream members to read the various parts (such as the images and metadata), on demand as needed. It is the user's responsibility to keep the stream alive while the document is not disposed of. When the document is disposed of, the stream is no longer used and can be closed or disposed of by the user. If the value of LEADDocument.AutoDisposeStream is set to true (the default is false), then ownership of the stream is passed to the LEADDocument object and stream will be automatically disposed of when the document itself is disposed of.

The value of stream will be stored in the LEADDocument.Stream property when this method successfully returns.

Requirements

Target Platforms

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

Leadtools.Document Assembly