Search Results for

    Show / Hide Table of Contents

    Class InitializationMethodManager

    Singleton class that uses reflection to manage all initialization methods, providing an interface to access their names and parameters and to execute them to initialize the system.

    Inheritance
    object
    InitializationMethodManager
    Namespace: AS2
    Assembly: .dll
    Syntax
    public class InitializationMethodManager

    Constructors

    | Edit this page View Source

    InitializationMethodManager()

    Declaration
    public InitializationMethodManager()

    Fields

    | Edit this page View Source

    GenerationMethodName

    Declaration
    private static readonly string GenerationMethodName
    Field Value
    Type Description
    string
    | Edit this page View Source

    algorithms

    Declaration
    private Dictionary<string, InitializationMethodManager.AlgorithmInfo> algorithms
    Field Value
    Type Description
    Dictionary<string, InitializationMethodManager.AlgorithmInfo>
    | Edit this page View Source

    instance

    Declaration
    private static InitializationMethodManager instance
    Field Value
    Type Description
    InitializationMethodManager

    Properties

    | Edit this page View Source

    Instance

    The singleton instance of this class.

    Declaration
    public static InitializationMethodManager Instance { get; }
    Property Value
    Type Description
    InitializationMethodManager

    Methods

    | Edit this page View Source

    FindAlgorithm(string)

    Tries to get the generation method with the given name.

    Declaration
    private InitializationMethodManager.AlgorithmInfo FindAlgorithm(string name)
    Parameters
    Type Name Description
    string name

    The string ID of the generation method.

    Returns
    Type Description
    InitializationMethodManager.AlgorithmInfo

    The record of the generation method with name name if it exists, otherwise null.

    | Edit this page View Source

    GenerateSystem(ParticleSystem, string)

    Calls the specified generation method to initialize the given system with no parameters.

    Declaration
    public bool GenerateSystem(ParticleSystem system, string algorithmName)
    Parameters
    Type Name Description
    ParticleSystem system

    The system to initialize.

    string algorithmName

    The string ID of the generation method.

    Returns
    Type Description
    bool

    true if and only if the generation method was executed successfully.

    | Edit this page View Source

    GenerateSystem(ParticleSystem, string, object[])

    Calls the specified generation method to initialize the given system with the given parameters.

    Declaration
    public bool GenerateSystem(ParticleSystem system, string algorithmName, object[] parameters)
    Parameters
    Type Name Description
    ParticleSystem system

    The system to initialize.

    string algorithmName

    The string ID of the generation method.

    object[] parameters

    The parameters to be forwarded to the generation method.

    Returns
    Type Description
    bool

    true if and only if the generation method was executed successfully.

    | Edit this page View Source

    GetAlgorithmNames()

    Gets a list of all known generation method names.

    Declaration
    public List<string> GetAlgorithmNames()
    Returns
    Type Description
    List<string>

    A list containing the names of all generation methods.

    | Edit this page View Source

    GetAlgorithmParameters(string)

    Gets the parameters of the generation method.

    Declaration
    public ParameterInfo[] GetAlgorithmParameters(string algorithmName)
    Parameters
    Type Name Description
    string algorithmName

    The string ID of the generation method.

    Returns
    Type Description
    ParameterInfo[]

    An array containing the parameters of the generation method, if the algorithm exists and it implements this method, otherwise null.

    | Edit this page View Source

    IsAlgorithmKnown(string)

    Checks if the given generation method name is known.

    Declaration
    public bool IsAlgorithmKnown(string name)
    Parameters
    Type Name Description
    string name

    The string ID to check.

    Returns
    Type Description
    bool

    true if and only if a generation method with the given name is registered.

    • Edit this page
    • View Source
    In this article
    Back to top AmoebotSim 2.0 Documentation v1.11
    Copyright © 2025 AmoebotSim 2.0 Authors
    Generated by DocFX