/// <summary> /// Registers the namespace of the given Type with the given prefix /// </summary> /// <param name="service">The service to register to</param> /// <param name="prefix">The prefix that should be used</param> /// <param name="overwrite">The flag if the existing should be overwritten</param> /// <typeparam name="T">The Type of which the namespace should get registered</typeparam> /// <returns>The service itself</returns> public static XamlService RegisterNamespace <T>(this XamlService service, string prefix, bool overwrite = false) => service.RegisterNamespace(prefix, typeof(T).Namespace, overwrite);
/// <summary> /// Registers the namespace of the given Type with the given prefix /// </summary> /// <param name="service">The service to register to</param> /// <param name="ns">The namespace that should get registered</param> /// <param name="overwrite">The flag if the existing should be overwritten</param> /// <returns>The service itself</returns> public static XamlService RegisterNamespace(this XamlService service, string ns, bool overwrite = false) => service.RegisterNamespace(service.GeneratePrefix(ns), ns, overwrite);