System.UriExtensions.AddName C# (CSharp) Méthode

AddName() public static méthode

Adds a name to given URN.
Appended name will start with dot (.).
public static AddName ( this uri, string name ) : Uri
uri this Uri to add name to.
name string Name to be added.
Résultat Uri
        public static Uri AddName(this Uri uri, string name)
        {
            if (uri == null)
            {
                throw new ArgumentNullException("uri");
            }

            if (!String.IsNullOrEmpty(name))
            {
                return new Uri(uri.ToString() + "." + name);
            }
            else
            {
                return uri;
            }
        }
    }