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
|
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:
|
Full Usage:
this.DoesNotContainKey
Parameters:
'TKey
Returns: bool
|
Determines whether the Dictionary does not contains the specified key. not(dic.ContainsKey(key))
Extended Type:
|
Full Usage:
this.GetValue
Parameters:
'TKey
Returns: 'TValue
|
|
Full Usage:
this.Items
Parameters:
unit
Returns: ('TKey * 'TValue) seq
|
Returns a lazy seq of key and value tuples
Extended Type:
|
Full Usage:
this.KeysSeq
Parameters:
unit
Returns: 'TKey seq
|
|
Full Usage:
this.Pop
Parameters:
'TKey
Returns: 'TValue
|
Get a value and remove it from Dictionary, like *.pop() in Python.
Extended Type:
|
Full Usage:
this.SetValue
Parameters:
'TKey
v : 'TValue
|
Set/add value at key, with nicer error messages.
Same as
Extended Type:
|
Full Usage:
this.ToString
Parameters:
int
Returns: string
|
A string representation of the IDictionary including the count of entries and the specified amount of entries.
Extended Type:
|
Full Usage:
this.TryPop
Parameters:
'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:
|
Full Usage:
this.ValuesSeq
Parameters:
unit
Returns: 'TValue seq
|
Dicts