Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

VisioStencilPreviewImageData

OfficeIMO.Visio.Stencils

Namespace
OfficeIMO.Visio.Stencils
Assembly
OfficeIMO.Visio
Source revision
e163ccb36643 with working tree changes
Modifiers
sealed

Embedded preview/icon image payload extracted from a package-backed stencil master.

Inheritance

  • object
  • VisioStencilPreviewImageData

Usage

Explore 2 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Constructors

public VisioStencilPreviewImageData(string masterId, string masterNameU, string? masterName, VisioStencilPreviewImage previewImage, byte[] data) #

Initializes extracted preview image payload data.

Parameters

masterId string required
masterNameU string required
masterName string? required
previewImage OfficeIMO.Visio.Stencils.VisioStencilPreviewImage required
data byte[] required

Methods

Save 2 overloads
public void Save(string path) #

Saves the preview payload to a file.

Parameters

path string required
public void Save(Stream stream) #

Saves the preview payload to a caller-owned stream.

Parameters

stream System.IO.Stream required
SaveAsync 2 overloads
public Task SaveAsync(string path, CancellationToken cancellationToken = default) #

Saves the preview payload to a file asynchronously.

Parameters

path string required
cancellationToken System.Threading.CancellationToken = default optional

Returns

Task
public Task SaveAsync(Stream stream, CancellationToken cancellationToken = default) #

Saves the preview payload to a caller-owned stream asynchronously.

Parameters

stream System.IO.Stream required
cancellationToken System.Threading.CancellationToken = default optional

Returns

Task
public string SaveToDirectory(string directoryPath) #

Saves the preview payload to a directory using VisioStencilPreviewImageData.SuggestedFileName.

Parameters

directoryPath string required

Returns

string
public async Task<string> SaveToDirectoryAsync(string directoryPath, CancellationToken cancellationToken = default) #

Saves the preview payload to a directory using VisioStencilPreviewImageData.SuggestedFileName asynchronously.

Parameters

directoryPath string required
cancellationToken System.Threading.CancellationToken = default optional

Returns

Task<string>
public byte[] ToBytes() #

Returns a copy of the embedded preview image bytes.

Returns

byte[]
public MemoryStream ToStream() #

Returns the embedded preview image in a new stream positioned at the beginning.

Returns

MemoryStream

Properties

public string MasterId { get; } #

Source master identifier.

public string MasterNameU { get; } #

Source master universal name.

public string? MasterName { get; } #

Source master display name, when present.

public VisioStencilPreviewImage PreviewImage { get; } #

Preview image metadata associated with the extracted payload.

public int ByteLength { get; } #

Embedded preview image byte length.

public string SuggestedFileName { get; } #

Stable file name suitable for saving the extracted preview payload.