﻿using System;

namespace OpenMagic.Extensions
{
    public static class LazyExtensions
    {
        public static void DisposeValueIfCreated<T>(Lazy<T> obj) where T : IDisposable
        {
            if (obj.IsValueCreated)
            {
                obj.Value.Dispose();
            }
        }
    }
}
﻿using System;

namespace OpenMagic.Extensions
{
    public static class LazyExtensions
    {
        public static void DisposeValueIfCreated<T>(this Lazy<T> obj) where T : IDisposable
        {
            if (obj.IsValueCreated)
            {
                obj.Value.Dispose();
            }
        }
    }
}
Fix DisposeValueIfCreated to be extension method
Fix DisposeValueIfCreated to be extension method
