Ejemplo n.º 1
0
        public Binding GetOverrideBinding(Type type, string name)
        {
            // TODO: Root create
            foreach (var arg in _args)
            {
                if (arg.Match(type, name))
                {
                    return(c => arg.Value);
                }
            }

            return(_kernel.GetOverrideBinding(type, name));
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Returns binding for argument
 /// </summary>
 private static Binding GetArgBinding(this IGetKernel kernel, Type type, string name)
 {
     return(kernel.GetOverrideBinding(type, name) ?? kernel.GetBinding(type));
 }