Class UserProperties

Class UserProperties

Namespace: Aspose.Page
Assembly: Aspose.Page.dll (25.3.0)

Special property class which allows typed properties to be set and returned. It also allows the hookup of two default property objects to be searched if this property object does not contain the property.

public class UserProperties : Dictionary<string, object="">, IDictionary<string, object="">, ICollection<keyvaluepair<string, object="">&gt;, IDictionary, ICollection, IReadOnlyDictionary<string, object="">, IReadOnlyCollection<keyvaluepair<string, object="">&gt;, IEnumerable<keyvaluepair<string, object="">&gt;, IEnumerable, ISerializable, IDeserializationCallback

Inheritance

objectDictionary<string, object="">UserProperties

Implements

IDictionary<string, object="">, ICollection<keyvaluepair<string, object="">&gt;, IDictionary, ICollection, IReadOnlyDictionary<string, object="">, IReadOnlyCollection<keyvaluepair<string, object="">&gt;, IEnumerable<keyvaluepair<string, object="">&gt;, IEnumerable, ISerializable, IDeserializationCallback

Inherited Members

Dictionary<string, object="">.Add(string, object), Dictionary<string, object="">.Clear(), Dictionary<string, object="">.ContainsKey(string), Dictionary<string, object="">.ContainsValue(object), Dictionary<string, object="">.GetEnumerator(), Dictionary<string, object="">.OnDeserialization(object?), Dictionary<string, object="">.Remove(string), Dictionary<string, object="">.Remove(string, out object), Dictionary<string, object="">.TryGetValue(string, out object), Dictionary<string, object="">.TryAdd(string, object), Dictionary<string, object="">.EnsureCapacity(int), Dictionary<string, object="">.TrimExcess(), Dictionary<string, object="">.TrimExcess(int), Dictionary<string, object="">.Comparer, Dictionary<string, object="">.Count, Dictionary<string, object="">.Keys, Dictionary<string, object="">.Values, Dictionary<string, object="">.this[string], object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors

UserProperties()

Initializes an empty instance of UserProperties class.

public UserProperties()

UserProperties(Dictionary<string, object="">)

Initializes an of UserProperties class with default values.

public UserProperties(Dictionary<string, object=""> defaults)

Parameters

defaults Dictionary<string, object&gt;

Default properties values.

UserProperties(Dictionary<string, object="">, Dictionary<string, object="">)

Constructs UserProperties with a defaults and altDefaults table, which are searched in that order.

public UserProperties(Dictionary<string, object=""> defaults, Dictionary<string, object=""> altDefaults)

Parameters

defaults Dictionary<string, object&gt;

Default properties values.

altDefaults Dictionary<string, object&gt;

An alternative properties values.

Fields

altDefaults

An alternative properties values.

protected Dictionary<string, object=""> altDefaults

Field Value

Dictionary<string, object&gt;

Properties

Properties

Copies properties, including its defaults into this UserProperties

public virtual Dictionary<string, object=""> Properties { set; }

Property Value

Dictionary<string, object&gt;

Methods

GetProperty(string)

Gets string property value.

public virtual string GetProperty(string key)

Parameters

key string

The name of property.

Returns

string

Property value.

GetProperty(string, string)

Gets string property value. If requested property is absent, returns provided default value.

public virtual string GetProperty(string key, string defValue)

Parameters

key string

The name of property.

defValue string

Default value of property.

Returns

string

Property value.

GetPropertyColor(string)

Gets color property value.

public virtual Color GetPropertyColor(string key)

Parameters

key string

The name of property.

Returns

Color

Property value.

GetPropertyColor(string, Color)

Gets color property value. If requested property is absent, returns provided default value.

public virtual Color GetPropertyColor(string key, Color defValue)

Parameters

key string

The name of property.

defValue Color

Default value of property.

Returns

Color

Property value.

GetPropertyDouble(string)

Gets double property value.

public virtual double GetPropertyDouble(string key)

Parameters

key string

The name of property.

Returns

double

Property value.

GetPropertyDouble(string, double)

Gets double property value. If requested property is absent, returns provided default value.

public virtual double GetPropertyDouble(string key, double defValue)

Parameters

key string

The name of property.

defValue double

Default value of property.

Returns

double

Property value.

GetPropertyFloat(string)

Gets float property value.

public virtual float GetPropertyFloat(string key)

Parameters

key string

The name of property.

Returns

float

Property value.

GetPropertyFloat(string, float)

Gets float property value. If requested property is absent, returns provided default value.

public virtual float GetPropertyFloat(string key, float defValue)

Parameters

key string

The name of property.

defValue float

Default value of property.

Returns

float

Property value.

GetPropertyInt(string)

Gets integer property value.

public virtual int GetPropertyInt(string key)

Parameters

key string

The name of property.

Returns

int

Property value.

GetPropertyInt(string, int)

Gets integer property value. If requested property is absent, returns provided default value.

public virtual int GetPropertyInt(string key, int defValue)

Parameters

key string

The name of property.

defValue int

Default value of property.

Returns

int

Property value.

GetPropertyMargins(string)

Gets margins property value.

public virtual Margins GetPropertyMargins(string key)

Parameters

key string

The name of property.

Returns

Margins

Property value.

GetPropertyMargins(string, Margins)

Gets margins property value. If requested property is absent, returns provided default value.

public virtual Margins GetPropertyMargins(string key, Margins defValue)

Parameters

key string

The name of property.

defValue Margins

Default value of property.

Returns

Margins

Property value.

GetPropertyMatrix(string)

Gets matrix property value.

public virtual Matrix GetPropertyMatrix(string key)

Parameters

key string

The name of property.

Returns

Matrix

Property value.

GetPropertyMatrix(string, Matrix)

Gets matrix property value. If requested property is absent, returns provided default value.

public virtual Matrix GetPropertyMatrix(string key, Matrix defValue)

Parameters

key string

The name of property.

defValue Matrix

Default value of property.

Returns

Matrix

Property value.

GetPropertyRectangle(string)

Gets rectangle property value.

public virtual RectangleF GetPropertyRectangle(string key)

Parameters

key string

The name of property.

Returns

RectangleF

Property value.

GetPropertyRectangle(string, RectangleF)

Gets rectangle property value. If requested property is absent, returns provided default value.

public virtual RectangleF GetPropertyRectangle(string key, RectangleF defValue)

Parameters

key string

The name of property.

defValue RectangleF

Default value of property.

Returns

RectangleF

Property value.

GetPropertySize(string)

Gets size property value.

public virtual Size GetPropertySize(string key)

Parameters

key string

The name of property.

Returns

Size

Property value.

GetPropertySize(string, Size)

Gets size property value. If requested property is absent, returns provided default value.

public virtual Size GetPropertySize(string key, Size defValue)

Parameters

key string

The name of property.

defValue Size

Default value of property.

Returns

Size

Property value.

GetPropertyStringArray(string)

Gets string array property value.

public virtual string[] GetPropertyStringArray(string key)

Parameters

key string

The name of property.

Returns

string[]

Property value.

GetPropertyStringArray(string, string[])

Gets string array property value. If requested property is absent, returns provided default value.

public virtual string[] GetPropertyStringArray(string key, string[] defValue)

Parameters

key string

The name of property.

defValue string[]

Default value of property.

Returns

string[]

Property value.

IsProperty(string)

Gets boolean property value.

public virtual bool IsProperty(string key)

Parameters

key string

The name of property.

Returns

bool

Property value.

IsProperty(string, bool)

Gets boolean property value. If requested property is absent, returns provided default value.

public virtual bool IsProperty(string key, bool defValue)

Parameters

key string

The name of property.

defValue bool

Default value of property.

Returns

bool

Property value.

PrintProperties()

public virtual void PrintProperties()

PropertyNames()

Returns properties names.

public virtual IEnumerator<string> PropertyNames()

Returns

IEnumerator<string&gt;

Enumerator of properties names.

SetProperty(string, string)

Sets string property value.

public virtual object SetProperty(string key, string value)

Parameters

key string

The name of property.

value string

The value of property.

Returns

object

A property.

SetProperty(string, string[])

Sets string array property value.

public virtual object SetProperty(string key, string[] value)

Parameters

key string

The name of property.

value string[]

The value of property.

Returns

object

A property.

SetProperty(Dictionary<string, object="">, string, string[])

Sets string array property value in specified properties table.

public static object SetProperty(Dictionary<string, object=""> properties, string key, string[] value)

Parameters

properties Dictionary<string, object&gt;

The properties table.

key string

The name of property.

value string[]

The value of property.

Returns

object

A property.

SetProperty(string, Color)

Sets color property value.

public virtual object SetProperty(string key, Color value)

Parameters

key string

The name of property.

value Color

The value of property.

Returns

object

A property.

SetProperty(Dictionary<string, object="">, string, Color)

Sets color property value in specified properties table.

