8using System.Collections.Generic;
16 public class StyleRepository
18 private readonly
object lockObject =
new object();
20 private static StyleRepository instance;
29 instance = instance ??
new StyleRepository();
34 private Dictionary<int, Style> styles;
39 internal bool ImportInProgress {
get;
set; }
44 public Dictionary<int, Style>
Styles {
get => styles; }
51 styles =
new Dictionary<int, Style>();
68 if (!styles.TryGetValue(hashCode, out var value))
71 styles.Add(hashCode, value);
Class to manage all styles at runtime, before writing XLSX files. The main purpose is deduplication a...
static StyleRepository Instance
Gets the singleton instance of the repository.
Style AddStyle(Style style)
Adds a style to the repository and returns the actual reference.
void FlushStyles()
Empties the static repository.
Dictionary< int, Style > Styles
Gets the currently managed styles of the repository.
Class representing a Style with sub classes within a style sheet. An instance of this class is only a...
override int GetHashCode()
Returns a hash code for this instance.