Table of Contents

Interface ICustomProperties

Namespace
ArcanaDevelopment.adTempus.Shared
Assembly
ArcanaDevelopment.adTempus.Shared.dll
public interface ICustomProperties

Properties

Count

Gets the number of items in the collection

int Count { get; }

Property Value

int

this[string]

Gets or sets the value of the property with the specified name.

string this[string name] { get; set; }

Parameters

NameTypeDescription
name string

Property Value

string

Methods

Add(CustomProperty)

Adds a property.

void Add(CustomProperty item)

Parameters

NameTypeDescription
item CustomProperty

The property to add.

Add(string, string)

Adds or updates the property with the specified name.

CustomProperty Add(string name, string value)

Parameters

NameTypeDescription
name string
value string

Returns

CustomProperty

Remarks

See Name for requirements for the name.

Clear(string)

Removes all properties whose names start with the specified prefix.

void Clear(string prefix)

Parameters

NameTypeDescription
prefix string

ContainsKey(string)

Determines whether the collection contains a property with the specified name.

bool ContainsKey(string name)

Parameters

NameTypeDescription
name string

Returns

bool

GetBooleanValue(string)

Gets or sets the value of the property with the specified name, as a boolean value

bool? GetBooleanValue(string name)

Parameters

NameTypeDescription
name string

Returns

bool?

Remarks

Returns null if the property does not exist or its value cannot be converted to bool.

GetBooleanValue(string, bool)

bool GetBooleanValue(string name, bool defaultValue)

Parameters

NameTypeDescription
name string
defaultValue bool

Returns

bool

GetByPrefix(string)

Gets all properties whose name starts with the specified prefix.

IEnumerable<CustomProperty> GetByPrefix(string prefix)

Parameters

NameTypeDescription
prefix string

Returns

IEnumerable<CustomProperty>

GetDateTimeOffsetValue(string)

Gets or sets the value of the property with the specified name, as a DateTimeOffset value

DateTimeOffset? GetDateTimeOffsetValue(string name)

Parameters

NameTypeDescription
name string

Returns

DateTimeOffset?

Remarks

Returns null if the property does not exist or its value cannot be converted to DateTimeOffset.

GetDateTimeValue(string)

Gets or sets the value of the property with the specified name, as a DateTime value

DateTime? GetDateTimeValue(string name)

Parameters

NameTypeDescription
name string

Returns

DateTime?

Remarks

Returns null if the property does not exist or its value cannot be converted to DateTime.

GetDecimalValue(string)

Gets or sets the value of the property with the specified name, as a decimal value

decimal? GetDecimalValue(string name)

Parameters

NameTypeDescription
name string

Returns

decimal?

Remarks

Returns null if the property does not exist or its value cannot be converted to decimal.

GetDecimalValue(string, decimal)

decimal GetDecimalValue(string name, decimal defaultValue)

Parameters

NameTypeDescription
name string
defaultValue decimal

Returns

decimal

GetIntegerValue(string)

Gets or sets the value of the property with the specified name, as an integer value

int? GetIntegerValue(string name)

Parameters

NameTypeDescription
name string

Returns

int?

Remarks

Returns null if the property does not exist or its value cannot be converted to int.

GetIntegerValue(string, int)

int GetIntegerValue(string name, int defaultValue)

Parameters

NameTypeDescription
name string
defaultValue int

Returns

int

GetProperty(int)

Gets the property at the specified index;

CustomProperty GetProperty(int index)

Parameters

NameTypeDescription
index int

The zero-based index of the property to get.

Returns

CustomProperty

The property at the requested index. Throws an exception if the index is not valid.

Remarks

Adding or updating properties in this collection only affects the job instance in which the script is running.

GetProperty(string)

Gets the property at the specified index;

CustomProperty GetProperty(string name)

Parameters

NameTypeDescription
name string

The name (case-insensitive) of the property to get.

Returns

CustomProperty

The requested property, or null if no property exists with that name.

GetStringValue(string)

Gets or sets the value of the property with the specified name, as a string value

string GetStringValue(string name)

Parameters

NameTypeDescription
name string

Returns

string

Remarks

Returns null if the property does not exist.

GetStringValue(string, string)

string GetStringValue(string name, string defaultValue)

Parameters

NameTypeDescription
name string
defaultValue string

Returns

string

Remove(CustomProperty)

Removes the specified property

void Remove(CustomProperty property)

Parameters

NameTypeDescription
property CustomProperty

Remove(string)

Removes the property with the specified name.

void Remove(string name)

Parameters

NameTypeDescription
name string

SetBooleanValue(string, bool?)

void SetBooleanValue(string name, bool? value)

Parameters

NameTypeDescription
name string
value bool?

SetDateTimeOffsetValue(string, DateTimeOffset?)

void SetDateTimeOffsetValue(string name, DateTimeOffset? value)

Parameters

NameTypeDescription
name string
value DateTimeOffset?

SetDateTimeValue(string, DateTime?)

void SetDateTimeValue(string name, DateTime? value)

Parameters

NameTypeDescription
name string
value DateTime?

SetDecimalValue(string, decimal?)

void SetDecimalValue(string name, decimal? value)

Parameters

NameTypeDescription
name string
value decimal?

SetIntegerValue(string, int?)

void SetIntegerValue(string name, int? value)

Parameters

NameTypeDescription
name string
value int?

SetStringValue(string, string)

void SetStringValue(string name, string value)

Parameters

NameTypeDescription
name string
value string

Extension Methods