Skip to content

Commit 98c0b43

Browse files
committed
move structs to own file
Signed-off-by: Johannes Tuerk <johannes.tuerk@lissi.id>
1 parent a68ec20 commit 98c0b43

File tree

3 files changed

+35
-33
lines changed

3 files changed

+35
-33
lines changed
Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
using WalletFramework.Core.Functional;
2-
using WalletFramework.Core.Functional.Errors;
3-
41
namespace WalletFramework.Oid4Vc.Oid4Vci.AuthFlow.Models;
52

63
public record CombinedWalletAttestation
@@ -29,33 +26,3 @@ public static string ToStringRepresentation(this CombinedWalletAttestation combi
2926
=> combinedWalletAttestation.WalletInstanceAttestationJwt + "~" +
3027
combinedWalletAttestation.WalletInstanceAttestationPopJwt;
3128
}
32-
33-
public struct WalletInstanceAttestationPopJwt
34-
{
35-
public string Value { get; }
36-
37-
public static implicit operator string(WalletInstanceAttestationPopJwt keyId) => keyId.Value;
38-
39-
private WalletInstanceAttestationPopJwt(string value) => Value = value;
40-
41-
public static WalletInstanceAttestationPopJwt CreateWalletInstanceAttestationPopJwt(string value) => new (value);
42-
}
43-
44-
public struct WalletInstanceAttestationJwt
45-
{
46-
public string Value { get; }
47-
48-
public static implicit operator string(WalletInstanceAttestationJwt keyId) => keyId.Value;
49-
50-
private WalletInstanceAttestationJwt(string value) => Value = value;
51-
52-
public static Validation<WalletInstanceAttestationJwt> ValidWalletInstanceAttestationJwt(string value)
53-
{
54-
if (string.IsNullOrWhiteSpace(value))
55-
{
56-
return new StringIsNullOrWhitespaceError<WalletInstanceAttestationJwt>();
57-
}
58-
59-
return new WalletInstanceAttestationJwt(value);
60-
}
61-
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using WalletFramework.Core.Functional;
2+
using WalletFramework.Core.Functional.Errors;
3+
4+
namespace WalletFramework.Oid4Vc.Oid4Vci.AuthFlow.Models;
5+
6+
public struct WalletInstanceAttestationJwt
7+
{
8+
public string Value { get; }
9+
10+
public static implicit operator string(WalletInstanceAttestationJwt keyId) => keyId.Value;
11+
12+
private WalletInstanceAttestationJwt(string value) => Value = value;
13+
14+
public static Validation<WalletInstanceAttestationJwt> ValidWalletInstanceAttestationJwt(string value)
15+
{
16+
if (string.IsNullOrWhiteSpace(value))
17+
{
18+
return new StringIsNullOrWhitespaceError<WalletInstanceAttestationJwt>();
19+
}
20+
21+
return new WalletInstanceAttestationJwt(value);
22+
}
23+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
namespace WalletFramework.Oid4Vc.Oid4Vci.AuthFlow.Models;
2+
3+
public struct WalletInstanceAttestationPopJwt
4+
{
5+
public string Value { get; }
6+
7+
public static implicit operator string(WalletInstanceAttestationPopJwt keyId) => keyId.Value;
8+
9+
private WalletInstanceAttestationPopJwt(string value) => Value = value;
10+
11+
public static WalletInstanceAttestationPopJwt CreateWalletInstanceAttestationPopJwt(string value) => new (value);
12+
}

0 commit comments

Comments
 (0)