Split Udi into UdiParser & UdiParserServiceConnectors, remove GuidUdi and StringUdi Parse methods (makes no sense), adds generic parse method to UdiParser, simplifies tests, removes Current usage

This commit is contained in:
Shannon
2019-11-13 16:33:40 +11:00
parent 282220ee39
commit c58c31c6bd
24 changed files with 338 additions and 376 deletions

View File

@@ -491,7 +491,7 @@ namespace Umbraco.Web.Trees
{
return new Tuple<Guid?, int?>(null, idInt);
}
if (Udi.TryParse(id, out idUdi))
if (UdiParser.TryParse(id, out idUdi))
{
var guidUdi = idUdi as GuidUdi;
if (guidUdi != null)
@@ -523,7 +523,7 @@ namespace Umbraco.Web.Trees
{
entity = Services.EntityService.Get(idInt, UmbracoObjectType);
}
else if (Udi.TryParse(s, out var idUdi))
else if (UdiParser.TryParse(s, out var idUdi))
{
var guidUdi = idUdi as GuidUdi;
entity = guidUdi != null ? Services.EntityService.Get(guidUdi.Guid, UmbracoObjectType) : null;