Header menu logo Dicts

ExtensionsIDictionary Module

Provides Extensions for IDictionary<'K,'V> interface. Such as Items as key value tuples , Pop(key) or GetValue with nicer error message)

Type extensions

Type extension Description

this.AsString

Full Usage: this.AsString

Parameters:
    () : unit

Returns: string

A string representation of the IDictionary including the count of entries and the first 5 entries.

Extended Type: IDictionary

() : unit
Returns: string

this.DoesNotContainKey

Full Usage: this.DoesNotContainKey

Parameters:
    key : 'TKey

Returns: bool

Determines whether the Dictionary does not contains the specified key. not(dic.ContainsKey(key))

Extended Type: IDictionary

key : 'TKey
Returns: bool

this.GetValue

Full Usage: this.GetValue

Parameters:
    k : 'TKey

Returns: 'TValue

Get value at key, with nicer error messages.

Extended Type: IDictionary

k : 'TKey
Returns: 'TValue

this.Items

Full Usage: this.Items

Parameters:
    () : unit

Returns: ('TKey * 'TValue) seq

Returns a lazy seq of key and value tuples

Extended Type: IDictionary

() : unit
Returns: ('TKey * 'TValue) seq

this.KeysSeq

Full Usage: this.KeysSeq

Parameters:
    () : unit

Returns: 'TKey seq

Returns a (lazy) sequence of Keys

Extended Type: IDictionary

() : unit
Returns: 'TKey seq

this.Pop

Full Usage: this.Pop

Parameters:
    k : 'TKey

Returns: 'TValue

Get a value and remove it from Dictionary, like *.pop() in Python.

Extended Type: IDictionary

k : 'TKey
Returns: 'TValue

this.SetValue

Full Usage: this.SetValue

Parameters:
    k : 'TKey
    v : 'TValue

Set/add value at key, with nicer error messages. Same as Dicts.addValue key value

Extended Type: IDictionary

k : 'TKey
v : 'TValue

this.ToString

Full Usage: this.ToString

Parameters:
    entriesToPrint : int

Returns: string

A string representation of the IDictionary including the count of entries and the specified amount of entries.

Extended Type: IDictionary

entriesToPrint : int
Returns: string

this.TryPop

Full Usage: this.TryPop

Parameters:
    k : 'TKey

Returns: 'TValue option

Try to get a value and remove it from Dictionary, like *.pop() in Python. Returns None if key is not found.

Extended Type: IDictionary

k : 'TKey
Returns: 'TValue option

this.ValuesSeq

Full Usage: this.ValuesSeq

Parameters:
    () : unit

Returns: 'TValue seq

Returns a (lazy) sequence of values

Extended Type: IDictionary

() : unit
Returns: 'TValue seq

Type something to start searching.