using System;
using Abp.Extensions;

namespace YGNT.Infrastructure.Extension
{
    public static class MyExtension
    {
        public static void CheckNullThrow<T>(this T o, string message = "对象不存在") where T : class
        {
            if (o == null)
                throw new Exception(message);
        }

        public static string ReplaceSrc(this string html, string uri = null)
        {
            //
            return html;
            if (html.IsNullOrEmpty())
                return html;
            return html.Replace("src=\"/", $"src=\"{uri}/");
        }
    }
}