Class Factory

Factory for creating IToolbarItems.

Inheritance
System.Object
Factory
Namespace: PSPDFKit.UI.ToolbarComponents
Assembly: PSPDFKit.dll
Syntax
public sealed class Factory

Methods

FromJsonArray(JsonArray)

Retrieves a list of the corresponding IToolbarItem for the given json array.

Declaration
public static IEnumerable<IToolbarItem> FromJsonArray(JsonArray toolbarItemsJson)
Parameters
Type Name Description
Windows.Data.Json.JsonArray toolbarItemsJson

Correctly formed json array of toolbar items.

Returns
Type Description
System.Collections.Generic.IEnumerable<IToolbarItem>

A List of toolbar items

Exceptions
Type Condition
System.Exception

If the type is unknown or the type is not given for any of the items.

ToJsonArray(IEnumerable<IToolbarItem>)

Returns a Json Array describing the toolbar items passed in.

Declaration
public static JsonArray ToJsonArray(IEnumerable<IToolbarItem> toolbarItems)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<IToolbarItem> toolbarItems

The items in which to parse

Returns
Type Description
Windows.Data.Json.JsonArray

Json Array of toolbar items