Пример #1
0
        /// <summary>
        /// Initializes a new instance of the Sip class.
        /// </summary>
        public Sip()
        {
            Element = new XElement("Sip");
            AllowedChildren.Add("Uri");

            AllowedAttributes.Add("username");
            AllowedAttributes.Add("password");
            AllowedAttributes.Add("url");
            AllowedAttributes.Add("method");
        }
Пример #2
0
        /// <summary>
        /// Initializes a new instance of the Enqueue class.
        /// </summary>
        /// <param name="name"></param>
        public Enqueue(string name)
        {
            Element = new XElement("Enqueue", name);
            AllowedChildren.Add("TaskAttributes");

            AllowedAttributes.Add("action");
            AllowedAttributes.Add("method");
            AllowedAttributes.Add("waitUrl");
            AllowedAttributes.Add("waitUrlMethod");
            AllowedAttributes.Add("workflowSid");
        }
Пример #3
0
        /// <summary>
        /// Initializes a new instance of the Message class.
        /// </summary>
        public Message()
        {
            Element = new XElement("Message");
            AllowedChildren.Add("Body");
            AllowedChildren.Add("Media");

            AllowedAttributes.Add("to");
            AllowedAttributes.Add("from");
            AllowedAttributes.Add("action");
            AllowedAttributes.Add("method");
            AllowedAttributes.Add("statusCallback");
        }
Пример #4
0
        /// <summary>
        /// Initializes a new instance of the Gather class.
        /// </summary>
        public Gather()
        {
            Element = new XElement("Gather");
            AllowedChildren.Add("Say");
            AllowedChildren.Add("Play");
            AllowedChildren.Add("Pause");

            AllowedAttributes.Add("action");
            AllowedAttributes.Add("finishOnKey");
            AllowedAttributes.Add("method");
            AllowedAttributes.Add("numDigits");
            AllowedAttributes.Add("timeout");
        }
Пример #5
0
        public Dial()
        {
            Element = new XElement("Dial");
            AllowedChildren.Add("Number");
            AllowedChildren.Add("Client");
            AllowedChildren.Add("Conference");

            AllowedAttributes.Add("timeout");
            AllowedAttributes.Add("callerId");
            AllowedAttributes.Add("action");
            AllowedAttributes.Add("method");
            AllowedAttributes.Add("hangupOnStar");
            AllowedAttributes.Add("timeLimit");
        }
Пример #6
0
        public TwilioResponse()
        {
            Element = new XElement("Response");

            AllowedChildren.Add("Say");
            AllowedChildren.Add("Play");
            AllowedChildren.Add("Gather");
            AllowedChildren.Add("Dial");
            AllowedChildren.Add("Record");
            AllowedChildren.Add("Reject");
            AllowedChildren.Add("Redirect");
            AllowedChildren.Add("Sms");
            AllowedChildren.Add("Hangup");
            AllowedChildren.Add("Pause");
        }
Пример #7
0
        //-----------------------------------------------------------------------
        protected override void OnChildrenCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
        {
            base.OnChildrenCollectionChanged(sender, e);

            RaisePropertyChangedEvent("AllowedChildren");
            RaisePropertyChangedEvent("ItemsSource");

            if (CDef.ChildrenAreUnique)
            {
                if (!AllowedChildren.Contains(SelectedDefinition))
                {
                    SelectedDefinition = AllowedChildren.FirstOrDefault();
                    RaisePropertyChangedEvent("SelectedDefinition");
                }
            }

            foreach (var child in Children)
            {
                child.RaisePropertyChangedEvent("CanRemove");
            }
        }