public ISkinManagerBuilder AddSkin(string name, Action <ISkinBuilder> builderOptions = null) { var skinBuilder = new SkinBuilder(); builderOptions?.Invoke(skinBuilder); AddSkinToBuild(name, skinBuilder); return(this); }
private void AddSkinToBuild(string name, SkinBuilder skinToBuild) { if (_skinsToBuild.ContainsKey(name)) { throw new ArgumentException($"Style name {name} duplicated.", nameof(name)); } _skinsToBuild.Add(name, skinToBuild); }