Skip to content

Commit 34c343c

Browse files
authored
Use global namespace to resolve System.Text.Json (#6822)
1 parent 9a718ee commit 34c343c

File tree

125 files changed

+574
-5229
lines changed

Some content is hidden

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

125 files changed

+574
-5229
lines changed

src/HotChocolate/Core/test/Types.Analyzers.Tests/packages.lock.json

Lines changed: 0 additions & 3051 deletions
Large diffs are not rendered by default.

src/HotChocolate/Fusion/test/Shared/packages.lock.json

Lines changed: 0 additions & 1604 deletions
Large diffs are not rendered by default.

src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Generators/JsonResultBuilderGenerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ private void AddDeserializeMethod(
229229
// element will be not null, but instead a JSON element of kind JsonValueKind.Null.
230230
var jsonElementNullValueKindCheck = IfBuilder
231231
.New()
232-
.SetCondition($"{_obj}.Value.ValueKind == System.Text.Json.JsonValueKind.Null")
232+
.SetCondition($"{_obj}.Value.ValueKind == global::System.Text.Json.JsonValueKind.Null")
233233
.AddCode(
234234
typeReference.IsNonNull()
235235
? ExceptionBuilder.New(TypeNames.ArgumentNullException)

src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/Integration/AnyScalarDefaultSerializationTest.Client.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ public GetJsonBuilder(global::StrawberryShake.IEntityStore entityStore, global::
383383
throw new global::System.ArgumentNullException();
384384
}
385385

386-
if (obj.Value.ValueKind == System.Text.Json.JsonValueKind.Null)
386+
if (obj.Value.ValueKind == global::System.Text.Json.JsonValueKind.Null)
387387
{
388388
throw new global::System.ArgumentNullException();
389389
}

src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/Integration/EntityIdOrDataTest.Client.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,7 @@ public GetFooBuilder(global::StrawberryShake.IEntityStore entityStore, global::S
864864
return null;
865865
}
866866

867-
if (obj.Value.ValueKind == System.Text.Json.JsonValueKind.Null)
867+
if (obj.Value.ValueKind == global::System.Text.Json.JsonValueKind.Null)
868868
{
869869
return null;
870870
}
@@ -885,7 +885,7 @@ public GetFooBuilder(global::StrawberryShake.IEntityStore entityStore, global::S
885885
return null;
886886
}
887887

888-
if (obj.Value.ValueKind == System.Text.Json.JsonValueKind.Null)
888+
if (obj.Value.ValueKind == global::System.Text.Json.JsonValueKind.Null)
889889
{
890890
return null;
891891
}
@@ -947,7 +947,7 @@ public GetFooBuilder(global::StrawberryShake.IEntityStore entityStore, global::S
947947
return null;
948948
}
949949

950-
if (obj.Value.ValueKind == System.Text.Json.JsonValueKind.Null)
950+
if (obj.Value.ValueKind == global::System.Text.Json.JsonValueKind.Null)
951951
{
952952
return null;
953953
}

src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/Integration/MultiProfileTest.Client.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1905,7 +1905,7 @@ public GetHeroBuilder(global::StrawberryShake.IEntityStore entityStore, global::
19051905
return null;
19061906
}
19071907

1908-
if (obj.Value.ValueKind == System.Text.Json.JsonValueKind.Null)
1908+
if (obj.Value.ValueKind == global::System.Text.Json.JsonValueKind.Null)
19091909
{
19101910
return null;
19111911
}
@@ -1950,7 +1950,7 @@ public GetHeroBuilder(global::StrawberryShake.IEntityStore entityStore, global::
19501950
throw new global::System.ArgumentNullException();
19511951
}
19521952

1953-
if (obj.Value.ValueKind == System.Text.Json.JsonValueKind.Null)
1953+
if (obj.Value.ValueKind == global::System.Text.Json.JsonValueKind.Null)
19541954
{
19551955
throw new global::System.ArgumentNullException();
19561956
}
@@ -1965,7 +1965,7 @@ public GetHeroBuilder(global::StrawberryShake.IEntityStore entityStore, global::
19651965
return null;
19661966
}
19671967

1968-
if (obj.Value.ValueKind == System.Text.Json.JsonValueKind.Null)
1968+
if (obj.Value.ValueKind == global::System.Text.Json.JsonValueKind.Null)
19691969
{
19701970
return null;
19711971
}
@@ -1986,7 +1986,7 @@ public GetHeroBuilder(global::StrawberryShake.IEntityStore entityStore, global::
19861986
return null;
19871987
}
19881988

1989-
if (obj.Value.ValueKind == System.Text.Json.JsonValueKind.Null)
1989+
if (obj.Value.ValueKind == global::System.Text.Json.JsonValueKind.Null)
19901990
{
19911991
return null;
19921992
}
@@ -2007,7 +2007,7 @@ public GetHeroBuilder(global::StrawberryShake.IEntityStore entityStore, global::
20072007
return null;
20082008
}
20092009

2010-
if (obj.Value.ValueKind == System.Text.Json.JsonValueKind.Null)
2010+
if (obj.Value.ValueKind == global::System.Text.Json.JsonValueKind.Null)
20112011
{
20122012
return null;
20132013
}
@@ -2083,7 +2083,7 @@ public OnReviewSubBuilder(global::StrawberryShake.IEntityStore entityStore, glob
20832083
throw new global::System.ArgumentNullException();
20842084
}
20852085

2086-
if (obj.Value.ValueKind == System.Text.Json.JsonValueKind.Null)
2086+
if (obj.Value.ValueKind == global::System.Text.Json.JsonValueKind.Null)
20872087
{
20882088
throw new global::System.ArgumentNullException();
20892089
}
@@ -2104,7 +2104,7 @@ public OnReviewSubBuilder(global::StrawberryShake.IEntityStore entityStore, glob
21042104
throw new global::System.ArgumentNullException();
21052105
}
21062106

2107-
if (obj.Value.ValueKind == System.Text.Json.JsonValueKind.Null)
2107+
if (obj.Value.ValueKind == global::System.Text.Json.JsonValueKind.Null)
21082108
{
21092109
throw new global::System.ArgumentNullException();
21102110
}
@@ -2119,7 +2119,7 @@ public OnReviewSubBuilder(global::StrawberryShake.IEntityStore entityStore, glob
21192119
throw new global::System.ArgumentNullException();
21202120
}
21212121

2122-
if (obj.Value.ValueKind == System.Text.Json.JsonValueKind.Null)
2122+
if (obj.Value.ValueKind == global::System.Text.Json.JsonValueKind.Null)
21232123
{
21242124
throw new global::System.ArgumentNullException();
21252125
}
@@ -2134,7 +2134,7 @@ public OnReviewSubBuilder(global::StrawberryShake.IEntityStore entityStore, glob
21342134
return null;
21352135
}
21362136

2137-
if (obj.Value.ValueKind == System.Text.Json.JsonValueKind.Null)
2137+
if (obj.Value.ValueKind == global::System.Text.Json.JsonValueKind.Null)
21382138
{
21392139
return null;
21402140
}
@@ -2182,7 +2182,7 @@ public CreateReviewMutBuilder(global::StrawberryShake.IEntityStore entityStore,
21822182
throw new global::System.ArgumentNullException();
21832183
}
21842184

2185-
if (obj.Value.ValueKind == System.Text.Json.JsonValueKind.Null)
2185+
if (obj.Value.ValueKind == global::System.Text.Json.JsonValueKind.Null)
21862186
{
21872187
throw new global::System.ArgumentNullException();
21882188
}
@@ -2203,7 +2203,7 @@ public CreateReviewMutBuilder(global::StrawberryShake.IEntityStore entityStore,
22032203
throw new global::System.ArgumentNullException();
22042204
}
22052205

2206-
if (obj.Value.ValueKind == System.Text.Json.JsonValueKind.Null)
2206+
if (obj.Value.ValueKind == global::System.Text.Json.JsonValueKind.Null)
22072207
{
22082208
throw new global::System.ArgumentNullException();
22092209
}
@@ -2218,7 +2218,7 @@ public CreateReviewMutBuilder(global::StrawberryShake.IEntityStore entityStore,
22182218
return null;
22192219
}
22202220

2221-
if (obj.Value.ValueKind == System.Text.Json.JsonValueKind.Null)
2221+
if (obj.Value.ValueKind == global::System.Text.Json.JsonValueKind.Null)
22222222
{
22232223
return null;
22242224
}

src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/Integration/StarWarsGetFriendsDeferInListTest.Client.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,7 +1018,7 @@ public GetHeroBuilder(global::StrawberryShake.IEntityStore entityStore, global::
10181018
return null;
10191019
}
10201020

1021-
if (obj.Value.ValueKind == System.Text.Json.JsonValueKind.Null)
1021+
if (obj.Value.ValueKind == global::System.Text.Json.JsonValueKind.Null)
10221022
{
10231023
return null;
10241024
}
@@ -1063,7 +1063,7 @@ public GetHeroBuilder(global::StrawberryShake.IEntityStore entityStore, global::
10631063
return null;
10641064
}
10651065

1066-
if (obj.Value.ValueKind == System.Text.Json.JsonValueKind.Null)
1066+
if (obj.Value.ValueKind == global::System.Text.Json.JsonValueKind.Null)
10671067
{
10681068
return null;
10691069
}
@@ -1084,7 +1084,7 @@ public GetHeroBuilder(global::StrawberryShake.IEntityStore entityStore, global::
10841084
return null;
10851085
}
10861086

1087-
if (obj.Value.ValueKind == System.Text.Json.JsonValueKind.Null)
1087+
if (obj.Value.ValueKind == global::System.Text.Json.JsonValueKind.Null)
10881088
{
10891089
return null;
10901090
}
@@ -1105,7 +1105,7 @@ public GetHeroBuilder(global::StrawberryShake.IEntityStore entityStore, global::
11051105
return null;
11061106
}
11071107

1108-
if (obj.Value.ValueKind == System.Text.Json.JsonValueKind.Null)
1108+
if (obj.Value.ValueKind == global::System.Text.Json.JsonValueKind.Null)
11091109
{
11101110
return null;
11111111
}
@@ -1150,7 +1150,7 @@ public GetHeroBuilder(global::StrawberryShake.IEntityStore entityStore, global::
11501150
return null;
11511151
}
11521152

1153-
if (obj.Value.ValueKind == System.Text.Json.JsonValueKind.Null)
1153+
if (obj.Value.ValueKind == global::System.Text.Json.JsonValueKind.Null)
11541154
{
11551155
return null;
11561156
}

src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/Integration/StarWarsGetFriendsDeferredTest.Client.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,7 +1027,7 @@ public GetHeroBuilder(global::StrawberryShake.IEntityStore entityStore, global::
10271027
return null;
10281028
}
10291029

1030-
if (obj.Value.ValueKind == System.Text.Json.JsonValueKind.Null)
1030+
if (obj.Value.ValueKind == global::System.Text.Json.JsonValueKind.Null)
10311031
{
10321032
return null;
10331033
}
@@ -1072,7 +1072,7 @@ public GetHeroBuilder(global::StrawberryShake.IEntityStore entityStore, global::
10721072
throw new global::System.ArgumentNullException();
10731073
}
10741074

1075-
if (obj.Value.ValueKind == System.Text.Json.JsonValueKind.Null)
1075+
if (obj.Value.ValueKind == global::System.Text.Json.JsonValueKind.Null)
10761076
{
10771077
throw new global::System.ArgumentNullException();
10781078
}
@@ -1087,7 +1087,7 @@ public GetHeroBuilder(global::StrawberryShake.IEntityStore entityStore, global::
10871087
return null;
10881088
}
10891089

1090-
if (obj.Value.ValueKind == System.Text.Json.JsonValueKind.Null)
1090+
if (obj.Value.ValueKind == global::System.Text.Json.JsonValueKind.Null)
10911091
{
10921092
return null;
10931093
}
@@ -1108,7 +1108,7 @@ public GetHeroBuilder(global::StrawberryShake.IEntityStore entityStore, global::
11081108
return null;
11091109
}
11101110

1111-
if (obj.Value.ValueKind == System.Text.Json.JsonValueKind.Null)
1111+
if (obj.Value.ValueKind == global::System.Text.Json.JsonValueKind.Null)
11121112
{
11131113
return null;
11141114
}
@@ -1129,7 +1129,7 @@ public GetHeroBuilder(global::StrawberryShake.IEntityStore entityStore, global::
11291129
return null;
11301130
}
11311131

1132-
if (obj.Value.ValueKind == System.Text.Json.JsonValueKind.Null)
1132+
if (obj.Value.ValueKind == global::System.Text.Json.JsonValueKind.Null)
11331133
{
11341134
return null;
11351135
}

src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/Integration/StarWarsGetFriendsNoStoreTest.Client.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -881,7 +881,7 @@ public GetHeroBuilder(global::StrawberryShake.IOperationResultDataFactory<global
881881
return null;
882882
}
883883

884-
if (obj.Value.ValueKind == System.Text.Json.JsonValueKind.Null)
884+
if (obj.Value.ValueKind == global::System.Text.Json.JsonValueKind.Null)
885885
{
886886
return null;
887887
}
@@ -907,7 +907,7 @@ public GetHeroBuilder(global::StrawberryShake.IOperationResultDataFactory<global
907907
throw new global::System.ArgumentNullException();
908908
}
909909

910-
if (obj.Value.ValueKind == System.Text.Json.JsonValueKind.Null)
910+
if (obj.Value.ValueKind == global::System.Text.Json.JsonValueKind.Null)
911911
{
912912
throw new global::System.ArgumentNullException();
913913
}
@@ -922,7 +922,7 @@ public GetHeroBuilder(global::StrawberryShake.IOperationResultDataFactory<global
922922
return null;
923923
}
924924

925-
if (obj.Value.ValueKind == System.Text.Json.JsonValueKind.Null)
925+
if (obj.Value.ValueKind == global::System.Text.Json.JsonValueKind.Null)
926926
{
927927
return null;
928928
}
@@ -943,7 +943,7 @@ public GetHeroBuilder(global::StrawberryShake.IOperationResultDataFactory<global
943943
return null;
944944
}
945945

946-
if (obj.Value.ValueKind == System.Text.Json.JsonValueKind.Null)
946+
if (obj.Value.ValueKind == global::System.Text.Json.JsonValueKind.Null)
947947
{
948948
return null;
949949
}

src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/Integration/StarWarsGetFriendsTest.Client.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@ public GetHeroBuilder(global::StrawberryShake.IEntityStore entityStore, global::
917917
return null;
918918
}
919919

920-
if (obj.Value.ValueKind == System.Text.Json.JsonValueKind.Null)
920+
if (obj.Value.ValueKind == global::System.Text.Json.JsonValueKind.Null)
921921
{
922922
return null;
923923
}
@@ -962,7 +962,7 @@ public GetHeroBuilder(global::StrawberryShake.IEntityStore entityStore, global::
962962
throw new global::System.ArgumentNullException();
963963
}
964964

965-
if (obj.Value.ValueKind == System.Text.Json.JsonValueKind.Null)
965+
if (obj.Value.ValueKind == global::System.Text.Json.JsonValueKind.Null)
966966
{
967967
throw new global::System.ArgumentNullException();
968968
}
@@ -977,7 +977,7 @@ public GetHeroBuilder(global::StrawberryShake.IEntityStore entityStore, global::
977977
return null;
978978
}
979979

980-
if (obj.Value.ValueKind == System.Text.Json.JsonValueKind.Null)
980+
if (obj.Value.ValueKind == global::System.Text.Json.JsonValueKind.Null)
981981
{
982982
return null;
983983
}
@@ -998,7 +998,7 @@ public GetHeroBuilder(global::StrawberryShake.IEntityStore entityStore, global::
998998
return null;
999999
}
10001000

1001-
if (obj.Value.ValueKind == System.Text.Json.JsonValueKind.Null)
1001+
if (obj.Value.ValueKind == global::System.Text.Json.JsonValueKind.Null)
10021002
{
10031003
return null;
10041004
}
@@ -1019,7 +1019,7 @@ public GetHeroBuilder(global::StrawberryShake.IEntityStore entityStore, global::
10191019
return null;
10201020
}
10211021

1022-
if (obj.Value.ValueKind == System.Text.Json.JsonValueKind.Null)
1022+
if (obj.Value.ValueKind == global::System.Text.Json.JsonValueKind.Null)
10231023
{
10241024
return null;
10251025
}

0 commit comments

Comments
 (0)