C# Class Antmicro.Migrant.Utilities.SwapList

Key/value pair list in which more generic types are always inserted after their specializations.
Afficher le fichier Open project: antmicro/Migrant Class Usage Examples

Private Properties

Свойство Type Description
GenericIsMatch bool
InnerAddOrReplace int
IsMatch bool

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
GenericIsMatch ( Type candidate, Type value ) : bool
InnerAddOrReplace ( Type key, Delegate value, Delegate>.Func valueCreator ) : int
IsMatch ( Type candidate, Type value ) : bool

Method Details

AddGenericTemplate() public méthode

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.
Résultat void

AddOrReplace() public méthode

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.
Résultat void

FindMatchingIndex() public méthode

Finds the index of the delegate that matches given type.
public FindMatchingIndex ( Type value ) : int
value System.Type Type to match.
Résultat int

GetByIndex() public méthode

Gets a delegate by an index.
public GetByIndex ( int index ) : Delegate
index int The index of the element.
Résultat System.Delegate

SwapList() public méthode

Initializes a new instance of the Antmicro.Migrant.Utilities.SwapList class.
public SwapList ( ) : System
Résultat System