From 9c129d47229edb1587d68dc6d0187e026f475496 Mon Sep 17 00:00:00 2001 From: samatrhea Date: Sun, 17 Dec 2023 19:12:18 +0100 Subject: [PATCH] [SQ] remove unused method parameters --- CometServer/Modules/10-25/ExchangeFileImportyApi.cs | 4 ++-- CometServer/Services/ChangeLog/ChangeLogService.cs | 4 ++-- .../Implementation/EngineeringModelSetupSideEffect.cs | 8 ++++---- .../SideEffects/Implementation/ParameterSideEffect.cs | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/CometServer/Modules/10-25/ExchangeFileImportyApi.cs b/CometServer/Modules/10-25/ExchangeFileImportyApi.cs index d26c50d4..f68d715c 100644 --- a/CometServer/Modules/10-25/ExchangeFileImportyApi.cs +++ b/CometServer/Modules/10-25/ExchangeFileImportyApi.cs @@ -305,7 +305,7 @@ internal async Task SeedDataStore(HttpRequest request, HttpResponse response, IR var version = request.QueryDataModelVersion(); // handle exchange processing - if (!this.InsertModelData(requestUtils, transactionManager, jsonExchangeFileReader, migrationService, revisionService, engineeringModelDao, serviceProvider, personService, personRoleService, personPermissionService, defaultPermissionProvider, participantRoleService, participantPermissionService, version, temporarysSeedFilePath, null, this.AppConfigService.AppConfig.Backtier.IsDbSeedEnabled)) + if (!this.InsertModelData(requestUtils, transactionManager, jsonExchangeFileReader, migrationService, engineeringModelDao, serviceProvider, personService, personRoleService, personPermissionService, defaultPermissionProvider, participantRoleService, participantPermissionService, version, temporarysSeedFilePath, null, this.AppConfigService.AppConfig.Backtier.IsDbSeedEnabled)) { response.StatusCode = (int)HttpStatusCode.BadRequest; await response.AsJson("invalid seed file"); @@ -371,7 +371,7 @@ internal async Task SeedDataStore(HttpRequest request, HttpResponse response, IR /// /// True if successful, false if not /// - private bool InsertModelData(IRequestUtils requestUtils, ICdp4TransactionManager transactionManager, IJsonExchangeFileReader jsonExchangeFileReader, IMigrationService migrationService, IRevisionService revisionService, IEngineeringModelDao engineeringModelDao, Services.IServiceProvider serviceProvider, IPersonService personService, IPersonRoleService personRoleService, IPersonPermissionService personPermissionService, IDefaultPermissionProvider defaultPermissionProvider, IParticipantRoleService participantRoleService, IParticipantPermissionService participantPermissionService, Version version, string fileName, string password = null, bool seed = true) + private bool InsertModelData(IRequestUtils requestUtils, ICdp4TransactionManager transactionManager, IJsonExchangeFileReader jsonExchangeFileReader, IMigrationService migrationService, IEngineeringModelDao engineeringModelDao, Services.IServiceProvider serviceProvider, IPersonService personService, IPersonRoleService personRoleService, IPersonPermissionService personPermissionService, IDefaultPermissionProvider defaultPermissionProvider, IParticipantRoleService participantRoleService, IParticipantPermissionService participantPermissionService, Version version, string fileName, string password = null, bool seed = true) { NpgsqlConnection connection = null; NpgsqlTransaction transaction = null; diff --git a/CometServer/Services/ChangeLog/ChangeLogService.cs b/CometServer/Services/ChangeLog/ChangeLogService.cs index 233283c8..27286f92 100644 --- a/CometServer/Services/ChangeLog/ChangeLogService.cs +++ b/CometServer/Services/ChangeLog/ChangeLogService.cs @@ -281,7 +281,7 @@ public bool TryAppendModelChangeLogData(NpgsqlTransaction transaction, string pa foreach (var deleteInfo in operation.Delete) { var newLogEntryChangelogItem = - this.CreateDeleteLogEntryChangelogItems(transaction, partition, operation, deleteInfo, modelLogEntry, changedThings); + this.CreateDeleteLogEntryChangelogItems(transaction, partition, deleteInfo, modelLogEntry, changedThings); if (newLogEntryChangelogItem != null) { @@ -426,7 +426,7 @@ private LogEntryChangelogItem CreateAddOrUpdateLogEntryChangelogItem(NpgsqlTrans /// /// The created s. /// - private LogEntryChangelogItem CreateDeleteLogEntryChangelogItems(NpgsqlTransaction transaction, string partition, CdpPostOperation operation, ClasslessDTO deleteInfo, ModelLogEntry modelLogEntry, IReadOnlyList changedThings) + private LogEntryChangelogItem CreateDeleteLogEntryChangelogItems(NpgsqlTransaction transaction, string partition, ClasslessDTO deleteInfo, ModelLogEntry modelLogEntry, IReadOnlyList changedThings) { if (Enum.TryParse(deleteInfo[nameof(Thing.ClassKind)].ToString(), out var classKind) && IsAddLogEntryChangeLogItemAllowed(classKind)) { diff --git a/CometServer/Services/Operations/SideEffects/Implementation/EngineeringModelSetupSideEffect.cs b/CometServer/Services/Operations/SideEffects/Implementation/EngineeringModelSetupSideEffect.cs index 0764a0d1..8436267a 100644 --- a/CometServer/Services/Operations/SideEffects/Implementation/EngineeringModelSetupSideEffect.cs +++ b/CometServer/Services/Operations/SideEffects/Implementation/EngineeringModelSetupSideEffect.cs @@ -219,7 +219,7 @@ public override void AfterCreate(EngineeringModelSetup thing, Thing container, E if (thing.SourceEngineeringModelSetupIid.HasValue) { this.Logger.LogInformation("Create a Copy of an EngineeringModel"); - this.CreateCopyEngineeringModel(thing, container, transaction, partition, securityContext); + this.CreateCopyEngineeringModel(thing, transaction, securityContext); this.Logger.LogInformation("Create revisions for created EngineeringModel"); this.RevisionService.SaveRevisions(transaction, this.RequestUtils.GetEngineeringModelPartitionString(thing.EngineeringModelIid), actor, FirstRevision); @@ -227,7 +227,7 @@ public override void AfterCreate(EngineeringModelSetup thing, Thing container, E return; } - this.CreateDefaultEngineeringModel(thing, container, transaction, partition, securityContext); + this.CreateDefaultEngineeringModel(thing, container, transaction, partition); // Create revisions for created EngineeringModel this.RevisionService.SaveRevisions(transaction, this.RequestUtils.GetEngineeringModelPartitionString(thing.EngineeringModelIid), actor, FirstRevision); @@ -267,7 +267,7 @@ public override void BeforeUpdate(EngineeringModelSetup thing, Thing container, /// The current transaction /// The partition /// The security context - private void CreateCopyEngineeringModel(EngineeringModelSetup thing, Thing container, NpgsqlTransaction transaction, string partition, ISecurityContext securityContext) + private void CreateCopyEngineeringModel(EngineeringModelSetup thing, NpgsqlTransaction transaction, ISecurityContext securityContext) { // copy data from the source engineering-model this.ModelCreatorManager.CopyEngineeringModelData(thing, transaction, securityContext); @@ -281,7 +281,7 @@ private void CreateCopyEngineeringModel(EngineeringModelSetup thing, Thing conta /// The current transaction /// The partition /// The security context - private void CreateDefaultEngineeringModel(EngineeringModelSetup thing, Thing container, NpgsqlTransaction transaction, string partition, ISecurityContext securityContext) + private void CreateDefaultEngineeringModel(EngineeringModelSetup thing, Thing container, NpgsqlTransaction transaction, string partition) { // No need to create a model RDL for the created EngineeringModelSetup since is handled in the client. It happens in the same transaction as the creation of the EngineeringModelSetup itself var firstIterationSetup = this.CreateIterationSetup(thing, transaction, partition); diff --git a/CometServer/Services/Operations/SideEffects/Implementation/ParameterSideEffect.cs b/CometServer/Services/Operations/SideEffects/Implementation/ParameterSideEffect.cs index 890b732f..6b69029b 100644 --- a/CometServer/Services/Operations/SideEffects/Implementation/ParameterSideEffect.cs +++ b/CometServer/Services/Operations/SideEffects/Implementation/ParameterSideEffect.cs @@ -374,7 +374,7 @@ public override void AfterUpdate( securityContext); // clean up old values - this.DeleteOldValueSet(transaction, partition, originalThing, parameterOverrides, parameterSubscriptions); + this.DeleteOldValueSet(transaction, partition, originalThing); } /// @@ -666,7 +666,7 @@ private IEnumerable CreateDefaultStateDependentValueSetCollec /// /// The which value-sets to reset /// - private void DeleteOldValueSet(NpgsqlTransaction transaction, string partition, Parameter originalThing, IReadOnlyList parameterOverrides, IReadOnlyList parameterSubscriptions) + private void DeleteOldValueSet(NpgsqlTransaction transaction, string partition, Parameter originalThing) { foreach (var valueset in originalThing.ValueSet) {