Пример #1
0
 protected override void PerformWork(IChainWorkflow workflow, TaskRoutingContext taskRoutingContext)
 {
     // IMessageEnvelope messageEnvelope =  this.centralCoordinator.ChainComponentProvider.AssemblyProvider.GenerateDebugMessage();
     //
     //
     // var validationTask = new NeuraliumValidationTask<ValidationResult>();
     //
     // validationTask.SetAction((validationService, taskRoutingContext) => {
     //  IRoutedTask validateBlockMessageTask = validationService.ValidateBlockchainMessage(messageEnvelope, result => {
     //      validationTask.Results = result;
     //      //TODO: remove this
     //      validationTask.Results = new ValidationResult(ValidationResult.ValidationResults.Valid);
     //  });
     //
     //  taskRoutingContext.AddChild(validateBlockMessageTask);
     // }, (results, taskRoutingContext) => {
     //  if(results.Success) {
     //      if(validationTask.Results.Invalid) {
     //          throw new ApplicationException("Failed to validate message");
     //      }
     //
     //      var transactionInsertTask = new NeuraliumBlockchainTask<int>();
     //
     //      transactionInsertTask.SetAction((transactionchainService, taskRoutingContext2) => {
     //          transactionchainService.DispatchNewMessage(messageEnvelope);
     //
     //      });
     //
     //      taskRoutingContext.AddChild(transactionInsertTask);
     //  } else {
     //      //TODO: what do we do here?
     //      Log.Error(results.Exception, "Failed to validate message");
     //
     //      throw new NotImplementedException();
     //
     //      //this.CentralCoordinator.WalletProvider.GetActiveWalletIdentity().FindWalletKey(genesisBlockMessage.GenesisBlock.SignaturePublicKey).Status = WalletKey.Statuses.Published;
     //      //this.CentralCoordinator.WalletProvider.SaveWallet();
     //
     //      //return null;
     //  }
     //
     // });
     //
     // this.DispatchTaskSync(validationTask);
 }
Пример #2
0
 protected override void PerformWork(IChainWorkflow workflow, TaskRoutingContext taskRoutingContext)
 {
     throw new NotImplementedException();
 }