Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit59bcf85

Browse files
authored
Merge pull request#78 from appwrite/dev
feat: .NET SDK update for version 0.21.2
2 parentsa72f69a +b8a1874 commit59bcf85

File tree

127 files changed

+229
-90
lines changed

Some content is hidden

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

127 files changed

+229
-90
lines changed

‎Appwrite/Appwrite.csproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<TargetFrameworks>netstandard2.0;net462</TargetFrameworks>
44
<PackageId>Appwrite</PackageId>
5-
<Version>0.21.1</Version>
5+
<Version>0.21.2</Version>
66
<Authors>Appwrite Team</Authors>
77
<Company>Appwrite Team</Company>
88
<Description>

‎Appwrite/Client.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ public Client(
6969
_headers=newDictionary<string,string>()
7070
{
7171
{"content-type","application/json"},
72-
{"user-agent",$"AppwriteDotNetSDK/0.21.1 ({Environment.OSVersion.Platform};{Environment.OSVersion.VersionString})"},
72+
{"user-agent",$"AppwriteDotNetSDK/0.21.2 ({Environment.OSVersion.Platform};{Environment.OSVersion.VersionString})"},
7373
{"x-sdk-name",".NET"},
7474
{"x-sdk-platform","server"},
7575
{"x-sdk-language","dotnet"},
76-
{"x-sdk-version","0.21.1"},
76+
{"x-sdk-version","0.21.2"},
7777
{"X-Appwrite-Response-Format","1.8.0"}
7878
};
7979

‎Appwrite/Extensions/Extensions.cs‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
usingSystem;
22
usingSystem.Collections;
33
usingSystem.Collections.Generic;
4+
usingSystem.Linq;
45
usingSystem.Text.Json;
56

67
namespaceAppwrite.Extensions
@@ -12,6 +13,18 @@ public static string ToJson(this Dictionary<string, object?> dict)
1213
returnJsonSerializer.Serialize(dict,Client.SerializerOptions);
1314
}
1415

16+
publicstaticList<T>ConvertToList<T>(thisobjectvalue)
17+
{
18+
returnvalueswitch
19+
{
20+
JsonElementjsonElement=>jsonElement.Deserialize<List<T>>()??thrownewInvalidCastException($"Cannot deserialize{jsonElement} to List<{typeof(T)}>."),
21+
object[]objArray=>objArray.Cast<T>().ToList(),
22+
List<T>list=>list,
23+
IEnumerable<T>enumerable=>enumerable.ToList(),
24+
_=>thrownewInvalidCastException($"Cannot convert{value.GetType()} to List<{typeof(T)}>")
25+
};
26+
}
27+
1528
publicstaticstringToQueryString(thisDictionary<string,object?>parameters)
1629
{
1730
varquery=newList<string>();

‎Appwrite/Models/AlgoArgon2.cs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
usingSystem.Text.Json;
66
usingSystem.Text.Json.Serialization;
77
usingAppwrite.Enums;
8+
usingAppwrite.Extensions;
89

910
namespaceAppwrite.Models
1011
{

‎Appwrite/Models/AlgoBcrypt.cs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
usingSystem.Text.Json;
66
usingSystem.Text.Json.Serialization;
77
usingAppwrite.Enums;
8+
usingAppwrite.Extensions;
89

910
namespaceAppwrite.Models
1011
{

‎Appwrite/Models/AlgoMd5.cs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
usingSystem.Text.Json;
66
usingSystem.Text.Json.Serialization;
77
usingAppwrite.Enums;
8+
usingAppwrite.Extensions;
89

910
namespaceAppwrite.Models
1011
{

‎Appwrite/Models/AlgoPhpass.cs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
usingSystem.Text.Json;
66
usingSystem.Text.Json.Serialization;
77
usingAppwrite.Enums;
8+
usingAppwrite.Extensions;
89

910
namespaceAppwrite.Models
1011
{

‎Appwrite/Models/AlgoScrypt.cs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
usingSystem.Text.Json;
66
usingSystem.Text.Json.Serialization;
77
usingAppwrite.Enums;
8+
usingAppwrite.Extensions;
89

910
namespaceAppwrite.Models
1011
{

‎Appwrite/Models/AlgoScryptModified.cs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
usingSystem.Text.Json;
66
usingSystem.Text.Json.Serialization;
77
usingAppwrite.Enums;
8+
usingAppwrite.Extensions;
89

910
namespaceAppwrite.Models
1011
{

‎Appwrite/Models/AlgoSha.cs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
usingSystem.Text.Json;
66
usingSystem.Text.Json.Serialization;
77
usingAppwrite.Enums;
8+
usingAppwrite.Extensions;
89

910
namespaceAppwrite.Models
1011
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp