IBlobManagementOptionsPresentationLockingBehavior Property

This property defines if an instance of the Presentation class can be an owner of the source - file or stream during the instance lifetime. If the instance is an owner, it locks the source. This helps to improve memory consumption and performance while working with BLOBs, but the source (stream or file) can't be changed during Presentation's instance lifetime. This is an example:

Namespace:  Aspose.Slides
Assembly:  Aspose.Slides (in Aspose.Slides.dll) Version: 21.11.0.0 (21.11)
Syntax
PresentationLockingBehavior PresentationLockingBehavior { get; set; }

Property Value

Type: PresentationLockingBehavior
Examples
LoadOptions loadOptions = new LoadOptions { 
  BlobManagementOptions = {PresentationLockingBehavior = PresentationLockingBehavior.KeepLocked} };
using (Presentation pres = new Presentation("pres.pptx", loadOptions)) {
  // IOException will be thrown because pres.pptx is locked for a Presentation lifetime
  // File.Delete("pres.pptx");
}
// after Presentation object disposed, file is unlocked and can be deleted
File.Delete("pres.pptx");
See Also