private static LeadSize CreateEmptySize() { var result = new LeadSize(); result.Width = LeadDoubleTools.NaN; result.Height = LeadDoubleTools.NaN; return(result); }
public static LeadSize Create(double width, double height) { var result = new LeadSize(); result.Width = width; result.Height = height; return(result); }
public static LeadSize FromJSON(string value) { var width = (double)JObject.Parse(value)["width"]; if (LeadDoubleTools.IsInfinity(width) || LeadDoubleTools.IsNaN(width)) { return(_empty); } double height = (double)JObject.Parse(value)["height"]; var result = new LeadSize(); result.Width = width; result.Height = height; return(result); }