Ejemplo n.º 1
0
        internal static InjectionHook HookFor(FieldInfo fieldInfo)
        {
            InjectionHook hook;

            if (s_HasHooks)
            {
                using (List <InjectionHook> .Enumerator enumerator = k_Hooks.GetEnumerator())
                {
                    while (true)
                    {
                        if (!enumerator.MoveNext())
                        {
                            break;
                        }
                        InjectionHook current = enumerator.Current;
                        if (current.IsInterestedInField(fieldInfo))
                        {
                            return(current);
                        }
                    }
                }
                hook = null;
            }
            else
            {
                hook = null;
            }
            return(hook);
        }