Exemple #1
0
 internal static IIsPossibly <IBox <IIsPossibly <IFrontendType> > > PossiblyGetType(this IResolvableScope scope, IKey name)
 {
     if (scope.TryGetType(name, out var thing))
     {
         return(Possibly.Is(thing));
     }
     return(Possibly.IsNot <IBox <IIsPossibly <IFrontendType> > >());
 }
Exemple #2
0
 internal static IBox <IIsPossibly <IFrontendType> > GetTypeOrThrow(this IResolvableScope scope, IKey name)
 {
     if (scope.TryGetType(name, out var thing))
     {
         return(thing);
     }
     throw new Exception($"{name} should exist in scope");
 }