public void InvitationOnInvitationStatusChanged(Invitation invitation, EventArgs eventArgs)
        {
            // custom logic
            switch (invitation.Status)
            {
                case InvitationStatus.Yes:
                    break;
                case InvitationStatus.No:
                    break;
                case InvitationStatus.NoResponse:
                    break;
                case InvitationStatus.NotYetSent:
                    break;
                case InvitationStatus.Unknown:
                    break;
            }

            // friend has responded to the invitation.
            // allow the service to send an invitation to the next friend
            switch (invitation.Status)
            {
                case InvitationStatus.Yes:
                case InvitationStatus.No:
                case InvitationStatus.Unknown:
                    PendingInvitations -= 1;
                    break;
            }
        }
        public void SetUp()
        {
            Test.SetUp(); // sets up dependencies

            Invitation = new Invitation {Message = "I hate the earth"};
            Analyzer = new InvitationAnalyzer(Invitation);
        }
Пример #3
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);

            // Set our view from the "main" layout resource
            SetContentView (Resource.Layout.Main);

            // Get our button from the layout resource,
            // and attach an event to it
            Button button = FindViewById<Button> (Resource.Id.myButton);

            button.Click += delegate {
                var test = new StandardInvitationService();
                var testinvite = new Invitation() {EventName = "Farm Party"};
                var friendlist = new List<Friend>();
                friendlist.Add(new AndroidFriend() { PhoneNumber = "5407356190" });
                Task.Factory.StartNew(() => test.SendInvitations(testinvite, friendlist, 9999999, 1, "Hello Johnny", 1));
            };
        }
 public InvitationController(Invitation invitation, List<Friend> _friends)
 {
     _initialInvitation = invitation;
 }
Пример #5
0
 /// <summary>
 /// A More effective way of adding invitations to the list
 /// </summary>
 /// <param name="invitation"></param>
 public void AddInvitation(Invitation invitation)
 {
     invitation.Friend = this;
     Log.Add(invitation);
 }
 public Task SendInvitations(Invitation invitation, IList<Friend> friends, int limit)
 {
     throw new NotImplementedException();
 }
 public InvitationValidator(Invitation invitation)
 {
     Invitation = invitation;
 }
 public InvitationController(Invitation invitation, List <Friend> _friends)
 {
     _initialInvitation = invitation;
 }