Table of Contents

Class GenerateResultAttribute

Namespace
Olve.Results
Assembly
Olve.Results.dll

Marks a partialstruct for which Olve.Results generates multi-state result boilerplate. Each state is declared as a static partial factory method annotated with SuccessCaseAttribute, ErrorCaseAttribute or GreyCaseAttribute. The generator emits the factory bodies, a state discriminator, per-case Is… predicates, Succeeded/Failed, and an exhaustive Match.

[AttributeUsage(AttributeTargets.Struct, Inherited = false, AllowMultiple = false)]
public sealed class GenerateResultAttribute : Attribute
Inheritance
GenerateResultAttribute
Inherited Members

Remarks

Generalizes the hand-written DeletionResult pattern. See issue #55.