TortureFileScoped.cs 596 B

123456789101112131415161718192021222324
  1. using Coll = System.Collections.Generic.Dictionary<string, int>;
  2. using Short = SomeType;
  3. using System;
  4. namespace Torture.Scoped;
  5. /// <summary>A positional record with base args.</summary>
  6. public record UserDto(string Name, int Age) : BaseDto(Name), IThing;
  7. public readonly record struct Money(decimal Amount);
  8. public record struct Pointish(int X, int Y);
  9. public record Empty;
  10. public record Bodied(string Label) : BaseDto(Label)
  11. {
  12. public string Loud() { return Shout(Label); }
  13. }
  14. public class Svc(IRepo repo, ICache cache) : Base(repo), IThing
  15. {
  16. public void Go() { repo.Save(1); }
  17. }