Table of Contents

Interface IGenerator

Namespace
LfrlAnvil.Generators
Assembly
LfrlAnvil.Core.dll

Represents a type-erased generator of objects.

public interface IGenerator
Extension Methods

Methods

Generate()

Generates a new object.

object? Generate()

Returns

object

Generated object.

Exceptions

ValueGenerationException

When object could not be generated.

TryGenerate(out object?)

Attempts to generate a new object.

bool TryGenerate(out object? result)

Parameters

result object

out parameter that returns generated object, if successful.

Returns

bool

true when object was generated successfully, otherwise false.