コード例 #1
0
        public ISkinManagerBuilder AddSkin(string name, Action <ISkinBuilder> builderOptions = null)
        {
            var skinBuilder = new SkinBuilder();

            builderOptions?.Invoke(skinBuilder);
            AddSkinToBuild(name, skinBuilder);
            return(this);
        }
コード例 #2
0
        private void AddSkinToBuild(string name, SkinBuilder skinToBuild)
        {
            if (_skinsToBuild.ContainsKey(name))
            {
                throw new ArgumentException($"Style name {name} duplicated.", nameof(name));
            }

            _skinsToBuild.Add(name, skinToBuild);
        }