Skip to content

Commit

Permalink
Refactored call to publisher event
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcus Nordlund committed Feb 5, 2024
1 parent bc7060e commit 259604c
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions src/Tools/Performance Toolkit/App/src/BCPTLine.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,8 @@ codeunit 149005 "BCPT Line"
BCPTRoleWrapperImpl: Codeunit "BCPT Role Wrapper"; // single instance
ValuesAreChanged: Boolean;
BCPTTestSuite: Codeunit "BCPT Test Suite";
ModifiedMessage, ModifiedOperation : Text;
ModifiedExecutionSuccess: Boolean;
begin
InitValuesSubscriberCanModify(Operation, ExecutionSuccess, Message, ModifiedExecutionSuccess, ModifiedMessage, ModifiedOperation);
BCPTTestSuite.OnBeforeBCPTLineAddLogEntry(BCPTLine."BCPT Code", BCPTLine."Codeunit ID", BCPTLine.Description, Operation, ExecutionSuccess, Message, ModifiedOperation, ModifiedExecutionSuccess, ModifiedMessage);
UpdateValuesFromSubscribers(Operation, ExecutionSuccess, Message, ModifiedExecutionSuccess, ModifiedMessage, ModifiedOperation);
BCPTTestSuite.OnBeforeBCPTLineAddLogEntry(BCPTLine."BCPT Code", BCPTLine."Codeunit ID", BCPTLine.Description, Operation, ExecutionSuccess, Message, Operation, ExecutionSuccess, Message);

BCPTLine.Testfield("BCPT Code");
BCPTRoleWrapperImpl.GetBCPTHeader(BCPTHeader);
Expand Down Expand Up @@ -239,16 +235,6 @@ codeunit 149005 "BCPT Line"
Dimensions)
end;

local procedure UpdateValuesFromSubscribers(var Operation: Text; var ExecutionSuccess: Boolean; var Message: Text; var ModifiedExecutionSuccess: Boolean; var ModifiedMessage: Text; var ModifiedOperation: Text)
begin
if ModifiedExecutionSuccess <> ExecutionSuccess then
ExecutionSuccess := ModifiedExecutionSuccess;
if ModifiedMessage <> Message then
Message := ModifiedMessage;
if ModifiedOperation <> Operation then
Operation := ModifiedOperation;
end;

local procedure InitValuesSubscriberCanModify(var Operation: Text; var ExecutionSuccess: Boolean; var Message: Text; var ModifiedExecutionSuccess: Boolean; var ModifiedMessage: Text; var ModifiedOperation: Text)
begin
ModifiedMessage := Message;
Expand Down

0 comments on commit 259604c

Please sign in to comment.