From 1db3026637c9e59261d16788db81c436fe9998d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jarle=20B=C3=B8rsheim?= Date: Tue, 10 Jan 2023 12:54:15 +0100 Subject: [PATCH] =?UTF-8?q?Hjelpemetode=20for=20=C3=A5=20sjekke=20om=20mel?= =?UTF-8?q?dingstype=20er=20innenfor=20protokollen=20(#23)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Hjelpemetode for å sjekke om meldingstype er innenfor protokollen * Fiks Co-authored-by: Jarle Børsheim --- .../Meldingstyper/FiksArkivMeldingtype.cs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/KS.Fiks.Arkiv.Models.V1/Meldingstyper/FiksArkivMeldingtype.cs b/KS.Fiks.Arkiv.Models.V1/Meldingstyper/FiksArkivMeldingtype.cs index 12ae6eb..83bf1e5 100644 --- a/KS.Fiks.Arkiv.Models.V1/Meldingstyper/FiksArkivMeldingtype.cs +++ b/KS.Fiks.Arkiv.Models.V1/Meldingstyper/FiksArkivMeldingtype.cs @@ -62,19 +62,24 @@ public static class FiksArkivMeldingtype }; - public static bool IsArkiveringType(string meldingsType) + public static bool IsArkiveringType(string meldingstype) { - return ArkiveringTyper.Contains(meldingsType); + return ArkiveringTyper.Contains(meldingstype); } - public static bool IsInnsynType(string meldingsType) + public static bool IsInnsynType(string meldingstype) { - return InnsynTyper.Contains(meldingsType); + return InnsynTyper.Contains(meldingstype); } - public static bool IsFeilmelding(string meldingsType) + public static bool IsFeilmelding(string meldingstype) { - return FeilmeldingTyper.Contains(meldingsType); + return FeilmeldingTyper.Contains(meldingstype); + } + + public static bool IsGyldigProtokollType(string meldingstype) + { + return IsArkiveringType(meldingstype) || IsInnsynType(meldingstype) || IsFeilmelding(meldingstype); } } } \ No newline at end of file