Ejemplo n.º 1
0
 private static void AddAttendee(Entity entity, string line)
 {
     Attendee attendee = new Attendee();
     Parser.SetValueAndType(attendee,line);
     attendee.Contact = new Address(attendee.Value);
     string uppercase = line.Split(':')[0].ToUpper();
     if(uppercase.IndexOf("EXPECT=REQUIRE")!=-1) attendee.Expectation = Expectation.Required;
     else if(uppercase.IndexOf("EXPECT=REQUEST")!=-1) attendee.Expectation = Expectation.Requested;
     else if(uppercase.IndexOf("EXPECT=IMMEDIATE")!=-1) attendee.Expectation = Expectation.ImmediateResponse;
     if(uppercase.IndexOf("ROLE=OWNER")!=-1) attendee.Role = Role.Owner;
     else if(uppercase.IndexOf("ROLE=ORGANIZER")!=-1) attendee.Role = Role.Organizer;
     else if(uppercase.IndexOf("ROLE=DELEGATE")!=-1) attendee.Role = Role.Delegate;
     if(uppercase.IndexOf("STATUS=ACCEPTED")!=-1) attendee.Status = Status.Accepted;
     else if(uppercase.IndexOf("STATUS=SENT")!=-1) attendee.Status = Status.Sent;
     else if(uppercase.IndexOf("STATUS=TENTATIVE")!=-1) attendee.Status = Status.Tentative;
     else if(uppercase.IndexOf("STATUS=CONFIRMED")!=-1) attendee.Status = Status.Confirmed;
     else if(uppercase.IndexOf("STATUS=DECLINED")!=-1) attendee.Status = Status.Declined;
     else if(uppercase.IndexOf("STATUS=COMPLETED")!=-1) attendee.Status = Status.Completed;
     else if(uppercase.IndexOf("STATUS=DELEGATED")!=-1) attendee.Status = Status.Delegated;
     if(uppercase.IndexOf("RVSP=YES")!=-1) attendee.ReplyRequested = true;
     entity.Attendees.Add(attendee);
 }
Ejemplo n.º 2
0
        private static void AddAttendee(AbstractEntity entity, string line)
        {
            Attendee attendee = new Attendee();

            SetValueAndType(attendee, line);
            attendee.Contact = new Address(attendee.Value);
            string uppercase = line.Split(':')[0].ToUpper();

            if (uppercase.IndexOf("EXPECT=REQUIRE") != -1)
            {
                attendee.Expectation = Expectation.Required;
            }
            else if (uppercase.IndexOf("EXPECT=REQUEST") != -1)
            {
                attendee.Expectation = Expectation.Requested;
            }
            else if (uppercase.IndexOf("EXPECT=IMMEDIATE") != -1)
            {
                attendee.Expectation = Expectation.ImmediateResponse;
            }
            if (uppercase.IndexOf("ROLE=OWNER") != -1)
            {
                attendee.Role = Role.Owner;
            }
            else if (uppercase.IndexOf("ROLE=ORGANIZER") != -1)
            {
                attendee.Role = Role.Organizer;
            }
            else if (uppercase.IndexOf("ROLE=DELEGATE") != -1)
            {
                attendee.Role = Role.Delegate;
            }
            if (uppercase.IndexOf("STATUS=ACCEPTED") != -1)
            {
                attendee.Status = Status.Accepted;
            }
            else if (uppercase.IndexOf("STATUS=SENT") != -1)
            {
                attendee.Status = Status.Sent;
            }
            else if (uppercase.IndexOf("STATUS=TENTATIVE") != -1)
            {
                attendee.Status = Status.Tentative;
            }
            else if (uppercase.IndexOf("STATUS=CONFIRMED") != -1)
            {
                attendee.Status = Status.Confirmed;
            }
            else if (uppercase.IndexOf("STATUS=DECLINED") != -1)
            {
                attendee.Status = Status.Declined;
            }
            else if (uppercase.IndexOf("STATUS=COMPLETED") != -1)
            {
                attendee.Status = Status.Completed;
            }
            else if (uppercase.IndexOf("STATUS=DELEGATED") != -1)
            {
                attendee.Status = Status.Delegated;
            }
            if (uppercase.IndexOf("RVSP=YES") != -1)
            {
                attendee.ReplyRequested = true;
            }
            entity.Attendees.Add(attendee);
        }