Exemplo n.º 1
0
        protected override bool ProcessParameter(CalendarParameter parameter)
        {
            ParameterId parameterId = parameter.ParameterId;

            if (parameterId <= ParameterId.Delegatee)
            {
                if (parameterId <= ParameterId.CalendarUserType)
                {
                    if (parameterId != ParameterId.CommonName)
                    {
                        if (parameterId == ParameterId.CalendarUserType)
                        {
                            this.calendarUserType = (string)parameter.Value;
                        }
                    }
                    else
                    {
                        this.name = CalendarUtil.RemoveDoubleQuotes((string)parameter.Value);
                    }
                }
                else if (parameterId != ParameterId.Delegator && parameterId != ParameterId.Delegatee)
                {
                }
            }
            else if (parameterId <= ParameterId.ParticipationRole)
            {
                if (parameterId != ParameterId.ParticipationStatus)
                {
                    if (parameterId == ParameterId.ParticipationRole)
                    {
                        this.role = (string)parameter.Value;
                    }
                }
                else
                {
                    this.partstat = (string)parameter.Value;
                }
            }
            else if (parameterId != ParameterId.RsvpExpectation)
            {
                if (parameterId == ParameterId.SentBy)
                {
                    string text = CalendarUtil.RemoveDoubleQuotes((string)parameter.Value);
                    if (text != null)
                    {
                        text = CalendarUtil.RemoveMailToPrefix(text);
                    }
                    this.sentBy = text;
                }
            }
            else if (!bool.TryParse(parameter.Value as string, out this.isResponseRequested))
            {
                this.isResponseRequested = true;
            }
            return(true);
        }
Exemplo n.º 2
0
        protected override bool Validate()
        {
            if (!base.Validate())
            {
                return(false);
            }
            string text = base.Value as string;

            if (text != null)
            {
                this.address = CalendarUtil.RemoveMailToPrefix(text);
            }
            return(this.address.Length > 0);
        }