Migration Between Versions – Aspose.SVG for .NET
Aspose.SVG for .NET API is periodically refactored or updated as it evolves. As the API reorganizes, some older classes become deprecated and are eventually removed. This documentation chapter contains information you need to know when migrating between Aspose.SVG for .NET versions – from deprecated versions to newer versions.
Aspose.SVG for .NET 24.3.0
In version 24.3.0, the IOutputStorage interface and LocalFileSystemStorage class have been deprecated but will continue to work until version 24.6.0 is released. If you use earlier versions of Aspose.SVG for .NET, we recommend that you migrate to the new version, as version 24.6.0 will remove these deprecated classes.
Aspose.SVG for .NET 24.3.0 – Save an SVG to a Stream – This article provides examples of using deprecated and new classes to save an SVG document to a memory stream, ZIP archive, or local file system storage using 24.3.0 and earlier versions of the Aspose.SVG for .NET library. You’ll see the benefits and flexibility of the new features and get a set of C# examples.
Old Class | New Class |
---|---|
IOutputStorage | ResourceHandler |
LocalFileSystemStorage | FileSystemResourceHandler |
Deadline for Deprecated Features
Deprecated features will continue to work until Aspose.SVG for .NET version 24.6.0 has been released.
Advantages of the New Features
The
ResourceHandler class in Aspose.SVG for .NET 24.3.0 replaces the deprecated IOutputStorage
interface.
- The
ResourceHandler
class simplifies resource handling, for example, by providing a convenientHandleResource()
method that encapsulates the logic for creating and managing output streams. - The
ResourceHandler
class works directly with resource objects, making interaction with resources more explicit and simple. The new approach provides increased flexibility in the processing and handling of resources during the saving process. Developers can extend theResourceHandler
class to customize resource handling behavior. - The new approach using the
ResourceHandler
class reduces the amount of boilerplate code compared to the deprecatedIOutputStorage
interface. The result is cleaner, more maintainable code.
The
FileSystemResourceHandler class in Aspose.SVG for .NET 24.3.0 replaces the deprecated LocalFileSystemStorage
class.
- The new
FileSystemResourceHandler
class provides enhanced control over the storage of SVG documents and resources by leveraging the methods of theResourceHandler
base class. It allows you to control the writing of links in the parent file to the file you are saving, a capability not offered by the deprecatedLocalFileSystemStorage
class.
Aspose.SVG for .NET 24.3 Release Notes
We appreciate our users’ support and willingness to update to the latest version. Your commitment to staying one step ahead guarantees access to advanced features and optimized performance. We appreciate your approach to using the latest advances. Thank you for being our user!
Aspose.SVG for .NET Team