Exemplo n.º 1
0
        public void Try_GetWorkspaceItemsBySearchString()
        {
            WorkspaceItem[] items = _agent.GetWorkspaceItemsBySearchString(CSearchString).ToArray();
            ProcessWorkspaceItemsDelegate processWorkspaceItemsDelegate = ProcessWorkspaceItems;
            ProcessWorkspaceItemDelegate  processWorkspaceItemDelegate  = PrintWorkspaceItem;

            processWorkspaceItemsDelegate(items, processWorkspaceItemDelegate);
            Assert.AreEqual(CAmountSpecificSearchStrings, items.Count());
            DebugWriteFinished("Try_GetWorkspaceItemsBySearchString finished on {0}");
        }
 string ProcessWorkspaceItems(WorkspaceItem[] items, ProcessWorkspaceItemDelegate process)
 {
     string result = String.Empty;
     int i = 0;
     int count = items.Length;
     foreach (WorkspaceItem item in items)
     {
         UpdateResult(ref result, process(item, ++i, count));
     }
     return result;
 }
Exemplo n.º 3
0
        string ProcessWorkspaceItems(WorkspaceItem[] items, ProcessWorkspaceItemDelegate process)
        {
            string result = String.Empty;
            int    i      = 0;
            int    count  = items.Length;

            foreach (WorkspaceItem item in items)
            {
                UpdateResult(ref result, process(item, ++i, count));
            }
            return(result);
        }
Exemplo n.º 4
0
        public WorkspaceItem[] Try_GetWorkspace(string parentId, bool ignoreAssert)
        {
            WorkspaceItem[] items = _agent.GetWorkspace(parentId).ToArray();
            ProcessWorkspaceItemsDelegate processWorkspaceItemsDelegate = ProcessWorkspaceItems;
            ProcessWorkspaceItemDelegate  processWorkspaceItemDelegate  = PrintWorkspaceItem;

            processWorkspaceItemsDelegate(items, processWorkspaceItemDelegate);
            if (!ignoreAssert)
            {
                Assert.AreNotEqual(0, items.Count());
            }
            return(items);
        }