Skip to content

Commit

Permalink
MT-17 cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
tkrch committed Jul 9, 2024
1 parent 1c007a4 commit 4e3c057
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 259 deletions.
1 change: 0 additions & 1 deletion KVA/Migration.Toolkit.Source/Mappers/ContentItemMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,6 @@ ICmsClass nodeClass
{
if (value is string pageReferenceJson)
{
#warning [PATCHED] - [VERIFY] "NodeGuid may not be unique, use other means of searching for node!"
var parsed = JObject.Parse(pageReferenceJson);
foreach (var jToken in parsed.DescendantsAndSelf())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ private void WalkProperties(int siteId, JObject properties, List<EditingFormCont
{
if (value?.ToObject<List<Migration.Toolkit.Source.Services.Model.PageSelectorItem>>() is { Count: > 0 } items)
{
#warning [PATCHED] - [CHECK] "NodeGuid may not be unique, use other means of searching for node!"
properties[key] = JToken.FromObject(items.Select(x => new WebPageRelatedItem
{
WebPageGuid = spoiledGuidContext.EnsureNodeGuid(x.NodeGuid, siteId)
Expand Down
29 changes: 0 additions & 29 deletions KVA/Migration.Toolkit.Source/Services/PrimaryKeyLocatorService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,27 +82,6 @@ public IEnumerable<SourceTargetKeyMapping> SelectAll<T>(Expression<Func<T, objec
yield break;
}

// if (sourceType == typeof(ICmsTree) && memberName == nameof(ICmsTree.NodeID))
// {
// #error "NodeGuid may not be unique, use other means of searching for node!"
// var source = modelFacade.SelectAll<ICmsTree>().Select(x => new { x.NodeID, x.NodeGUID, x.NodeSiteID }).ToList();
// var target = kxpContext.CmsChannels.Select(x => new { x.ChannelId, x.ChannelGuid }).ToList();
//
// var result = source.Join(target,
// #error "NodeGuid may not be unique, use other means of searching for node!"
// a => a.NodeGUID,
// b => b.ChannelGuid,
// (a, b) => new SourceTargetKeyMapping(a.NodeID, b.ChannelId)
// );
//
// foreach (var resultingMapping in result)
// {
// yield return resultingMapping;
// }
//
// yield break;
// }

if (sourceType == typeof(ICmsState) && memberName == nameof(ICmsState.StateID))
{
var source = modelFacade.SelectAll<ICmsState>().Select(x => new { x.StateID, x.StateName }).ToList();
Expand Down Expand Up @@ -216,14 +195,6 @@ public bool TryLocate<T>(Expression<Func<T, object>> keyNameSelector, int source
targetId = kxpContext.OmContacts.Where(x => x.ContactGuid == sourceGuid).Select(x => x.ContactId).Single();
return true;
}

// if (sourceType == typeof(ICmsTree))
// {
// #error "NodeGuid may not be unique, use other means of searching for node!"
// var sourceGuid = modelFacade.SelectById<ICmsTree>(sourceId)?.NodeGUID;
// targetId = kxpContext.CmsChannels.Where(x => x.ChannelGuid == sourceGuid).Select(x => x.ChannelId).Single();
// return true;
// }
}
catch (InvalidOperationException ioex)
{
Expand Down

This file was deleted.

12 changes: 0 additions & 12 deletions Migration.Toolkit.Core.KX12/Services/CmsClass/PageSelectorItem.cs

This file was deleted.

This file was deleted.

0 comments on commit 4e3c057

Please sign in to comment.