"My Queries" using object model

Hi all,

I hope this is the right place for this.


I can't find how to get the queries in "My Queries" using the object model.
Anyone know how the get it

 

Nir



Answer this question

"My Queries" using object model

  • SAgacitySolutions

    Here is a function for printing your private queries:-

    void PrintMyQueriesName()

    {

    WorkItemStore wi = new WorkItemStore("MyServer");

    StoredQueryCollection sqc = wi.Projects["MyProject"].StoredQueries;

    foreach (StoredQuery sq in sqc)

    {

    if (sq.QueryScope == QueryScope.Private)

    {

    Console.WriteLine(sq.Name);

    }

    }

    }

    Hope this helps.

    -Mohammad


  • KenKwok

    Thanks Mohammad

    I didn't see that


  • NedRob

    Nir,

    This forum is mainly for the tools specific to VSTS for developers (Static Analysis, Profiler and Unit Testing). However, I can bump this over to the TFS forum where they may be able to better answer it.

    Thanks,

    Ian



  • "My Queries" using object model