Exemple #1
0
        private ConnectionInfoBitcoin MakeConnectionInstanceBitcoin(XElement data)
        {
            ConnectionInfoBitcoin connection = new ConnectionInfoBitcoin();

            connection.UserConnected = muserDictionary[data.Attribute("UserId").Value];
            connection.Campaign      = data.Attribute("Campaign").Value;
            connection.BtcAmount     = data.Attribute("BTC").Value;
            connection.Transaction   = data.Attribute("Transaction").Value;
            connection.Description   = data.Attribute("Description").Value;
            connection.Type          = data.Attribute("ConnectionType").Value;

            return(connection);
        }
Exemple #2
0
        private void ComputeConnectionsBitcoin()
        {
            IEnumerable <XElement> users = m_results.Root.Elements("User");

            foreach (XElement user in users)
            {
                UserConnection userConnection = muserDictionary[user.Attribute("UserId").Value];

                foreach (XElement address in user.Elements("BitcoinAddress"))
                {
                    userConnection.BtcAddressList.Add(address.Attribute("Address").Value);

                    foreach (XElement connection in address.Elements("Connection"))
                    {
                        ConnectionInfoBitcoin userConnected = MakeConnectionInstanceBitcoin(connection);
                        userConnection.ConnectionListBitcoin.Add(userConnected);
                    }
                }
            }
        }