Click or drag to resize

PresentationLockingBehavior Enumeration

Represents the behavior regarding treating the IPresentation source (file or Stream) while loading and working with an instance of IPresentation.
Remarks
The source is the parameter passed to the IPresentation constructor. In the example below, the source is the "pres.pptx" file:
Examples
LoadOptions loadOptions = new LoadOptions { 
  BlobManagementOptions = { PresentationLockingBehavior = PresentationLockingBehavior.KeepLocked } };
using (IPresentation pres = new Presentation("pres.pptx", loadOptions)) { }
For this example, the source ("pres.pptx" file) will be locked for a IPresentation instance lifetime, i.e. can't be changed or deleted by the other process.

Namespace:  Aspose.Slides
Assembly:  Aspose.Slides (in Aspose.Slides.dll) Version: 21.12.0.0 (21.12)
Syntax
public enum PresentationLockingBehavior
Members
  Member nameValueDescription
LoadAndRelease0 The source will be locked only for a time of IPresentation constructor execution.
Remarks
If IsTemporaryFilesAllowed is set to false, all BLOBs will be loaded into memory. Otherwise, other means such a temporary files might be used.
Remarks
This behavior is slower than KeepLocked, and if it is possible to pass the ownership of the source to IPresentation, it is recommended to use KeepLocked.
KeepLocked1 The source will be locked for a whole lifetime of IPresentation instance, until it will be disposed.
Remarks
IsTemporaryFilesAllowed is must be set to true for using this behavior, otherwise exception will be thrown.
Remarks
This behavior is recommended, it is faster and consumes less memory than LoadAndRelease.
LoadAndRelease_Legacy_TemporaryDefault255 Obsolete. The source will be locked only for a time of IPresentation constructor execution, all BLOBs will be loaded into memory. This behavior is the legacy behavior to provide backward compatibility. The same behavior can be achieved by using LoadAndRelease and set IsTemporaryFilesAllowed to false. Please consider choosing the LoadAndRelease or KeepLocked behavior, what is the most suitable for you. After LoadAndRelease_Legacy_TemporaryDefault will be removed, KeepLocked will be the default behavior.
See Also