private XLFillValue(XLFillKey key) { Key = key; var backgroundColorKey = Key.BackgroundColor; var patternColorKey = Key.PatternColor; BackgroundColor = XLColor.FromKey(ref backgroundColorKey); PatternColor = XLColor.FromKey(ref patternColorKey); }
private void Modify(Func <XLFillKey, XLFillKey> modification) { Key = modification(Key); _style.Modify(styleKey => { var fill = styleKey.Fill; styleKey.Fill = modification(fill); return(styleKey); }); }
public void Deconstruct( out XLAlignmentKey alignment, out XLBorderKey border, out XLFillKey fill, out XLFontKey font, out Boolean includeQuotePrefix, out XLNumberFormatKey numberFormat, out XLProtectionKey protection) { alignment = Alignment; border = Border; fill = Fill; font = Font; includeQuotePrefix = IncludeQuotePrefix; numberFormat = NumberFormat; protection = Protection; }
internal static XLFillKey GenerateKey(IXLFill defaultFill) { XLFillKey key; if (defaultFill == null) { key = XLFillValue.Default.Key; } else if (defaultFill is XLFill) { key = (defaultFill as XLFill).Key; } else { key = new XLFillKey { PatternType = defaultFill.PatternType, BackgroundColor = defaultFill.BackgroundColor.Key, PatternColor = defaultFill.PatternColor.Key }; } return(key); }
public static XLFillValue FromKey(ref XLFillKey key) { return(Repository.GetOrCreate(ref key)); }
public XLFill(XLStyle style, XLFillKey key) : this(style, XLFillValue.FromKey(key)) { }
private XLFillValue(XLFillKey key) { Key = key; BackgroundColor = XLColor.FromKey(Key.BackgroundColor); PatternColor = XLColor.FromKey(Key.PatternColor); }