Example #1
0
        public static IList <ToDoItem> CreateItems(
            int count,
            string idPrefix,
            string containerRid = null)
        {
            List <ToDoItem> items = new List <ToDoItem>();

            for (uint i = 0; i < count; i++)
            {
                ResourceId rid = null;
                if (containerRid != null)
                {
                    // id 0 returns null for resource id
                    rid = ResourceId.NewDocumentId(containerRid, i + 1);
                }

                items.Add(ToDoItem.Create(idPrefix, rid));
            }

            return(items);
        }