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); }
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); }