예제 #1
0
 public static EventABI GetEvent <TEvent>()
 {
     if (!_eventAbiRegistry.ContainsKey(typeof(TEvent)))
     {
         _eventAbiRegistry[typeof(TEvent)] = _abiExtractor.ExtractEventABI(typeof(TEvent));
     }
     return(_eventAbiRegistry[typeof(TEvent)]);
 }
예제 #2
0
        public static EventABI GetEvent(Type type)
        {
            if (!_eventAbiRegistry.ContainsKey(type))
            {
                var eventABI = _abiExtractor.ExtractEventABI(type);
                if (null == eventABI)
                {
                    throw new ArgumentException(type.ToString() + " is not a valid Event Type");
                }

                _eventAbiRegistry[type] = eventABI;
            }
            return(_eventAbiRegistry[type]);
        }