Beispiel #1
0
 public Event <TEventType> GetEvent <TEventType>() where TEventType : new()
 {
     if (!EventAttribute.IsEventType(typeof(TEventType)))
     {
         return(null);
     }
     return(new Event <TEventType>(EthApiContractService.Client, ContractAddress));
 }
 public Event <TEventType> GetEvent <TEventType>(string contractAddress) where TEventType : IEventDTO, new()
 {
     if (!EventAttribute.IsEventType(typeof(TEventType)))
     {
         throw new ArgumentException("The type given is not a valid Event");
     }
     return(new Event <TEventType>(Client, contractAddress));
 }
 public Event <TEventType> GetEvent <TEventType>() where TEventType : new()
 {
     if (!EventAttribute.IsEventType(typeof(TEventType)))
     {
         throw new ArgumentException("The type given is not a valid Event");
     }
     ;
     return(new Event <TEventType>(Client));
 }
        public Event GetEvent <TEventType>()
        {
            if (!EventAttribute.IsEventType(typeof(TEventType)))
            {
                return(null);
            }
            var attribute = EventAttribute.GetAttribute <TEventType>();
            var contract  = new Contract(EthApiContractService, typeof(TEventType), ContractAddress);

            return(contract.GetEvent(attribute.Name));
        }