private void BuildAxisMap()
    {
        axisMap = new Dictionary <GenericInputs, string> {
        };

        if (type == InputDeviceType.XBOX)
        {
            foreach (var item in GenericToXBoxMap)
            {
                XBoxInputs xboxInput = GenericToXBoxMap[item.Key];
                RawInputs  rawInput  = XBoxToRawMap[xboxInput];
                string     axis      = string.Concat(Id.ToString(), "_", rawInput.ToString());
                if (!axisMap.ContainsKey(item.Key))
                {
                    axisMap.Add(item.Key, axis);
                }
            }
        }
        else if (type == InputDeviceType.KEYBOARD)
        {
            foreach (var item in GenericToKeyboardMap)
            {
                KeyboardInputs keyboardInput = GenericToKeyboardMap[item.Key];
                string         axis          = string.Concat(Id.ToString(), "_", keyboardInput.ToString());
                if (!axisMap.ContainsKey(item.Key))
                {
                    axisMap.Add(item.Key, axis);
                }
            }
        }
    }
Beispiel #2
0
        /// <summary>
        /// Create a transaction spending the given inputs.
        /// Returns hex-encoded raw transaction.
        /// Note that the transaction's inputs are not signed, and
        /// it is not stored in the wallet or transmitted to the network.
        /// </summary>
        /// <param name="rawInputs">The inputs.</param>
        /// <param name="locktime">Raw locktime. Non-0 value also locktime-activates inputs.</param>
        /// <param name="replaceable">Marks this transaction as BIP125-replaceable.
        /// Allows this transaction to be replaced by a transaction with higher fees. If provided, it is an error if explicit sequence numbers are incompatible.</param>
        /// <returns></returns>
        public async Task <string> CreateRawTransaction(RawInputs rawInputs, int locktime = 0, bool replaceable = false)
        {
            CreateRawTransaction createRawTransaction = new CreateRawTransaction()
            {
                RawInputs   = rawInputs,
                Locktime    = locktime,
                Replaceable = replaceable
            };

            string response = await httpRequest.SendReq(MethodName.createrawtransaction, createRawTransaction);

            return(response);
        }