←Select platform

Factory Class

Summary

Factory class that can be used to quickly create ILeadStream objects from various input or output sources.

Syntax
C#
Python
public sealed abstract class Factory 
class Factory: 
Remarks

LeadStream.Factory is a class containing helper methods that can be used to quickly create ILeadStream objects form various input or output sources. For instance:

C#
// From a .NET stream. This returns LeadStream 
ILeadStream leadStream1 = LeadStream.Factory.FromStream(stream); 
// From a file on disk. This returns LeadFileStream 
ILeadStream leadStream2 = LeadStream.Factory.OpenFile(fileName); 
// From a URL. This returns HttpClientLeadStream 
ILeadStream leadStream3 = await LeadStream.Factory.FromUri(new Uri(url))) 

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 22.0.2023.5.16
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.