Show / Hide Table of Contents

Class DictionaryExtensions

Dictionary extension methods

Inheritance
object
DictionaryExtensions
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: PayrollEngine.Client.Scripting
Assembly: PayrollEngine.Client.Scripting.dll
Syntax
public static class DictionaryExtensions

Methods

View Source

GetValue(Dictionary<string, object>, string, object)

Get string/object dictionary value

Declaration
public static object GetValue(this Dictionary<string, object> dictionary, string key, object defaultValue = null)
Parameters
Type Name Description
Dictionary<string, object> dictionary
string key

The value key

object defaultValue

The default value

Returns
Type Description
object

The dictionary value

View Source

GetValue<T>(Dictionary<string, object>, string, T)

Get string/T dictionary value

Declaration
public static T GetValue<T>(this Dictionary<string, object> dictionary, string key, T defaultValue = default)
Parameters
Type Name Description
Dictionary<string, object> dictionary
string key

The value key

T defaultValue

The default value

Returns
Type Description
T

The dictionary value

Type Parameters
Name Description
T
View Source

GetValue<T>(Dictionary<string, string>, string, string, T)

Get value from a string/JSON-string dictionary

Declaration
public static T GetValue<T>(this Dictionary<string, string> dictionary, string dictionaryKey, string objectKey, T defaultValue = default)
Parameters
Type Name Description
Dictionary<string, string> dictionary

The dictionary

string dictionaryKey

The dictionary key

string objectKey

The object key

T defaultValue

The default value

Returns
Type Description
T

The dictionary value

Type Parameters
Name Description
T
  • View Source
☀
☾
Back to top Generated by DocFX