Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the Number class using the specified number.
 /// </summary>
 /// <param name="number"></param>
 public Number(string number)
 {
     Element = new XElement("Number", number);
     AllowedAttributes.Add("url");
     AllowedAttributes.Add("method");
     AllowedAttributes.Add("sendDigits");
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the Body class.
        /// </summary>
        /// <param name="body"></param>
        public Task(string taskattributes)
        {
            Element = new XElement("Task", taskattributes);

            AllowedAttributes.Add("priority");
            AllowedAttributes.Add("timeout");
        }
Ejemplo n.º 3
0
        public Say(string text)
        {
            Element = new XElement("Say", text);

            AllowedAttributes.Add("voice");
            AllowedAttributes.Add("language");
            AllowedAttributes.Add("loop");
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Initializes a new instance of the Queue class
        /// </summary>
        /// <param name="name">The name of the queue</param>
        public Queue()
        {
            Element = new XElement("Queue");

            AllowedAttributes.Add("url");
            AllowedAttributes.Add("reservationSid");
            AllowedAttributes.Add("postworkActivitySid");
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Initializes a new instance of the Uri class.
        /// </summary>
        public Uri(string uri)
        {
            Element = new XElement("Uri");
            Element.Add(uri);

            AllowedAttributes.Add("username");
            AllowedAttributes.Add("password");
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Initializes a new instance of the Enqueue class.
        /// </summary>
        /// <param name="name"></param>
        public Enqueue(string name)
        {
            Element = new XElement("Enqueue", name);

            AllowedAttributes.Add("action");
            AllowedAttributes.Add("method");
            AllowedAttributes.Add("waitUrl");
            AllowedAttributes.Add("waitUrlMethod");
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Initializes a new instance of the Sms class.
        /// </summary>
        public Sms()
        {
            Element = new XElement("Sms");

            AllowedAttributes.Add("to");
            AllowedAttributes.Add("from");
            AllowedAttributes.Add("action");
            AllowedAttributes.Add("method");
            AllowedAttributes.Add("statusCallback");
        }
Ejemplo n.º 8
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");
        }
Ejemplo n.º 9
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");
        }
Ejemplo n.º 10
0
        /// <summary>
        /// Initializes a new instance of the Conference class.
        /// </summary>
        public Conference()
        {
            Element = new XElement("Conference");

            AllowedAttributes.Add("muted");
            AllowedAttributes.Add("beep");
            AllowedAttributes.Add("waitUrl");
            AllowedAttributes.Add("waitMethod");
            AllowedAttributes.Add("startConferenceOnEnter");
            AllowedAttributes.Add("endConferenceOnExit");
        }
Ejemplo n.º 11
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");
        }
Ejemplo n.º 12
0
        public Record()
        {
            Element = new XElement("Record");

            AllowedAttributes.Add("action");
            AllowedAttributes.Add("method");
            AllowedAttributes.Add("timeout");
            AllowedAttributes.Add("finishOnKey");
            AllowedAttributes.Add("maxlength");
            AllowedAttributes.Add("transcribe");
            AllowedAttributes.Add("transcribeCallback");
            AllowedAttributes.Add("playBeep");
        }
Ejemplo n.º 13
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");
        }
Ejemplo n.º 14
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");
        }
Ejemplo n.º 15
0
        internal Md2HtmlSanitizer()
        {
            AllowedTags.Add(@"meta");
            AllowedTags.Add(@"style");

            AllowedAttributes.Add(@"content");
            AllowedAttributes.Add(@"http-equiv");

            AllowedCssProperties.Add(@"src");

            RemovingAtRule    += ChangedEvent;
            RemovingAttribute += ChangedEvent;
            RemovingCssClass  += ChangedEvent;
            RemovingStyle     += ChangedEvent;
            RemovingTag       += ChangedEvent;
        }
 public HtmlSanitizer() : base()
 {
     AllowedTags.Clear();
     AllowedTags.Add("p");
     AllowedTags.Add("h2");
     AllowedTags.Add("strong");
     AllowedTags.Add("em");
     AllowedTags.Add("ul");
     AllowedTags.Add("ol");
     AllowedTags.Add("li");
     AllowedTags.Add("a");
     AllowedTags.Add("br");
     AllowedAttributes.Clear();
     AllowedAttributes.Add("href");
     AllowedCssProperties.Clear();
     AllowedAtRules.Clear();
 }
Ejemplo n.º 17
0
        internal Md2HtmlSanitizer()
        {
            AllowedTags.Add(@"meta");
            AllowedTags.Add(@"style");

            AllowedAttributes.Add(@"content");
            AllowedAttributes.Add(@"http-equiv");
            AllowedAttributes.Add(@"id");
            AllowedAttributes.Add(@"class");

            AllowedCssProperties.Add(@"src");
            AllowedCssProperties.Add(@"word-break");
            AllowedCssProperties.Add(@"word-wrap");
            AllowedCssProperties.Add(@"-moz-tab-size");
            AllowedCssProperties.Add(@"-o-tab-size");
            AllowedCssProperties.Add(@"tab-size");
            AllowedCssProperties.Add(@"-webkit-hyphens");
            AllowedCssProperties.Add(@"-moz-hyphens");
            AllowedCssProperties.Add(@"-ms-hyphens");
            AllowedCssProperties.Add(@"hyphens");
            AllowedCssProperties.Add(@"background-position-x");
            AllowedCssProperties.Add(@"background-position-y");
            AllowedCssProperties.Add(@"transition-property");
            AllowedCssProperties.Add(@"transition-duration");
            AllowedCssProperties.Add(@"transition-timing-function");
            AllowedCssProperties.Add(@"transition-delay");
            AllowedCssProperties.Add(@"box-shadow");

            AllowedSchemes.Add(@"file");
            AllowedSchemes.Add(@"data");

            AllowedAtRules.Add(CssRuleType.Media);
            AllowedAtRules.Add(CssRuleType.Keyframe);
            AllowedAtRules.Add(CssRuleType.Keyframes);

            RemovingAtRule    += ChangedEvent;
            RemovingAttribute += ChangedEvent;
            RemovingCssClass  += ChangedEvent;
            RemovingStyle     += ChangedEvent;
            RemovingTag       += ChangedEvent;
        }
Ejemplo n.º 18
0
 /// <summary>
 /// Initializes a new instance of the Client class
 /// </summary>
 /// <param name="clientName">The name of the client</param>
 public Client(string clientName)
 {
     Element = new XElement("Client", clientName);
     AllowedAttributes.Add("url");
     AllowedAttributes.Add("method");
 }
Ejemplo n.º 19
0
        /// <summary>
        /// Initializes a new instance of the Queue class
        /// </summary>
        /// <param name="name">The name of the queue</param>
        public Queue(string name)
        {
            Element = new XElement("Queue", name);

            AllowedAttributes.Add("url");
        }
Ejemplo n.º 20
0
 /// <summary>
 /// Initializes a new instance of the Redirect class.
 /// </summary>
 public Redirect()
 {
     Element = new XElement("Redirect");
     AllowedAttributes.Add("method");
 }
Ejemplo n.º 21
0
 /// <summary>
 /// Initializes a new instance of the Pause class.
 /// </summary>
 public Pause()
 {
     Element = new XElement("Pause");
     AllowedAttributes.Add("length");
 }
Ejemplo n.º 22
0
 /// <summary>
 /// Initializes a new instance of the Reject class.
 /// </summary>
 public Reject()
 {
     Element = new XElement("Reject");
     AllowedAttributes.Add("reason");
 }