public static object SetProperty(Dictionary<string, object=""> properties, string key, Color value)

Parameters

properties Dictionary<string, object&gt;

The properties table.

key string

The name of property.

value Color

The value of property.

Returns

object

A property.

SetProperty(string, Rectangle)

Sets rectangle property value.

public virtual object SetProperty(string key, Rectangle value)

Parameters

key string

The name of property.

value Rectangle

The value of property.

Returns

object

A property.

SetProperty(Dictionary<string, object="">, string, Rectangle)

Sets rectangle property value in specified properties table.

public static object SetProperty(Dictionary<string, object=""> properties, string key, Rectangle value)

Parameters

properties Dictionary<string, object&gt;

The properties table.

key string

The name of property.

value Rectangle

The value of property.

Returns

object

A property.

SetProperty(string, Margins)

Sets margins property value.

public virtual object SetProperty(string key, Margins value)

Parameters

key string

The name of property.

value Margins

The value of property.

Returns

object

A property.

SetProperty(Dictionary<string, object="">, string, Margins)

Sets margins property value in specified properties table.

public static object SetProperty(Dictionary<string, object=""> properties, string key, Margins value)

Parameters

properties Dictionary<string, object&gt;

The properties table.

key string

The name of property.

value Margins

The value of property.

Returns

object

A property.

SetProperty(string, Size)

Sets size property value.

public virtual object SetProperty(string key, Size value)

Parameters

key string

The name of property.

value Size

The value of property.

Returns

object

A property.

SetProperty(Dictionary<string, object="">, string, Size)

Sets size property value in specified properties table.

public static object SetProperty(Dictionary<string, object=""> properties, string key, Size value)

Parameters

properties Dictionary<string, object&gt;

The properties table.

key string

The name of property.

value Size

The value of property.

Returns

object

A property.

SetProperty(string, int)

Sets integer property value.

public virtual object SetProperty(string key, int value)

Parameters

key string

The name of property.

value int

The value of property.

Returns

object

A property.

SetProperty(Dictionary<string, object="">, string, int)

Sets integer property value in specified properties table.

public static object SetProperty(Dictionary<string, object=""> properties, string key, int value)

Parameters

properties Dictionary<string, object&gt;

The properties table.

key string

The name of property.

value int

The value of property.

Returns

object

A property.

SetProperty(string, double)

Sets double property value.

public virtual object SetProperty(string key, double value)

Parameters

key string

The name of property.

value double

The value of property.

Returns

object

A property.

SetProperty(Dictionary<string, object="">, string, double)

Sets double property value in specified properties table.

public static object SetProperty(Dictionary<string, object=""> properties, string key, double value)

Parameters

properties Dictionary<string, object&gt;

The properties table.

key string

The name of property.

value double

The value of property.

Returns

object

A property.

SetProperty(string, float)

Sets float property value.

public virtual object SetProperty(string key, float value)

Parameters

key string

The name of property.

value float

The value of property.

Returns

object

A property.

SetProperty(Dictionary<string, object="">, string, float)

Sets float property value in specified properties table.

public static object SetProperty(Dictionary<string, object=""> properties, string key, float value)

Parameters

properties Dictionary<string, object&gt;

The properties table.

key string

The name of property.

value float

The value of property.

Returns

object

A property.

SetProperty(string, bool)

Sets boolean property value.

public virtual object SetProperty(string key, bool value)

Parameters

key string

The name of property.

value bool

The value of property.

Returns

object

A property.

SetProperty(Dictionary<string, object="">, string, bool)

Sets boolean property value in specified properties table.

public static object SetProperty(Dictionary<string, object=""> properties, string key, bool value)

Parameters

properties Dictionary<string, object&gt;

The properties table.

key string

The name of property.

value bool

The value of property.

Returns

object

A property.

SetProperty(string, Matrix)

Sets matrix property value.

public virtual object SetProperty(string key, Matrix value)

Parameters

key string

The name of property.

value Matrix

The value of property.

Returns

object

A property.

SetProperty(Dictionary<string, object="">, string, Matrix)

Sets matrix property value in specified properties table.

public static object SetProperty(Dictionary<string, object=""> properties, string key, Matrix value)

Parameters

properties Dictionary<string, object&gt;

The properties table.

key string

The name of property.

value Matrix

The value of property.

Returns

object

A property. </string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></keyvaluepair<string,></keyvaluepair<string,></string,></keyvaluepair<string,></string,></string,></keyvaluepair<string,></keyvaluepair<string,></string,></keyvaluepair<string,></string,></string,>

 English