Esempio n. 1
0
        internal override List <IBinding> GetBindings()
        {
            List <IBinding> bindings = new List <IBinding>();

            bindings.AddRange(BaseModule.GetBindings());

            // this will prevent 'silently' overriding bad bindings in the base module
            foreach (var binding in bindings)
            {
                CacheBinding(binding);
            }

            List <IBinding> overriddenBindings = new List <IBinding>();

            overriddenBindings.AddRange(OverriddenModule.GetBindings());

            foreach (var binding in overriddenBindings)
            {
                if (IsCached(binding.BaseType, binding.Name))
                {
                    continue;
                }

                bindings.Add(binding);
                CacheBinding(binding);
            }

            return(bindings);
        }