Show / Hide Table of Contents

Class ConvertibleConverterDictionary

Represents a collection of function delegates that converts an IConvertible implementation to its byte[] equivalent.

Inheritance
Object
ConvertibleConverterDictionary
Implements
IReadOnlyDictionary<Type, Func<IConvertible, Byte[]>>
IReadOnlyCollection<KeyValuePair<Type, Func<IConvertible, Byte[]>>>
IEnumerable<KeyValuePair<Type, Func<IConvertible, Byte[]>>>
IEnumerable
Namespace: Cuemon
Assembly: Cuemon.Core.dll
Syntax
public class ConvertibleConverterDictionary : IReadOnlyDictionary<Type, Func<IConvertible, byte[]>>, IReadOnlyCollection<KeyValuePair<Type, Func<IConvertible, byte[]>>>, IEnumerable<KeyValuePair<Type, Func<IConvertible, byte[]>>>, IEnumerable

Properties

| Improve this Doc View Source

Count

Gets the number of converters contained in this instance.

Declaration
public int Count { get; }
Property Value
Type Description
Int32

The number of converters contained in this instance.

| Improve this Doc View Source

Item[Type]

Gets the function delegate that converts an IConvertible implementation to its byte[] equivalent from the specified type.

Declaration
public Func<IConvertible, byte[]> this[Type type] { get; }
Parameters
Type Name Description
Type type

The type that implements IConvertible.

Property Value
Type Description
Func<IConvertible, Byte[]>

The function delegate associated with the specified type; null if no association exists.

| Improve this Doc View Source

Keys

Gets an enumerable collection that contains the keys in the dictionary.

Declaration
public IEnumerable<Type> Keys { get; }
Property Value
Type Description
IEnumerable<Type>

An enumerable collection that contains the keys in the dictionary.

| Improve this Doc View Source

Values

Gets an enumerable collection that contains the values in the dictionary.

Declaration
public IEnumerable<Func<IConvertible, byte[]>> Values { get; }
Property Value
Type Description
IEnumerable<Func<IConvertible, Byte[]>>

An enumerable collection that contains the values in the dictionary.

Methods

| Improve this Doc View Source

Add(Type, Func<IConvertible, Byte[]>)

Adds the function delegate that converts an IConvertible implementation to its byte[] equivalent to the specified type.

Declaration
public ConvertibleConverterDictionary Add(Type type, Func<IConvertible, byte[]> converter)
Parameters
Type Name Description
Type type

The type that implements IConvertible.

Func<IConvertible, Byte[]> converter

The function delegate that converts an IConvertible implementation to its byte[] equivalent.

Returns
Type Description
ConvertibleConverterDictionary

An ConvertibleConverterDictionary that can be used to further configure other converters.

Exceptions
Type Condition
ArgumentNullException

type is null.

ArgumentOutOfRangeException

type does not implement IConvertible.

| Improve this Doc View Source

Add<T>(Func<T, Byte[]>)

Adds the function delegate that converts an IConvertible implementation to its byte[] equivalent to the specified T.

Declaration
public ConvertibleConverterDictionary Add<T>(Func<T, byte[]> converter)

    where T : IConvertible
Parameters
Type Name Description
Func<T, Byte[]> converter

The function delegate that converts an IConvertible implementation to its byte[] equivalent.

Returns
Type Description
ConvertibleConverterDictionary

An ConvertibleConverterDictionary that can be used to further configure other converters.

Type Parameters
Name Description
T

The type that implements IConvertible.

Exceptions
Type Condition
TypeArgumentOutOfRangeException

T does not implement IConvertible.

| Improve this Doc View Source

ContainsKey(Type)

Determines whether the dictionary contains an element that has the specified key.

Declaration
public bool ContainsKey(Type key)
Parameters
Type Name Description
Type key

The key to locate.

Returns
Type Description
Boolean

true if the dictionary contains an element that has the specified key; otherwise, false.

| Improve this Doc View Source

GetEnumerator()

Returns an enumerator that iterates through the collection.

Declaration
public IEnumerator<KeyValuePair<Type, Func<IConvertible, byte[]>>> GetEnumerator()
Returns
Type Description
IEnumerator<KeyValuePair<Type, Func<IConvertible, Byte[]>>>

An enumerator that can be used to iterate through the collection.

| Improve this Doc View Source

TryGetValue(Type, out Func<IConvertible, Byte[]>)

Gets the value that is associated with the specified key.

Declaration
public bool TryGetValue(Type key, out Func<IConvertible, byte[]> value)
Parameters
Type Name Description
Type key

The key to locate.

Func<IConvertible, Byte[]> value

When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.

Returns
Type Description
Boolean

true if the dictionary contains an element that has the specified key; otherwise, false.

Exceptions
Type Condition
ArgumentNullException

key is null.

Explicit Interface Implementations

| Improve this Doc View Source

IEnumerable.GetEnumerator()

Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type Description
IEnumerator

Implements

System.Collections.Generic.IReadOnlyDictionary<TKey,TValue>
System.Collections.Generic.IReadOnlyCollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright 2008-2022 Geekle. All rights reserved. Code with passion and love; deploy with confidence. 👨‍💻️🔥❤️🚀😎
Generated by DocFX