Table of Contents

Class ClassManager<T>

Namespace
LibGameAI.Util
Assembly
Util.dll

Singleton class used for finding and keeping a record of concrete classes of a given generic type.

public class ClassManager<T>

Type Parameters

T
Inheritance
ClassManager<T>
Inherited Members

Properties

ClassNames

Array of class names.

public string[] ClassNames { get; }

Property Value

string[]

Names of known classes of type T.

Instance

Returns the singleton instance of this class.

public static ClassManager<T> Instance { get; }

Property Value

ClassManager<T>

The singleton instance of this class.

Methods

FilterTypes(Func<Type, bool>)

Filter out types that are not of interest to the client.

public ClassManager<T> FilterTypes(Func<Type, bool> filter)

Parameters

filter Func<Type, bool>

Filter to apply, returns true if class is to keep, or false otherwise.

Returns

ClassManager<T>

This instance, for use in fluent syntax.

GetNameFromType(Type)

Get name from type.

public string GetNameFromType(Type type)

Parameters

type Type

Type of class.

Returns

string

Name of class.

GetTypeFromName(string)

Get class type from class name.

public Type GetTypeFromName(string name)

Parameters

name string

Name of class.

Returns

Type

The class's type.

ReplaceNames(Func<string, string>)

Replace default names with which the classes are known.

public ClassManager<T> ReplaceNames(Func<string, string> replacer)

Parameters

replacer Func<string, string>

Delegate to perform name replacement.

Returns

ClassManager<T>

This instance, for use in fluent syntax.