Skip to content

Commit

Permalink
[SQ] remove unused method parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
samatrhea committed Dec 17, 2023
1 parent 0faefa3 commit 9c129d4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions CometServer/Modules/10-25/ExchangeFileImportyApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -371,7 +371,7 @@ internal async Task SeedDataStore(HttpRequest request, HttpResponse response, IR
/// <returns>
/// True if successful, false if not
/// </returns>
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;
Expand Down
4 changes: 2 additions & 2 deletions CometServer/Services/ChangeLog/ChangeLogService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -426,7 +426,7 @@ private LogEntryChangelogItem CreateAddOrUpdateLogEntryChangelogItem(NpgsqlTrans
/// <returns>
/// The created <see cref="CDP4Common.CommonData.LogEntryChangelogItem"/>s.
/// </returns>
private LogEntryChangelogItem CreateDeleteLogEntryChangelogItems(NpgsqlTransaction transaction, string partition, CdpPostOperation operation, ClasslessDTO deleteInfo, ModelLogEntry modelLogEntry, IReadOnlyList<Thing> changedThings)
private LogEntryChangelogItem CreateDeleteLogEntryChangelogItems(NpgsqlTransaction transaction, string partition, ClasslessDTO deleteInfo, ModelLogEntry modelLogEntry, IReadOnlyList<Thing> changedThings)
{
if (Enum.TryParse<ClassKind>(deleteInfo[nameof(Thing.ClassKind)].ToString(), out var classKind) && IsAddLogEntryChangeLogItemAllowed(classKind))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,15 +219,15 @@ 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);

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);
Expand Down Expand Up @@ -267,7 +267,7 @@ public override void BeforeUpdate(EngineeringModelSetup thing, Thing container,
/// <param name="transaction">The current transaction</param>
/// <param name="partition">The partition</param>
/// <param name="securityContext">The security context</param>
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);
Expand All @@ -281,7 +281,7 @@ private void CreateCopyEngineeringModel(EngineeringModelSetup thing, Thing conta
/// <param name="transaction">The current transaction</param>
/// <param name="partition">The partition</param>
/// <param name="securityContext">The security context</param>
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/// <summary>
Expand Down Expand Up @@ -666,7 +666,7 @@ private IEnumerable<ParameterValueSet> CreateDefaultStateDependentValueSetCollec
/// <param name="parameterSubscriptions">
/// The <see cref="ParameterSubscription"/> which value-sets to reset
/// </param>
private void DeleteOldValueSet(NpgsqlTransaction transaction, string partition, Parameter originalThing, IReadOnlyList<ParameterOverride> parameterOverrides, IReadOnlyList<ParameterSubscription> parameterSubscriptions)
private void DeleteOldValueSet(NpgsqlTransaction transaction, string partition, Parameter originalThing)
{
foreach (var valueset in originalThing.ValueSet)
{
Expand Down

0 comments on commit 9c129d4

Please sign in to comment.