Esempio n. 1
0
        void ParseMethodAttributes <T> (Type type, InjectionInfo info) where T : Attribute
        {
            var methods = type.GetMethods();
            IList <MethodInfo> taggedMethods = null;

            for (int i = 0; i < methods.Length; i++)
            {
                var method     = methods[i];
                var attributes = method.GetCustomAttributes(true);

                for (int j = 0; j < attributes.Length; j++)
                {
                    if (attributes[j] is T)
                    {
                        taggedMethods = taggedMethods ?? info.GetCalls <T>();
                        taggedMethods.Add(method);
                    }
                }
            }
        }