-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lagt til klientMeldingId #73
Merged
Merged
Changes from 2 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
d26f4fd
Lagt til klientMeldingId
jarleborsheim 51cca47
Lagt til optional klientMeldingId
jarleborsheim d0e12ed
Oppdatert etter fiks på send.client
jarleborsheim 4375ef4
Korrigert MeldingRequest til at KlientMeldingId skal ikke være requir…
jarleborsheim 9750b11
KlienMeldingId korrekt optional på SvarSender også
jarleborsheim e1321f8
Fikset interface
jarleborsheim 81e0422
Tatt bort using som ikke er i bruk
jarleborsheim 93e3b1a
Mapper klientMeldingId til header i stedet for å være egen property
jarleborsheim f3aa628
Erstattet med const
jarleborsheim 520e2d1
Bumpet til release av fiks-io-send-client
jarleborsheim 3a388a4
Unit tests for FromSentMessageApiModel
jarleborsheim 20b27af
Tatt bort auto generering av klientMeldingId på svar
jarleborsheim b77719f
Ny unit-test for MeldingRequest
jarleborsheim 9527467
Logger feilmelding hvis KlientMeldingId ikke var på Guid format
jarleborsheim fa9a80a
Endret til ilogger
jarleborsheim 5b3ba06
Merge branch 'master' into jb-klientMeldingId
jarleborsheim b0113c8
Tatt bort logging
jarleborsheim 8d6479e
Merge
jarleborsheim 533f616
TryParse guid
jarleborsheim e98bac0
Lagt til flere tester
jarleborsheim 50e3d7b
Returner null hvis klientMeldingId var null og guid.empty hvis parsin…
jarleborsheim File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Security.Cryptography.X509Certificates; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Denne er ikke i bruk |
||
using System.Threading.Tasks; | ||
using KS.Fiks.IO.Client.Amqp; | ||
using KS.Fiks.IO.Client.Models; | ||
|
@@ -22,32 +23,32 @@ public SvarSender(ISendHandler sendHandler, MottattMelding mottattMelding, IAmqp | |
_amqpAcknowledgeManager = amqpAcknowledgeManager; | ||
} | ||
|
||
public async Task<SendtMelding> Svar(string meldingType, IList<IPayload> payloads) | ||
public async Task<SendtMelding> Svar(string meldingType, IList<IPayload> payloads, Guid klientMeldingId = default) | ||
{ | ||
return await _sendHandler.Send(CreateMessageRequest(meldingType), payloads).ConfigureAwait(false); | ||
return await _sendHandler.Send(CreateMessageRequest(meldingType, klientMeldingId), payloads).ConfigureAwait(false); | ||
} | ||
|
||
public async Task<SendtMelding> Svar(string meldingType, Stream melding, string filnavn) | ||
public async Task<SendtMelding> Svar(string meldingType, Stream melding, string filnavn, Guid klientMeldingId = default) | ||
{ | ||
return await Reply(meldingType, new StreamPayload(melding, filnavn)) | ||
return await Reply(meldingType, new StreamPayload(melding, filnavn), klientMeldingId) | ||
.ConfigureAwait(false); | ||
} | ||
|
||
public async Task<SendtMelding> Svar(string meldingType, string melding, string filnavn) | ||
public async Task<SendtMelding> Svar(string meldingType, string melding, string filnavn, Guid klientMeldingId = default) | ||
{ | ||
return await Reply(meldingType, new StringPayload(melding, filnavn)) | ||
return await Reply(meldingType, new StringPayload(melding, filnavn), klientMeldingId) | ||
.ConfigureAwait(false); | ||
} | ||
|
||
public async Task<SendtMelding> Svar(string meldingType, string filLokasjon) | ||
public async Task<SendtMelding> Svar(string meldingType, string filLokasjon, Guid klientMeldingId = default) | ||
{ | ||
return await Reply(meldingType, new FilePayload(filLokasjon)) | ||
return await Reply(meldingType, new FilePayload(filLokasjon), klientMeldingId) | ||
.ConfigureAwait(false); | ||
} | ||
|
||
public async Task<SendtMelding> Svar(string meldingType) | ||
public async Task<SendtMelding> Svar(string meldingType, Guid klientMeldingId = default) | ||
{ | ||
return await Svar(meldingType, new List<IPayload>()) | ||
return await Svar(meldingType, new List<IPayload>(), klientMeldingId) | ||
.ConfigureAwait(false); | ||
} | ||
|
||
|
@@ -66,16 +67,22 @@ public void NackWithRequeue() | |
this._amqpAcknowledgeManager.NackWithRequeue().Invoke(); | ||
} | ||
|
||
private async Task<SendtMelding> Reply(string messageType, IPayload payload) | ||
private async Task<SendtMelding> Reply(string messageType, IPayload payload, Guid klientMeldingId) | ||
{ | ||
return await Svar(messageType, new List<IPayload> {payload}).ConfigureAwait(false); | ||
return await Svar(messageType, new List<IPayload> {payload}, klientMeldingId).ConfigureAwait(false); | ||
} | ||
|
||
private MeldingRequest CreateMessageRequest(string messageType) | ||
private MeldingRequest CreateMessageRequest(string messageType, Guid klientMeldingId) | ||
{ | ||
if (klientMeldingId == Guid.Empty) | ||
{ | ||
klientMeldingId = Guid.NewGuid(); | ||
} | ||
|
||
return new MeldingRequest( | ||
avsenderKontoId: _mottattMelding.MottakerKontoId, | ||
mottakerKontoId: _mottattMelding.AvsenderKontoId, | ||
klientMeldingId: klientMeldingId, | ||
meldingType: messageType, | ||
ttl: null, | ||
headere: null, | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
De andre suffix er pascalcase på id