private static InjectionStrategy ProcessInjectionStrategy(RegisterFlags flags)
        {
            var injectionStrategy = InjectionStrategy.Once;

            if (flags.Has(RegisterFlags.PreventInjections))
            {
                injectionStrategy = InjectionStrategy.Never;
            }
            else if (flags.Has(RegisterFlags.NoCache))
            {
                injectionStrategy = InjectionStrategy.Always;
            }

            return(injectionStrategy);
        }
 private static void Store <T> (IDictionary <Type, T> dict, Type key, T value, RegisterFlags flags)
 {
     if (!dict.AddNewEntry(key, value))
     {
         if (flags.Has(RegisterFlags.Rebind))
         {
             dict.UpdateEntry(key, value);
         }
         else
         {
             throw new AlreadyRegisteredException(key + " not storable in " + dict);
         }
     }
 }