internal XLStyleValue(XLStyleKey key) { Key = key; Alignment = XLAlignmentValue.FromKey(Key.Alignment); Border = XLBorderValue.FromKey(Key.Border); Fill = XLFillValue.FromKey(Key.Fill); Font = XLFontValue.FromKey(Key.Font); NumberFormat = XLNumberFormatValue.FromKey(Key.NumberFormat); Protection = XLProtectionValue.FromKey(Key.Protection); }
internal XLStyleValue(XLStyleKey key) { Key = key; var(alignment, border, fill, font, _, numberFormat, protection) = Key; Alignment = XLAlignmentValue.FromKey(ref alignment); Border = XLBorderValue.FromKey(ref border); Fill = XLFillValue.FromKey(ref fill); Font = XLFontValue.FromKey(ref font); IncludeQuotePrefix = key.IncludeQuotePrefix; NumberFormat = XLNumberFormatValue.FromKey(ref numberFormat); Protection = XLProtectionValue.FromKey(ref protection); }
public XLBorder(IXLStylized container, XLStyle style, XLBorderKey key) : this(container, style, XLBorderValue.FromKey(key)) { }
/// <summary> /// Create an instance of XLBorder initializing it with the specified value. /// </summary> /// <param name="container">Container the border is applied to.</param> /// <param name="style">Style to attach the new instance to.</param> /// <param name="value">Style value to use.</param> public XLBorder(IXLStylized container, XLStyle style, XLBorderValue value) { _container = container; _style = style ?? _container.Style as XLStyle ?? XLStyle.CreateEmptyStyle(); _value = value; }