Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
                    }
                }
            }
        }
Esempio n. 3
0
        public DateTime TimeStamp => GetValue(() => TimeStamp);       //	Last updated	date	any value

        internal Membership(HSSession session)
            : base(session)
        {
        }
Esempio n. 4
0
 internal Website(HSSession session)
     : base(session)
 {
 }
Esempio n. 5
0
 internal Competition(HSSession session)
     : base(session)
 {
 }
Esempio n. 6
0
        public string Notes => GetValue(() => Notes);   //	Notes	multi-line text box	any value

        internal ListItem(HSSession session)
            : base(session)
        {
        }
Esempio n. 7
0
        public int Ranking => GetValue(() => Ranking);              //	Display ranking	integer	any number

        internal NewsletterItem(HSSession session)
            : base(session)
        {
        }
Esempio n. 8
0
 internal PhotoGallery(HSSession session)
     : base(session)
 {
 }
Esempio n. 9
0
 internal Club(HSSession session)
     : base(session)
 {
 }
Esempio n. 10
0
        public DateTime Uploaded => GetValue(() => Uploaded);             //	Date	date	any value

        internal Subscriber(HSSession session)
            : base(session)
        {
        }
Esempio n. 11
0
 internal MemberGrouping(HSSession session)
     : base(session)
 {
 }
Esempio n. 12
0
        public int Downloads => GetValue(() => Downloads);           //	Total downloads	integer	any number

        internal SongFileDownload(HSSession session)
            : base(session)
        {
        }
Esempio n. 13
0
        public bool Anonymous => GetValue(() => Anonymous);     //	Anonymous?	boolean (yes/no)	Yes or No

        internal Suggestion(HSSession session)
            : base(session)
        {
        }
Esempio n. 14
0
 internal Team(HSSession session)
     : base(session)
 {
 }
Esempio n. 15
0
        public int Ranking => GetValue(() => Ranking);  //	Display ranking	integer	any number

        internal EventCategory(HSSession session)
            : base(session)
        {
        }
Esempio n. 16
0
        public string AdminNotes => GetValue(() => AdminNotes);               //	Admin notes	WYSIWYG (HTML) multi-line text box	any value

        internal OrderItem(HSSession session)
            : base(session)
        {
        }
Esempio n. 17
0
        public bool SendEmail => GetValue(() => SendEmail);                     //	Send email to members now?	boolean (yes/no)	Yes or No

        internal Upload(HSSession session)
            : base(session)
        {
        }
Esempio n. 18
0
        public int Ranking => GetValue(() => Ranking);              //	Display ranking	integer	any number

        internal MailingList(HSSession session)
            : base(session)
        {
        }
Esempio n. 19
0
 internal NavigationLink(HSSession session)
     : base(session)
 {
 }
Esempio n. 20
0
        public string Notes => GetValue(() => Notes);           //	Notes	multi-line text box	any value

        internal WebsiteParameter(HSSession session)
            : base(session)
        {
        }
Esempio n. 21
0
        public string AdminNotes => GetValue(() => AdminNotes); //	Admin notes	WYSIWYG (HTML) multi-line text box	any value

        internal LibraryLoan(HSSession session)
            : base(session)
        {
        }
Esempio n. 22
0
        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)
        {
        }
Esempio n. 24
0
 internal Ensemble(HSSession session)
     : base(session)
 {
 }
Esempio n. 25
0
        public string AdminNotes => GetValue(() => AdminNotes);                //	Admin Notes	WYSIWYG (HTML) multi-line text box	any value

        internal FeeSchedule(HSSession session)
            : base(session)
        {
        }
Esempio n. 26
0
 internal MemberAuditGroup(HSSession session)
     : base(session)
 {
 }
        public DateTime Uploaded => GetValue(() => Uploaded); //	Date Created	date

        internal EventProgramTemplate(HSSession session)
            : base(session)
        {
        }
Esempio n. 28
0
        public string Changes => GetValue(() => Changes);       //

        internal UpdateLog(HSSession session)
            : base(session)
        {
        }
Esempio n. 29
0
        public string Attachment4 => GetValue(() => Attachment4);                        //	Attachment 4	file	files with this specification

        internal EmailsSavedSent(HSSession session)
            : base(session)
        {
        }
Esempio n. 30
0
        public int Ranking => GetValue(() => Ranking);            //	Display ranking	integer	any number

        internal BannersHomepage(HSSession session)
            : base(session)
        {
        }