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> > >()); }
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"); }