示例#1
0
        private static FastEvent GetEvent(Type type, string name)
        {
            FastEvent evt = FastEvent.Get(type, name);

            if (evt == null)
            {
                throw new ArgumentException(string.Format("Cannot find the specified event '{0}' in the type {1}.", name,
                                                          type));
            }
            return(evt);
        }
示例#2
0
        private static FastEvent <T, THandler> GetEvent <T, THandler>(string name)
        {
            FastEvent <T, THandler> evt = FastEvent <T, THandler> .Get(name);

            if (evt == null)
            {
                throw new ArgumentException(string.Format("Cannot find the specified event '{0}' in the type {1}.", name,
                                                          typeof(T)));
            }
            return(evt);
        }
示例#3
0
        private static FastEvent <T> CreateEvent(string name)
        {
            EventInfo info = FastEvent.GetEvent(typeof(T), name);

            return(info == null ? null : new FastEvent <T>(info));
        }