If the field initializer is a delegate or uses object initializer pattern then it should be moved inside constructor to ensure jsc is able to support it. This limitation will be resolved in a future version. Example: 10 public class XElementFormatting 11 { 12 public XElementFormatting() 13 { 14 GetName = 15 e => 16 { 17 return e.Name.LocalName; 18 }; 19 20 CanCollapse = 21 e => true; 22 23 WriteXMLAttributeValue = 24 (e, a, File) => 25 { 26 // is IE returning inherited attributes with null value? 27 if (a.Value == null) 28 return; 29 30 File.Write(SolutionFileTextFragment.XMLAttributeValue, InternalXMLExtensions.ToXMLString(a.Value)); 31 }; 32 } 33 public Func<XElement, string> GetName; 34 35 // http://www.featureblend.com/xml-closing-tag.html 36 public Func<XElement, bool> CanCollapse; 37 38 39 public Action<XElement, XAttribute, SolutionFile> WriteXMLAttributeValue; 40 41 } |