From fa36ff3662b1043eb5e2cfcb620ab9b0b343c094 Mon Sep 17 00:00:00 2001 From: Shannon Deminick Date: Thu, 20 Sep 2012 13:32:08 +0700 Subject: [PATCH] removed erroneous Wrap methods that were hidden by other overloads based on optional parameters. --- src/Umbraco.Web/UmbracoHelper.cs | 37 ++----------------- .../RazorDynamicNode/RazorLibraryCore.cs | 16 -------- 2 files changed, 3 insertions(+), 50 deletions(-) diff --git a/src/Umbraco.Web/UmbracoHelper.cs b/src/Umbraco.Web/UmbracoHelper.cs index 8f95267b1a..30f88c5014 100644 --- a/src/Umbraco.Web/UmbracoHelper.cs +++ b/src/Umbraco.Web/UmbracoHelper.cs @@ -655,20 +655,7 @@ namespace Umbraco.Web item.AddChild(child); } return item; - } - public HtmlTagWrapper Wrap(string tag, string innerText) - { - return Wrap(tag, innerText, (object)null); - } - public HtmlTagWrapper Wrap(string tag, object inner, object anonymousAttributes) - { - string innerText = null; - if (inner != null && inner.GetType() != typeof(DynamicNull)) - { - innerText = string.Format("{0}", inner); - } - return Wrap(tag, innerText, anonymousAttributes); - } + } public HtmlTagWrapper Wrap(string tag, object inner, object anonymousAttributes, params IHtmlTagWrapper[] children) { @@ -691,21 +678,9 @@ namespace Umbraco.Web { innerText = string.Format("{0}", inner); } - return Wrap(tag, innerText, null); - } - public HtmlTagWrapper Wrap(string tag, string innerText, object anonymousAttributes) - { - var wrap = new HtmlTagWrapper(tag); - if (anonymousAttributes != null) - { - wrap.ReflectAttributesFromAnonymousType(anonymousAttributes); - } - if (!string.IsNullOrWhiteSpace(innerText)) - { - wrap.AddChild(new HtmlTagWrapperTextNode(innerText)); - } - return wrap; + return Wrap(tag, innerText, (object)null); } + public HtmlTagWrapper Wrap(string tag, string innerText, object anonymousAttributes, params IHtmlTagWrapper[] children) { var wrap = new HtmlTagWrapper(tag); @@ -724,12 +699,6 @@ namespace Umbraco.Web return wrap; } - public HtmlTagWrapper Wrap(bool visible, string tag, string innerText, object anonymousAttributes) - { - var item = Wrap(tag, innerText, anonymousAttributes); - item.Visible = visible; - return item; - } public HtmlTagWrapper Wrap(bool visible, string tag, string innerText, object anonymousAttributes, params IHtmlTagWrapper[] children) { var item = Wrap(tag, innerText, anonymousAttributes, children); diff --git a/src/umbraco.MacroEngines/RazorDynamicNode/RazorLibraryCore.cs b/src/umbraco.MacroEngines/RazorDynamicNode/RazorLibraryCore.cs index 0e8b082d7d..6c59eb4244 100644 --- a/src/umbraco.MacroEngines/RazorDynamicNode/RazorLibraryCore.cs +++ b/src/umbraco.MacroEngines/RazorDynamicNode/RazorLibraryCore.cs @@ -197,14 +197,6 @@ namespace umbraco.MacroEngines.Library { return _umbracoHelper.Wrap(tag, innerText, children); } - public Umbraco.Web.Mvc.HtmlTagWrapper Wrap(string tag, string innerText) - { - return Wrap(tag, innerText, (object)null); - } - public Umbraco.Web.Mvc.HtmlTagWrapper Wrap(string tag, object inner, object anonymousAttributes) - { - return _umbracoHelper.Wrap(tag, inner, anonymousAttributes); - } public Umbraco.Web.Mvc.HtmlTagWrapper Wrap(string tag, object inner, object anonymousAttributes, params Umbraco.Web.Mvc.IHtmlTagWrapper[] children) { return _umbracoHelper.Wrap(tag, inner, anonymousAttributes, children); @@ -213,18 +205,10 @@ namespace umbraco.MacroEngines.Library { return _umbracoHelper.Wrap(tag, inner); } - public Umbraco.Web.Mvc.HtmlTagWrapper Wrap(string tag, string innerText, object anonymousAttributes) - { - return _umbracoHelper.Wrap(tag, innerText, anonymousAttributes); - } public Umbraco.Web.Mvc.HtmlTagWrapper Wrap(string tag, string innerText, object anonymousAttributes, params Umbraco.Web.Mvc.IHtmlTagWrapper[] children) { return _umbracoHelper.Wrap(tag, innerText, anonymousAttributes, children); } - public Umbraco.Web.Mvc.HtmlTagWrapper Wrap(bool visible, string tag, string innerText, object anonymousAttributes) - { - return _umbracoHelper.Wrap(visible, tag, innerText, anonymousAttributes); - } public Umbraco.Web.Mvc.HtmlTagWrapper Wrap(bool visible, string tag, string innerText, object anonymousAttributes, params Umbraco.Web.Mvc.IHtmlTagWrapper[] children) { return _umbracoHelper.Wrap(visible, tag, innerText, anonymousAttributes, children);