Skip to content
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

[Refactoring] Updated descriptions. Speed up serialization performance. #24

Merged
merged 2 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Client/Com/Cumulocity/Client/Api/IUsageStatisticsApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ public interface IUsageStatisticsApi
/// <summary>
/// Retrieve usage statistics files metadata <br />
/// Retrieve usage statistics summary files report metadata. <br />
/// ⓘ Info: This is only accessible by the Management tenant. <br />
///
/// <br /> Required roles <br />
/// ROLE_TENANT_MANAGEMENT_ADMIN
Expand Down Expand Up @@ -306,6 +307,7 @@ public interface IUsageStatisticsApi
/// </description>
/// </item>
/// </list>
/// ⓘ Info: This is only accessible by the Management tenant. <br />
///
/// <br /> Required roles <br />
/// ROLE_TENANT_MANAGEMENT_ADMIN OR ROLE_TENANT_MANAGEMENT_CREATE
Expand Down Expand Up @@ -335,6 +337,7 @@ public interface IUsageStatisticsApi
/// <summary>
/// Retrieve a usage statistics file <br />
/// Retrieve a specific usage statistics file (by a given ID). <br />
/// ⓘ Info: This is only accessible by the Management tenant. <br />
///
/// <br /> Required roles <br />
/// ROLE_TENANT_MANAGEMENT_ADMIN
Expand Down Expand Up @@ -375,6 +378,7 @@ public interface IUsageStatisticsApi
/// </description>
/// </item>
/// </list>
/// ⓘ Info: This is only accessible by the Management tenant. <br />
///
/// <br /> Required roles <br />
/// ROLE_TENANT_MANAGEMENT_ADMIN
Expand Down
4 changes: 1 addition & 3 deletions Client/Com/Cumulocity/Client/Model/LoginForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ public enum GrantType
[EnumMember(Value = "PASSWORD")]
PASSWORD,
[EnumMember(Value = "AUTHORIZATION_CODE")]
AUTHORIZATIONCODE,
[EnumMember(Value = "REFRESH_TOKEN")]
REFRESHTOKEN
AUTHORIZATIONCODE
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,9 @@
{
return JsonSerializer.Deserialize<T>(jsonString, options ?? JsonSerializerOptions);
}

public static JsonNode? ToJsonNode<T>(T body, JsonSerializerOptions? options = null)

Check failure on line 51 in Client/Com/Cumulocity/Client/Supplementary/JsonSerializerWrapper.cs

View workflow job for this annotation

GitHub Actions / build

The type or namespace name 'JsonNode' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 51 in Client/Com/Cumulocity/Client/Supplementary/JsonSerializerWrapper.cs

View workflow job for this annotation

GitHub Actions / build

The type or namespace name 'JsonNode' could not be found (are you missing a using directive or an assembly reference?)
{
return JsonSerializer.SerializeToNode(body, options ?? JsonSerializerOptions);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ public static class ObjectExtensions
{
public static JsonNode? ToJsonNode<T>(this T body)
{
var jsonString = JsonSerializerWrapper.Serialize(body);
return JsonSerializerWrapper.Deserialize<JsonNode>(jsonString);
return JsonSerializerWrapper.ToJsonNode(body);
}
}
Loading