Table of Contents

Struct SettingDefinition<T>

Namespace
WindowSill.API
Assembly
WindowSill.API.dll

Represents the definition of a setting in the application.

public readonly struct SettingDefinition<T> : IEquatable<SettingDefinition<T>>

Type Parameters

T

The type of value of the setting

Implements
Inherited Members
Extension Methods

Constructors

SettingDefinition(T, Assembly, string)

Initializes a new instance of the SettingDefinition<T> structure.

public SettingDefinition(T defaultValue, Assembly callingAssembly, string name = null)

Parameters

defaultValue T

The default value of the setting.

callingAssembly Assembly

The assembly that creates this setting.

name string

The name of the setting. Should be unique.

Properties

DefaultValue

Gets the default value of the setting.

public T DefaultValue { get; }

Property Value

T

Name

Gets the name of the setting.

public string Name { get; }

Property Value

string

Methods

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

Equals(SettingDefinition<T>)

Determines whether the specified SettingDefinition<T> is equal to the current SettingDefinition<T>.

public bool Equals(SettingDefinition<T> other)

Parameters

other SettingDefinition<T>

The SettingDefinition<T> to compare with the current SettingDefinition<T>.

Returns

bool

true if the specified SettingDefinition<T> is equal to the current SettingDefinition<T>; otherwise, false.

GetHashCode()

Returns the hash code for this SettingDefinition<T>.

public override int GetHashCode()

Returns

int

A 32-bit signed integer hash code.

Operators

operator ==(SettingDefinition<T>, SettingDefinition<T>)

Determines whether two specified SettingDefinition<T> objects have the same value.

public static bool operator ==(SettingDefinition<T> left, SettingDefinition<T> right)

Parameters

left SettingDefinition<T>

The first SettingDefinition<T> to compare.

right SettingDefinition<T>

The second SettingDefinition<T> to compare.

Returns

bool

true if the value of left is the same as the value of right; otherwise, false.

operator !=(SettingDefinition<T>, SettingDefinition<T>)

Determines whether two specified SettingDefinition<T> objects have different values.

public static bool operator !=(SettingDefinition<T> left, SettingDefinition<T> right)

Parameters

left SettingDefinition<T>

The first SettingDefinition<T> to compare.

right SettingDefinition<T>

The second SettingDefinition<T> to compare.

Returns

bool

true if the value of left is different from the value of right; otherwise, false.