CollectionExtensions Class

Namespace
Shiny
Base Types
  • object
graph BT Type-->Base0["object"] Type["CollectionExtensions"] class Type type-node

Syntax

public static class CollectionExtensions

Methods

Name Value Summary
Expand<T>(T[], T[]) T[]
Creates a new array and copies the elements from both arrays together
static
Get<T>(IDictionary<string, object>, string, T) T
A safe dictionary Get, will return a default value if the dictionary does not contain the key
static
IsEmpty<T>(IEnumerable<T>) bool
Safely checks an enumerable if it is null or has no elements
static
ToDictionary<TKey, TValue>(IEnumerable<(TKey, TValue)>) IDictionary<TKey, TValue>
Turns a paired key tuple into a dictionary
static

Extension Methods

Name Value Summary
ReflectGet(string) object
Gets an objects property dynamically through reflection - will throw an exception if proper has no getter or property does not exists
ReflectSet(string, object) void
Sets an objects property dynamically through reflection - will throw an exception if proper has no setter, wrong type, or property does not exists
GitHub