Skip to content

Split Analyzer Runner Suite #504

@Noggog

Description

@Noggog

Should be split into one runner that is known to run against an environment, and needs all the deets in order to be constructed

And another one that is known to just run on content in isolation, and needs way less to construct


Copypasta

I almost wonder if we should have two analyzer runner/builder offerings. One that is contextual and is built on a GameEnvironment. And another that is explicitly not contextual, and will just analyze what you give it in isolation

// Running on a whole game environment
public interface IGameEnvironmentAnalyzerRunner
{
    // But only executing a subset of the analyzers depending on what you call
    Task<IEnumerable<AnalyzerResult>> Analyze(ModKey mod);

    // This one finds the record as it is in the game environment and analyzes it
    Task<IEnumerable<AnalyzerResult>> Analyze<TMajorRecord>(IFormLinkGetter<TMajorRecord> record)
        where TMajorRecord : IMajorRecordGetter;

    // This one is offered as convenience, but analyzes the given major record as if it was part of a new winningmost mod
    Task<IEnumerable<AnalyzerResult>> Analyze<TMajorRecord>(TMajorRecord record)
        where TMajorRecord : IMajorRecordGetter;
}
// Running on content given only, in isolation
public interface IIsolatedAnalyzerRunner
{
    Task<IEnumerable<AnalyzerResult>> Analyze(IModGetter mod);
    Task<IEnumerable<AnalyzerResult>> Analyze<TMajorRecord>(TMajorRecord record)
        where TMajorRecord : IMajorRecordGetter;
}

This could be made via a different builder that doesn't require any linkcache/load order at all, but in turn, only offers isolated functionality

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions