Example #1
0
        public ConfigurationModuleBuilder BindList <U, T>(GenericType <U> iface, IImpl <IList <T> > opt)
            where U : Name <IList <T> >
        {
            ConfigurationModuleBuilder c = DeepCopy();
            Type ifaceType = typeof(U);

            c.ProcessUse(opt);
            c.FreeImpls.Add(ifaceType, opt);
            return(c);
        }
Example #2
0
        public ConfigurationModuleBuilder BindNamedParameter <U, T>(GenericType <U> name, IParam <T> opt)
            where U : Name <T>
        {
            ConfigurationModuleBuilder c = DeepCopy();

            c.ProcessUse(opt);
            Type nameType = typeof(U);

            c.FreeParams.Add(nameType, opt);
            return(c);
        }
Example #3
0
        public ConfigurationModuleBuilder BindImplementation <U, T>(GenericType <T> iface, IImpl <U> opt)
            where U : T
        {
            ConfigurationModuleBuilder c = DeepCopy();

            c.ProcessUse(opt);
            Type ifaceType = typeof(T);

            c.FreeImpls.Add(ifaceType, opt);
            return(c);
        }
Example #4
0
        public ConfigurationModuleBuilder BindConstructor <T, U>(GenericType <T> cons, IImpl <U> v)
            where U : IExternalConstructor <T>
        {
            ConfigurationModuleBuilder c = DeepCopy();

            c.ProcessUse(v);
            Type consType = typeof(T);
            var  i        = (IImpl <object>)v;

            c.FreeImpls.Add(consType, i);
            return(c);
        }
Example #5
0
        // public final <T> ConfigurationModuleBuilder bindNamedParameter(Class<? extends Name<T>> iface, Impl<? extends T> opt)
        //if ValueType is T, you would better to use public ConfigurationModuleBuilder BindNamedParameter<U, T>(GenericType<U> iface, IImpl<T> opt)
        public ConfigurationModuleBuilder BindNamedParameter <U, V, T>(GenericType <U> iface, IImpl <V> opt)
            where U : Name <T>
            where V : T
        {
            ConfigurationModuleBuilder c = DeepCopy();

            c.ProcessUse(opt);
            Type ifaceType = typeof(U);

            c.FreeImpls.Add(ifaceType, opt);
            return(c);
        }
Example #6
0
        public ConfigurationModuleBuilder BindSetEntry <U, T>(GenericType <U> iface, IParam <T> opt)
            where U : Name <ISet <T> >
        {
            ConfigurationModuleBuilder c = DeepCopy();
            Type ifaceType = typeof(U);

            c.ProcessUse(opt);

            c.FreeParams.Add(ifaceType, opt);
            if (!SetOpts.Contains(opt))
            {
                c.SetOpts.Add(opt);
            }
            return(c);
        }