示例#1
0
        public async Task BaseQuery()
        {
            LCQuery <LCObject> query = new LCQuery <LCObject>("Hello");

            query.Limit(2);
            ReadOnlyCollection <LCObject> list = await query.Find();

            TestContext.WriteLine(list.Count);
            Assert.AreEqual(list.Count, 2);

            foreach (LCObject item in list)
            {
                Assert.NotNull(item.ClassName);
                Assert.NotNull(item.ObjectId);
                Assert.NotNull(item.CreatedAt);
                Assert.NotNull(item.UpdatedAt);

                TestContext.WriteLine(item.ClassName);
                TestContext.WriteLine(item.ObjectId);
                TestContext.WriteLine(item.CreatedAt);
                TestContext.WriteLine(item.UpdatedAt);
                TestContext.WriteLine(item["intValue"]);
                TestContext.WriteLine(item["boolValue"]);
                TestContext.WriteLine(item["stringValue"]);
            }
        }
示例#2
0
    async Task Query()
    {
        LCQuery <LCObject> query = new LCQuery <LCObject>("Hello");

        query.Limit(2);
        List <LCObject> list = await query.Find();

        foreach (LCObject obj in list)
        {
            Debug.Log($"object id: {obj.ObjectId}");
        }
    }