Skip to content

Commit 56259b2

Browse files
committed
remove unused
Signed-off-by: Kevin <kevin.dinh@lissi.id>
1 parent c70be23 commit 56259b2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1231
-1287
lines changed

src/WalletFramework.Core/Json/JsonSettings.cs

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,26 @@
11
using Newtonsoft.Json;
22

3-
namespace WalletFramework.Oid4Vc
3+
namespace WalletFramework.Oid4Vc;
4+
5+
/// <summary>
6+
/// Formatting extensions
7+
/// </summary>
8+
public static class FormattingExtensions
49
{
510
/// <summary>
6-
/// Formatting extensions
11+
/// Converts an <see cref="object"/> to json string using default converter.
712
/// </summary>
8-
public static class FormattingExtensions
9-
{
10-
/// <summary>
11-
/// Converts an <see cref="object"/> to json string using default converter.
12-
/// </summary>
13-
/// <param name="obj">The object.</param>
14-
/// <returns></returns>
15-
public static string ToJson(this object obj) =>
16-
JsonConvert.SerializeObject(obj, Formatting.None);
13+
/// <param name="obj">The object.</param>
14+
/// <returns></returns>
15+
public static string ToJson(this object obj) =>
16+
JsonConvert.SerializeObject(obj, Formatting.None);
1717

18-
/// <summary>
19-
/// Converts an object to json string using the provided <see cref="JsonSerializerSettings"/>
20-
/// </summary>
21-
/// <returns>The json.</returns>
22-
/// <param name="obj">Object.</param>
23-
/// <param name="settings">SerializerSettings.</param>
24-
public static string ToJson(this object obj, JsonSerializerSettings settings) =>
25-
JsonConvert.SerializeObject(obj, settings);
26-
}
27-
}
18+
/// <summary>
19+
/// Converts an object to json string using the provided <see cref="JsonSerializerSettings"/>
20+
/// </summary>
21+
/// <returns>The json.</returns>
22+
/// <param name="obj">Object.</param>
23+
/// <param name="settings">SerializerSettings.</param>
24+
public static string ToJson(this object obj, JsonSerializerSettings settings) =>
25+
JsonConvert.SerializeObject(obj, settings);
26+
}
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
// ReSharper disable once CheckNamespace
2-
namespace System.Runtime.CompilerServices
2+
namespace System.Runtime.CompilerServices;
3+
4+
// This is needed for the init property setter. This can be removed when updating to a newer C# Version.
5+
// https://stackoverflow.com/questions/64749385/predefined-type-system-runtime-compilerservices-isexternalinit-is-not-defined
6+
internal static class IsExternalInit
37
{
4-
// This is needed for the init property setter. This can be removed when updating to a newer C# Version.
5-
// https://stackoverflow.com/questions/64749385/predefined-type-system-runtime-compilerservices-isexternalinit-is-not-defined
6-
internal static class IsExternalInit
7-
{
8-
}
9-
}
8+
}

src/WalletFramework.Oid4Vc/Oid4Vci/Authorization/Models/OAuthToken.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using Newtonsoft.Json;
2-
using WalletFramework.Oid4Vc.Oid4Vci.AuthFlow;
32
using WalletFramework.Oid4Vc.Oid4Vci.AuthFlow.Models;
43

54
namespace WalletFramework.Oid4Vc.Oid4Vci.Authorization.Models;

src/WalletFramework.Oid4Vc/Oid4Vci/CredConfiguration/Models/SdJwt/SdJwtConfiguration.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using Newtonsoft.Json;
21
using Newtonsoft.Json.Linq;
32
using WalletFramework.Core.Functional;
43
using WalletFramework.Core.Json;

src/WalletFramework.Oid4Vc/Oid4Vci/CredRequest/Models/Mdoc/MdocCredentialRequest.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using LanguageExt;
2-
using Newtonsoft.Json.Linq;
32
using WalletFramework.MdocLib;
43
using WalletFramework.Oid4Vc.Oid4Vci.CredConfiguration.Models.Mdoc;
54

src/WalletFramework.Oid4Vc/Oid4Vci/CredRequest/Models/SdJwt/SdJwtCredentialRequest.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using Newtonsoft.Json.Linq;
21
using WalletFramework.SdJwtVc.Models;
32

43
namespace WalletFramework.Oid4Vc.Oid4Vci.CredRequest.Models.SdJwt;
Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
using System.Net;
22

3-
namespace WalletFramework.Oid4Vc.Oid4Vci.Exceptions
3+
namespace WalletFramework.Oid4Vc.Oid4Vci.Exceptions;
4+
5+
/// <summary>
6+
/// Represents an exception thrown when the grant within the Oid4Vci flow is invalid (e.g. wrong tx_code).
7+
/// </summary>
8+
public class Oid4VciInvalidGrantException : Exception
49
{
510
/// <summary>
6-
/// Represents an exception thrown when the grant within the Oid4Vci flow is invalid (e.g. wrong tx_code).
11+
/// Initializes a new instance of the <see cref="Oid4VciInvalidGrantException"/> class.
712
/// </summary>
8-
public class Oid4VciInvalidGrantException : Exception
13+
/// <param name="statusCode">The StatusCode associated with the thrown Exception</param>
14+
public Oid4VciInvalidGrantException(HttpStatusCode statusCode)
15+
: base($"Invalid grant error. Status Code is {statusCode}")
916
{
10-
/// <summary>
11-
/// Initializes a new instance of the <see cref="Oid4VciInvalidGrantException"/> class.
12-
/// </summary>
13-
/// <param name="statusCode">The StatusCode associated with the thrown Exception</param>
14-
public Oid4VciInvalidGrantException(HttpStatusCode statusCode)
15-
: base($"Invalid grant error. Status Code is {statusCode}")
16-
{
17-
}
1817
}
19-
}
18+
}

src/WalletFramework.Oid4Vc/Oid4Vci/Issuer/Abstractions/IIssuerMetadataService.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using WalletFramework.Core.Functional;
22
using WalletFramework.Core.Localization;
33
using WalletFramework.Oid4Vc.Oid4Vci.Issuer.Models;
4-
using WalletFramework.Oid4Vc.Oid4Vci.Models;
54

65
namespace WalletFramework.Oid4Vc.Oid4Vci.Issuer.Abstractions;
76

src/WalletFramework.Oid4Vc/Oid4Vci/Issuer/Implementations/IssuerMetadataService.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
using WalletFramework.Core.Localization;
33
using WalletFramework.Oid4Vc.Oid4Vci.Issuer.Abstractions;
44
using WalletFramework.Oid4Vc.Oid4Vci.Issuer.Models;
5-
using WalletFramework.Oid4Vc.Oid4Vci.Models;
6-
using WalletFramework.Oid4Vc.Oid4Vci.Models.Metadata.Issuer;
75
using static WalletFramework.Core.Json.JsonFun;
86
using static WalletFramework.Oid4Vc.Oid4Vci.Issuer.Models.IssuerMetadata;
97

0 commit comments

Comments
 (0)