Esempio n. 1
0
        public PopulatableScope(PopulatableScope parent)
        {
            if (parent == null)
            {
                throw new ArgumentNullException(nameof(parent));
            }

            Parent           = Possibly.Is(parent);
            finalizableScope = new FinalizableScope(this);
        }
Esempio n. 2
0
 public PopulatableScopeTemplate(IGenericTypeParameterPlacholder[] typeParameterDefinitions, PopulatableScope parent) : base(parent)
 {
     TypeParameterDefinitions = typeParameterDefinitions ?? throw new ArgumentNullException(nameof(typeParameterDefinitions));
     foreach (var item in typeParameterDefinitions)
     {
         // for the sake of validation type parameters are types
         if (!TryAddType(item.Key, new Box <IIsPossibly <IFrontendType> >(Possibly.Is <IFrontendType>(PrimitiveTypes.CreateGenericTypeParameterPlacholder(item.Key)))))
         {
             throw new Exception("that is not right!");
         }
     }
 }
Esempio n. 3
0
 public FinalizableScope(PopulatableScope owner)
 {
     this.owner = owner;
 }