/// <summary> /// Checks that the sum of the element widths add up to TotalWidth. /// Is invoked from the constructor. /// </summary> private void CheckElementWidth() { if (ElementWidths != null && ElementWidths.Sum() == TotalWidth) { return; } throw new ArgumentException($"Width of elements does not add up to {TotalWidth}"); }
public ViewComponentOptionsBase(string @class, string style, bool isHidden, bool removeDiv, ElementWidths elementWidths) { this.Class = @class; this.Style = style; this.IsHidden = isHidden; this.RemoveDiv = removeDiv; this.ElementWidths = elementWidths; }
public MemberOrderItemRedeemedConditionalOptions( string @class, string style, bool isHidden, bool removeDiv, ElementWidths elementWidths, bool not = false) : base(@class, style, isHidden, removeDiv, elementWidths) { this.Not = not; }
public MemberOrderItemDetailsOptions( string @class, string style, bool isHidden, bool removeDiv, ElementWidths elementWidths, string selectedProperty, string dateFormat = null) : base(@class, style, isHidden, removeDiv, elementWidths) { this.SelectedProperty = selectedProperty; this.DateFormat = dateFormat; }
public MemberOrderItemExpirationCountdownOptions( string @class, string style, bool isHidden, bool removeDiv, ElementWidths elementWidths, string layout = "{o<} {on} {ol} {o>} {w<} {wn} {wl} {w>} {d<} {dn} {dl} {d>} {h<} {hn} {hl} {h>} {m<} {mn} {ml} {m>} {s<} {sn} {sl} {s>}", int significant = 3, string format = "dhms") : base(@class, style, isHidden, removeDiv, elementWidths) { this.Layout = layout; this.Significant = significant; this.Format = format; }
public MemberOrderItemListOptions( string @class, string style, bool isHidden, bool removeDiv, ElementWidths elementWidths, bool onlyShowUnredeemed, bool onlyShowRedeemed, int skip, int take, bool hideExpiredItems = true) : base(@class, style, isHidden, removeDiv, elementWidths) { this.OnlyShowUnredeemed = onlyShowUnredeemed; this.OnlyShowRedeemed = onlyShowRedeemed; this.Skip = skip; this.Take = take; this.HideExpiredItems = hideExpiredItems; }
public HtmlElementOptions(string @class, string style, bool isHidden, bool removeDiv, ElementWidths elementWidths, string htmlElement) : base(@class, style, isHidden, removeDiv, elementWidths) { this.HtmlElement = htmlElement; }