public ScenarioWriter(Scenario[] scenarios)
        {
            this.scenarios = scenarios;

            var stream = new FileStream("tfs.feature", FileMode.Create);
            this.writer = new StreamWriter(stream, Encoding.ASCII);
        }
        private void Write(Scenario scenario)
        {
            writer.Write("Scenario: ");
            writer.WriteLine("{0} - {1}", scenario.Id, scenario.Title);

            foreach (string line in scenario.Description.Lines())
            {
                writer.WriteLine(line);
            }
        }
        private Scenario[] GetScenariosForQuery(string query)
        {
            var server = TeamFoundationServerFactory.GetServer(serverName);
            var store = (WorkItemStore)server.GetService(typeof(WorkItemStore));

            var workItems = store.Query(query);

            var result = new List<Scenario>();
            foreach (WorkItem workItem in workItems)
            {
                var scenario = new Scenario(workItem.Id, workItem.Title, workItem.Description);
                result.Add(scenario);
            }

            return result.ToArray();
        }