tangxu
2024-12-29 72e75456f8b30ec5b6f355539d9c883b0f810d21
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// THIS FILE IS PART OF SVG PROJECT
// THE SVG PROJECT IS AN OPENSOURCE LIBRARY LICENSED UNDER THE MS-PL License.
// COPYRIGHT (C) svg-net. ALL RIGHTS RESERVED.
// GITHUB: https://github.com/svg-net/SVG
 
using System;
 
namespace AntdUI.Svg.ExtensionMethods
{
    public static class UriExtensions
    {
        public static Uri? ReplaceWithNullIfNone(this Uri uri)
        {
            if (uri == null) { return null; }
            return string.Equals(uri.ToString(), "none", StringComparison.OrdinalIgnoreCase) ? null : uri;
        }
    }
}