示例#1
0
    public double GetPrice(double timestamp)
    {
        int id = ArrayTools.BinarySearch(trades, timestamp);

        if (id < 0)
        {
            Debug.Log("Элемент не найден");
            return(-1);
        }
        return(trades[id].Price);
    }
示例#2
0
        public aAppFunction ApplicationFunction;        //	delegate to the main app function

        /// <summary>
        /// Returns the flag containing the provided flag string.
        /// </summary>
        /// <returns> Returns the flag with the provided flagstring. </returns>
        private Command.Flag GetFlag(string flagString)
        {
            int indexTemp;

            return(((indexTemp = ArrayTools.BinarySearch(flagString, this.Configuration.AppCommand.Flags)) == -1) ? new Command.Flag() : this.Configuration.AppCommand.Flags[indexTemp]);
        }