Ejemplo n.º 1
0
 public JsCatchClause(string identifier, JsStatement body)
 {
     if (identifier == null)
     {
         throw new ArgumentNullException("identifier");
     }
     if (body == null)
     {
         throw new ArgumentNullException("body");
     }
     Identifier = identifier;
     Body       = JsStatement.EnsureBlock(body);
 }
Ejemplo n.º 2
0
 public JsSwitchSection(IEnumerable <JsExpression> values, JsStatement body)
 {
     if (values == null)
     {
         throw new ArgumentNullException("values");
     }
     if (body == null)
     {
         throw new ArgumentNullException("body");
     }
     Values = values.AsReadOnly();
     if (Values.Count == 0)
     {
         throw new ArgumentException("Values cannot be empty", "values");
     }
     Body = JsStatement.EnsureBlock(body);
 }