public void AllTest()
        {
            var value = nameof(ResourceDictionaryTest);

            var dictionary = new ResourceDictionary();

            dictionary.GetOrAdd("Name", value);

            Assert.Equal(value, dictionary["Name"].ToString());
        }
        public Bitmap Add([NotNull] IImage image)
        {
            if (image == null)
            {
                throw new ArgumentNullException(nameof(image));
            }

            lock (_lock)
            {
                if (_bitmaps == null)
                {
                    throw new ObjectDisposedException(nameof(GDIResourceManager));
                }
                return(_bitmaps.GetOrAdd(image, CreateBitmap, false));
            }
        }
        public Pen Add([NotNull] LineStyle style)
        {
            if (style == null)
            {
                throw new ArgumentNullException(nameof(style));
            }

            lock (_lock)
            {
                if (_pens == null)
                {
                    throw new ObjectDisposedException(nameof(GDIResourceManager));
                }
                return(_pens.GetOrAdd(style, k => CreatePen(k, false), false).Value);
            }
        }
        public Brush Add([NotNull] IStyle style)
        {
            if (style == null)
            {
                throw new ArgumentNullException(nameof(style));
            }

            lock (_lock)
            {
                if (_brushes == null)
                {
                    throw new ObjectDisposedException(nameof(GDIResourceManager));
                }
                return(_brushes.GetOrAdd(style, k => CreateBrush(k, false), false).Value);
            }
        }