//public static void Configure(ServiceConfiguration config)
        //{
        //    RegisterClient();
        //}

        //private static void RegisterClient()
        //{
        //    if ((this._client != null))
        //    {
        //        this._client.Abort();
        //        this._client = null;
        //    }

        //    ExchangeService.cb = new ExchangeCallback();
        //    cb.SetHandler(this.HandleBroadcast);

        //    System.ServiceModel.InstanceContext context =
        //        new System.ServiceModel.InstanceContext(cb);
        //    this._client =
        //        new BroadcastorService.BroadcastorServiceClient(context);

        //    this._client.RegisterClient(this.txtClientName.Text);
        //}

        public void SetTransaction(int senderAccountId, int receiverAccountId, int amt)
        {
            Process.HandleSetCase obj = new HandleSetCase(new Account {
                ID = senderAccountId
            },
                                                          new Account {
                ID = receiverAccountId
            }, amt);
            obj.SetBlockChain();
        }
Пример #2
0
        static void Main(string[] args)
        {
            BlockChain bc = BlockChainMaster.BlockChain;

            //Case 1 -- A transfer amount to B
            Account a1 = new Account();

            a1.ID          = 1;
            a1.TotalAmount = 100;

            Account a2 = new Account();

            a2.ID          = 2;
            a2.TotalAmount = 101;

            HandleSetCase htc = new HandleSetCase(a1, a2, 10);

            htc.SetBlockChain();

            //Case 2 -- A wants to know the current


            //case 3 -- Server processing
        }