Exemplo n.º 1
0
        /// <summary>
        /// QueryDataを作成します。
        /// </summary>
        /// <param name="key1"></param>
        /// <param name="key2"></param>
        /// <param name="key3"></param>
        /// <param name="key4"></param>
        /// <returns></returns>
        public QueryData CreateQueryData(string key1, string key2, string key3, string key4)
        {
            var data = NCMBQuery.CreateDicData(new MarkovData
            {
                Key1 = key1,
                Key2 = key2,
                Key3 = key3,
                Key4 = key4,
            });

            return(new QueryData
            {
                className = "Markov",
                where = data,
            });
        }
Exemplo n.º 2
0
        private QueryData CreateFirstQueryData()
        {
            int random = new Random(Convert.ToInt32(Guid.NewGuid().ToString("N").Substring(0, 8), 16)).Next(1, RowMaxCount);

            var data = NCMBQuery.CreateDicData(new MarkovData
            {
                Key1 = START_WORD,
                Key2 = START_WORD,
                Key3 = START_WORD,
                Key4 = START_WORD,
            });

            return(new QueryData
            {
                className = "Markov",
                where = data,
                skip = random,
                limit = 10,
            });
        }