C# Класс Antmicro.Migrant.Utilities.SwapList

Key/value pair list in which more generic types are always inserted after their specializations.
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
GenericIsMatch bool
InnerAddOrReplace int
IsMatch bool

Открытые методы

Метод Описание
AddGenericTemplate ( Type genericType, Delegate>.Func actualDelegateGenerator ) : void

Adds new key/dynamically generated pair or replaces one if the key already exists.

AddOrReplace ( Type key, Delegate value ) : void

Adds new key/value pair or replaces existing one if the key already exists.

FindMatchingIndex ( Type value ) : int

Finds the index of the delegate that matches given type.

GetByIndex ( int index ) : Delegate

Gets a delegate by an index.

SwapList ( ) : System

Initializes a new instance of the Antmicro.Migrant.Utilities.SwapList class.

Приватные методы

Метод Описание
GenericIsMatch ( Type candidate, Type value ) : bool
InnerAddOrReplace ( Type key, Delegate value, Delegate>.Func valueCreator ) : int
IsMatch ( Type candidate, Type value ) : bool

Описание методов

AddGenericTemplate() публичный Метод

Adds new key/dynamically generated pair or replaces one if the key already exists.
public AddGenericTemplate ( Type genericType, Delegate>.Func actualDelegateGenerator ) : void
genericType System.Type Key.
actualDelegateGenerator Delegate>.Func Function generating final value.
Результат void

AddOrReplace() публичный Метод

Adds new key/value pair or replaces existing one if the key already exists.
public AddOrReplace ( Type key, Delegate value ) : void
key System.Type Key.
value System.Delegate Value.
Результат void

FindMatchingIndex() публичный Метод

Finds the index of the delegate that matches given type.
public FindMatchingIndex ( Type value ) : int
value System.Type Type to match.
Результат int

GetByIndex() публичный Метод

Gets a delegate by an index.
public GetByIndex ( int index ) : Delegate
index int The index of the element.
Результат System.Delegate

SwapList() публичный Метод

Initializes a new instance of the Antmicro.Migrant.Utilities.SwapList class.
public SwapList ( ) : System
Результат System