예제 #1
0
        public TDelegate AddOrUpdate(IndirectionInfo info, TDelegate method)
        {
            var key = info.AssemblyName + ", " + info.TypeFullName + ", " + info.MethodName;

            if (m_dict.ContainsKey(key))
            {
                m_dict.Add(key, method);
            }
            else
            {
                m_dict[key] = method;
            }
            return(method);
        }
예제 #2
0
        public bool TryGet(IndirectionInfo info, out TDelegate method)
        {
            var key = info.AssemblyName + ", " + info.TypeFullName + ", " + info.MethodName;

            if (m_dict.ContainsKey(key))
            {
                method = m_dict[key];
                return(true);
            }
            else
            {
                method = default(TDelegate);
                return(false);
            }
        }