Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:dr-Wicked
test
Program.cs
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File Program.cs of Package test
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Newtonsoft.Json; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { GeneratePart(2).ForEach(t=>Console.WriteLine(JsonConvert.SerializeObject(t))); GenerateDates(2).ForEach(t => Console.WriteLine(JsonConvert.SerializeObject(t))); var s = from p in GeneratePart(2) from d in GenerateDates(4) select p.Union(d); s.ToList().ForEach(t=>Console.WriteLine(JsonConvert.SerializeObject(t))); } static List<List<Tuple<string,object>>> GeneratePart(int count) { return Enumerable .Range(0, count) .Select(i => new List<Tuple<string, object>> { new Tuple<string, object>("Participant", i), new Tuple<string, object>("User", string.Format("{0}user", i)) }) .ToList(); } static List<List<Tuple<string,object>>> GenerateDates(int count) { return Enumerable .Range(1, count+1) .Select(i => new List<Tuple<string, object>> { new Tuple<string, object>("StartDate", new DateTime(2000+i,i,i)), new Tuple<string, object>("EndDate",new DateTime(2000+i+1,i+1,i+1)) }) .ToList(); } } }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor