Skip to content

Commit

Permalink
dotnet format fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tkrch committed Aug 22, 2024
1 parent 7b73010 commit 10275a4
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System.Collections.Immutable;

using CMS.Base;
using CMS.MediaLibrary;

Expand Down Expand Up @@ -57,14 +55,14 @@ HAVING COUNT(*) > 1
""",
(reader, _) => new
{
LibraryName = reader.Unbox<string>("LibraryName"),
LibraryName = reader.Unbox<string>("LibraryName"),
LibraryGuid = reader.Unbox<Guid?>("LibraryGUID")
});

var groupedMls = unsuitableMediaLibraries
.GroupBy(x => x.LibraryName)
.Select(x => new { LibraryGuids = x.Select(y => y.LibraryGuid).ToArray(), LibraryName = x.Key });

foreach (var mlg in groupedMls)
{
logger.LogError(
Expand Down
7 changes: 4 additions & 3 deletions KVA/Migration.Toolkit.Source/Services/SpoiledGuidContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ GROUP BY DocumentGUID
HAVING COUNT(DocumentID) > 1
)
""",
(reader, version) => new {
(reader, version) => new
{
DocumentGUID = reader.Unbox<Guid>("DocumentGUID"),
NodeID = reader.Unbox<int>("NodeID"),
NodeSiteID = reader.Unbox<int>("NodeSiteID"),
Expand All @@ -59,10 +60,10 @@ HAVING COUNT(NodeGUID) > 1
""",
(reader, version) => new
{
NodeGUID = reader.Unbox<Guid>("NodeGUID"),
NodeGUID = reader.Unbox<Guid>("NodeGUID"),
NodeSiteID = reader.Unbox<int>("NodeSiteID")
})
.GroupBy(x=>x.NodeGUID)
.GroupBy(x => x.NodeGUID)
.ToFrozenDictionary(
x => x.Key,
x => x.Select(i => new SpoiledNodeGuidInfo(i.NodeSiteID)).ToImmutableList()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
using Migration.Toolkit.Core.K11.Mappers;
using Migration.Toolkit.K11;
using Migration.Toolkit.K11.Models;
using Migration.Toolkit.KXP.Api.Auxiliary;
using Migration.Toolkit.KXP.Api.Enums;

namespace Migration.Toolkit.Core.K11.Handlers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public async Task<CommandResult> Handle(MigrateUsersCommand request, Cancellatio
await using var k11Context = await k11ContextFactory.CreateDbContextAsync(cancellationToken);

var k11CmsUsers = k11Context.CmsUsers
.Where(u=> u.UserPrivilegeLevel == (int)UserPrivilegeLevelEnum.Admin || u.UserPrivilegeLevel == (int)UserPrivilegeLevelEnum.Editor || u.UserPrivilegeLevel == (int)UserPrivilegeLevelEnum.GlobalAdmin)
.Where(u => u.UserPrivilegeLevel == (int)UserPrivilegeLevelEnum.Admin || u.UserPrivilegeLevel == (int)UserPrivilegeLevelEnum.Editor || u.UserPrivilegeLevel == (int)UserPrivilegeLevelEnum.GlobalAdmin)
;

foreach (var k11User in k11CmsUsers)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
using Migration.Toolkit.Core.KX12.Contexts;
using Migration.Toolkit.Core.KX12.Mappers;
using Migration.Toolkit.KX12.Context;
using Migration.Toolkit.KXP.Api.Auxiliary;
using Migration.Toolkit.KXP.Api.Enums;

namespace Migration.Toolkit.Core.KX12.Handlers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
using Migration.Toolkit.Common.MigrationProtocol;
using Migration.Toolkit.Core.KX12.Contexts;
using Migration.Toolkit.KX12.Context;
using Migration.Toolkit.KXP.Api.Auxiliary;
using Migration.Toolkit.KXP.Api.Enums;
using Migration.Toolkit.KXP.Models;

Expand All @@ -38,7 +37,7 @@ public async Task<CommandResult> Handle(MigrateUsersCommand request, Cancellatio
await using var kx12Context = await kx12ContextFactory.CreateDbContextAsync(cancellationToken);

var k12CmsUsers = kx12Context.CmsUsers
.Where(u=> u.UserPrivilegeLevel == (int)UserPrivilegeLevelEnum.Admin || u.UserPrivilegeLevel == (int)UserPrivilegeLevelEnum.Editor || u.UserPrivilegeLevel == (int)UserPrivilegeLevelEnum.GlobalAdmin)
.Where(u => u.UserPrivilegeLevel == (int)UserPrivilegeLevelEnum.Admin || u.UserPrivilegeLevel == (int)UserPrivilegeLevelEnum.Editor || u.UserPrivilegeLevel == (int)UserPrivilegeLevelEnum.GlobalAdmin)
;

foreach (var k12User in k12CmsUsers)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
using Migration.Toolkit.Core.KX13.Contexts;
using Migration.Toolkit.Core.KX13.Mappers;
using Migration.Toolkit.KX13.Context;
using Migration.Toolkit.KXP.Api.Auxiliary;
using Migration.Toolkit.KXP.Api.Enums;

namespace Migration.Toolkit.Core.KX13.Handlers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
using Migration.Toolkit.Common.MigrationProtocol;
using Migration.Toolkit.Core.KX13.Contexts;
using Migration.Toolkit.KX13.Context;
using Migration.Toolkit.KXP.Api.Auxiliary;
using Migration.Toolkit.KXP.Api.Enums;
using Migration.Toolkit.KXP.Models;

Expand All @@ -38,7 +37,7 @@ public async Task<CommandResult> Handle(MigrateUsersCommand request, Cancellatio
await using var kx13Context = await kx13ContextFactory.CreateDbContextAsync(cancellationToken);

var kx13CmsUsers = kx13Context.CmsUsers
.Where(u=> u.UserPrivilegeLevel == (int)UserPrivilegeLevelEnum.Admin || u.UserPrivilegeLevel == (int)UserPrivilegeLevelEnum.Editor || u.UserPrivilegeLevel == (int)UserPrivilegeLevelEnum.GlobalAdmin)
.Where(u => u.UserPrivilegeLevel == (int)UserPrivilegeLevelEnum.Admin || u.UserPrivilegeLevel == (int)UserPrivilegeLevelEnum.Editor || u.UserPrivilegeLevel == (int)UserPrivilegeLevelEnum.GlobalAdmin)
;

foreach (var kx13User in kx13CmsUsers)
Expand Down

0 comments on commit 10275a4

Please sign in to comment.