public void TestMethod1() { IConnection connection = new DummyConnection(); HSSession session = new HSSession(connection); DummyObject1 d1 = session.GetValue <DummyObject1>(1); Assert.AreEqual(d1.Number, 42); Assert.AreEqual(d1.Text, "Hello"); Assert.AreEqual(d1.Bool, true); Assert.AreEqual(d1.Date, DateTime.Parse("2020-02-19")); Assert.AreEqual(d1.Dummy2.Number, 37); Assert.AreEqual(d1.Dummy2.Text, "World"); Assert.AreEqual(d1.Dummy2.Bool, false); Assert.AreEqual(d1.Dummy2.Date, DateTime.Parse("1961-02-19")); Assert.AreEqual(d1.Dummy2.Dummy1, d1); Assert.AreEqual(d1.Colour.ToArgb(), Color.CornflowerBlue.ToArgb()); DummyObject2 d2 = d1.DummyList.FirstOrDefault(); Assert.AreEqual(d2, d1.Dummy2); Assert.AreEqual(d1.NumberList.Count(), 3); }
static void Main(string[] args) { string site = ReadArg(args, 0, "Site"); string username = ReadArg(args, 1, "Username"); string password = ReadArg(args, 2, "Password"); HSSession session = new HSSession(new HSConnection(site, username, password)); Console.WriteLine(session.Website.WebsiteName); Ensemble ensemble = session.Website.Ensembles.Last(); Console.WriteLine(ensemble.Name); Console.WriteLine(ensemble.Registration); Console.WriteLine(ensemble.Level); Console.WriteLine(ensemble.Name); foreach (Participation p in ensemble.Participations) { Console.WriteLine(p.Member.Greeting); } Position position = session.Website.Positions.Last(); Console.WriteLine(position.Name); foreach (Member m in position.Members) { Console.WriteLine(m.Greeting); foreach (Position p in m.Positions) { Console.WriteLine(p.Name); Console.WriteLine(p.Club.GetType().Name); foreach (Team t in p.Teams) { Console.WriteLine(t.Name); } } } }
public DateTime TimeStamp => GetValue(() => TimeStamp); // Last updated date any value internal Membership(HSSession session) : base(session) { }
internal Website(HSSession session) : base(session) { }
internal Competition(HSSession session) : base(session) { }
public string Notes => GetValue(() => Notes); // Notes multi-line text box any value internal ListItem(HSSession session) : base(session) { }
public int Ranking => GetValue(() => Ranking); // Display ranking integer any number internal NewsletterItem(HSSession session) : base(session) { }
internal PhotoGallery(HSSession session) : base(session) { }
internal Club(HSSession session) : base(session) { }
public DateTime Uploaded => GetValue(() => Uploaded); // Date date any value internal Subscriber(HSSession session) : base(session) { }
internal MemberGrouping(HSSession session) : base(session) { }
public int Downloads => GetValue(() => Downloads); // Total downloads integer any number internal SongFileDownload(HSSession session) : base(session) { }
public bool Anonymous => GetValue(() => Anonymous); // Anonymous? boolean (yes/no) Yes or No internal Suggestion(HSSession session) : base(session) { }
internal Team(HSSession session) : base(session) { }
public int Ranking => GetValue(() => Ranking); // Display ranking integer any number internal EventCategory(HSSession session) : base(session) { }
public string AdminNotes => GetValue(() => AdminNotes); // Admin notes WYSIWYG (HTML) multi-line text box any value internal OrderItem(HSSession session) : base(session) { }
public bool SendEmail => GetValue(() => SendEmail); // Send email to members now? boolean (yes/no) Yes or No internal Upload(HSSession session) : base(session) { }
public int Ranking => GetValue(() => Ranking); // Display ranking integer any number internal MailingList(HSSession session) : base(session) { }
internal NavigationLink(HSSession session) : base(session) { }
public string Notes => GetValue(() => Notes); // Notes multi-line text box any value internal WebsiteParameter(HSSession session) : base(session) { }
public string AdminNotes => GetValue(() => AdminNotes); // Admin notes WYSIWYG (HTML) multi-line text box any value internal LibraryLoan(HSSession session) : base(session) { }
public int Ranking => GetValue(() => Ranking); // Display ranking integer any number internal FeeSchedulePeriod(HSSession session) : base(session) { }
public Team Team => GetValue(() => Team); // Committee/team single option from database table values from committees table internal CommitteeTeamDocument(HSSession session) : base(session) { }
internal Ensemble(HSSession session) : base(session) { }
public string AdminNotes => GetValue(() => AdminNotes); // Admin Notes WYSIWYG (HTML) multi-line text box any value internal FeeSchedule(HSSession session) : base(session) { }
internal MemberAuditGroup(HSSession session) : base(session) { }
public DateTime Uploaded => GetValue(() => Uploaded); // Date Created date internal EventProgramTemplate(HSSession session) : base(session) { }
public string Changes => GetValue(() => Changes); // internal UpdateLog(HSSession session) : base(session) { }
public string Attachment4 => GetValue(() => Attachment4); // Attachment 4 file files with this specification internal EmailsSavedSent(HSSession session) : base(session) { }
public int Ranking => GetValue(() => Ranking); // Display ranking integer any number internal BannersHomepage(HSSession session) : base(session) { }