Example #1
0
 /// <summary>
 /// Create a new Appointment
 /// </summary>
 /// <param name="user">The creating user</param>
 /// <param name="travelType">An integer defined on TravelPlan.TravelType</param>
 /// <param name="loc">GPS location</param>
 /// <param name="invitees">A list of participants</param>
 /// <param name="locType">The kind of location to look for, defined on Location.LocationType</param>
 /// <param name="msg">A message to include in the invitations</param>
 /// <param name="cb">The callback to pass the created Appointment to</param>
 /// <param name="errorCb">An error callback</param>
 public static void Create(Account user, int travelType, Participant[] invitees,
         int locType, string msg, Action<Appointment> cb, Action<ErrorInfo> errorCb)
 {
     List<string> inviteeNames = new List<string>();
     foreach (Participant invitee in invitees) {
         inviteeNames.Add(invitee.userId);
     }
     Appointment.Create(user, travelType, invitees, inviteeNames.ToArray(), locType, msg, cb, errorCb);
 }
Example #2
0
 public static void Create(Account user, int travelType, Participant[] invitees, string[] inviteeNames,
         int locType, string msg, Action<Appointment> cb, Action<ErrorInfo> errorCb)
 {
     withGpsLocationDo((Location loc) =>
     {
         ServiceCall.Invoke(ServiceCallCreate,
                 (Response result) =>
                 {
                     if (!result.success) {
                         errorCb(result.error);
                     } else {
                         Appointment.Find(Convert.ToInt32(result.payload), cb, errorCb);
                     };
                 }, user.userId, travelType, loc, inviteeNames, locType, msg);
     }, errorCb);
 }
Example #3
0
 public bool Equals(Participant obj)
 {
     if (obj == null)
         return false;
     return this == obj;
 }