Ejemplo n.º 1
0
 public UpdateAllotmentEvent(
     long allotmentEventId,
     string transactionHash,
     AllotmentEventOperation operation,
     long userId)
 {
     AllotmentEventId = allotmentEventId;
     TransactionHash  = transactionHash;
     Operation        = operation;
     UserId           = userId;
 }
        private static EthereumTransactionType GetTransactionType(AllotmentEventOperation operation)
        {
            switch (operation)
            {
            case AllotmentEventOperation.Start:
                return(EthereumTransactionType.StartAllotmentEvent);

            case AllotmentEventOperation.PlaceBid:
                return(EthereumTransactionType.PlaceAllotmentEventBid);

            case AllotmentEventOperation.ReceiveShare:
                return(EthereumTransactionType.ReceiveAllotmentEventShare);

            case AllotmentEventOperation.Edit:
                return(EthereumTransactionType.EditAllotmentEvent);

            case AllotmentEventOperation.Delete:
                return(EthereumTransactionType.DeleteAllotmentEvent);

            default:
                throw new ArgumentOutOfRangeException(nameof(operation), operation, null);
            }
        }