Skip to content

Commit

Permalink
Merge pull request #654 from jupjohn/fix/system-text-json-global-name…
Browse files Browse the repository at this point in the history
…space

fix: prefix STJ generated file namespace with global
  • Loading branch information
SteveDunn authored Aug 5, 2024
2 parents 9f22002 + e640191 commit 63d1053
Show file tree
Hide file tree
Showing 505 changed files with 505 additions and 505 deletions.
2 changes: 1 addition & 1 deletion src/Vogen/WriteSystemTextJsonConverterFactories.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ private static string BuildEntry(VoWorkItem eachStj)
{
var fqn = string.IsNullOrEmpty(eachStj.FullNamespace)
? $"{eachStj.VoTypeName}"
: $"{eachStj.FullNamespace}.{eachStj.VoTypeName}";
: $"global::{eachStj.FullNamespace}.{eachStj.VoTypeName}";

return $$"""{ typeof({{fqn}}), new global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>(() => new {{fqn}}.{{eachStj.VoTypeName}}SystemTextJsonConverter()) }""";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public class VogenTypesFactory : global::System.Text.Json.Serialization.JsonConv
public VogenTypesFactory() { }
private static readonly global::System.Collections.Generic.Dictionary<global::System.Type, global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>> _lookup =
new global::System.Collections.Generic.Dictionary<global::System.Type, global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>> {
{ typeof(MyLongNamespace.Vo), new global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>(() => new MyLongNamespace.Vo.VoSystemTextJsonConverter()) }
{ typeof(global::MyLongNamespace.Vo), new global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>(() => new global::MyLongNamespace.Vo.VoSystemTextJsonConverter()) }
};

public override bool CanConvert(global::System.Type typeToConvert) => _lookup.ContainsKey(typeToConvert);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public class VogenTypesFactory : global::System.Text.Json.Serialization.JsonConv
public VogenTypesFactory() { }
private static readonly global::System.Collections.Generic.Dictionary<global::System.Type, global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>> _lookup =
new global::System.Collections.Generic.Dictionary<global::System.Type, global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>> {
{ typeof(MyLongNamespace.Vo), new global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>(() => new MyLongNamespace.Vo.VoSystemTextJsonConverter()) }
{ typeof(global::MyLongNamespace.Vo), new global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>(() => new global::MyLongNamespace.Vo.VoSystemTextJsonConverter()) }
};

public override bool CanConvert(global::System.Type typeToConvert) => _lookup.ContainsKey(typeToConvert);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class VogenTypesFactory : global::System.Text.Json.Serialization.JsonConv
public VogenTypesFactory() { }
private static readonly global::System.Collections.Generic.Dictionary<global::System.Type, global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>> _lookup =
new global::System.Collections.Generic.Dictionary<global::System.Type, global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>> {
{ typeof(MyLongNamespace.Vo), new global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>(() => new MyLongNamespace.Vo.VoSystemTextJsonConverter()) }
{ typeof(global::MyLongNamespace.Vo), new global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>(() => new global::MyLongNamespace.Vo.VoSystemTextJsonConverter()) }
};

public override bool CanConvert(global::System.Type typeToConvert) => _lookup.ContainsKey(typeToConvert);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class VogenTypesFactory : global::System.Text.Json.Serialization.JsonConv
public VogenTypesFactory() { }
private static readonly global::System.Collections.Generic.Dictionary<global::System.Type, global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>> _lookup =
new global::System.Collections.Generic.Dictionary<global::System.Type, global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>> {
{ typeof(Whatever._casting_public_partial_structNoneImplicit), new global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>(() => new Whatever._casting_public_partial_structNoneImplicit._casting_public_partial_structNoneImplicitSystemTextJsonConverter()) }
{ typeof(global::Whatever._casting_public_partial_structNoneImplicit), new global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>(() => new global::Whatever._casting_public_partial_structNoneImplicit._casting_public_partial_structNoneImplicitSystemTextJsonConverter()) }
};

public override bool CanConvert(global::System.Type typeToConvert) => _lookup.ContainsKey(typeToConvert);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class VogenTypesFactory : global::System.Text.Json.Serialization.JsonConv
public VogenTypesFactory() { }
private static readonly global::System.Collections.Generic.Dictionary<global::System.Type, global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>> _lookup =
new global::System.Collections.Generic.Dictionary<global::System.Type, global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>> {
{ typeof(Whatever._casting_public_partial_structImplicitNoneint), new global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>(() => new Whatever._casting_public_partial_structImplicitNoneint._casting_public_partial_structImplicitNoneintSystemTextJsonConverter()) }
{ typeof(global::Whatever._casting_public_partial_structImplicitNoneint), new global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>(() => new global::Whatever._casting_public_partial_structImplicitNoneint._casting_public_partial_structImplicitNoneintSystemTextJsonConverter()) }
};

public override bool CanConvert(global::System.Type typeToConvert) => _lookup.ContainsKey(typeToConvert);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class VogenTypesFactory : global::System.Text.Json.Serialization.JsonConv
public VogenTypesFactory() { }
private static readonly global::System.Collections.Generic.Dictionary<global::System.Type, global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>> _lookup =
new global::System.Collections.Generic.Dictionary<global::System.Type, global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>> {
{ typeof(Whatever._casting_public_partial_classImplicitNoneint), new global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>(() => new Whatever._casting_public_partial_classImplicitNoneint._casting_public_partial_classImplicitNoneintSystemTextJsonConverter()) }
{ typeof(global::Whatever._casting_public_partial_classImplicitNoneint), new global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>(() => new global::Whatever._casting_public_partial_classImplicitNoneint._casting_public_partial_classImplicitNoneintSystemTextJsonConverter()) }
};

public override bool CanConvert(global::System.Type typeToConvert) => _lookup.ContainsKey(typeToConvert);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class VogenTypesFactory : global::System.Text.Json.Serialization.JsonConv
public VogenTypesFactory() { }
private static readonly global::System.Collections.Generic.Dictionary<global::System.Type, global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>> _lookup =
new global::System.Collections.Generic.Dictionary<global::System.Type, global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>> {
{ typeof(Whatever._casting_public_partial_classExplicitExplicitstring), new global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>(() => new Whatever._casting_public_partial_classExplicitExplicitstring._casting_public_partial_classExplicitExplicitstringSystemTextJsonConverter()) }
{ typeof(global::Whatever._casting_public_partial_classExplicitExplicitstring), new global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>(() => new global::Whatever._casting_public_partial_classExplicitExplicitstring._casting_public_partial_classExplicitExplicitstringSystemTextJsonConverter()) }
};

public override bool CanConvert(global::System.Type typeToConvert) => _lookup.ContainsKey(typeToConvert);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class VogenTypesFactory : global::System.Text.Json.Serialization.JsonConv
public VogenTypesFactory() { }
private static readonly global::System.Collections.Generic.Dictionary<global::System.Type, global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>> _lookup =
new global::System.Collections.Generic.Dictionary<global::System.Type, global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>> {
{ typeof(Whatever._casting_public_partial_structNoneNone), new global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>(() => new Whatever._casting_public_partial_structNoneNone._casting_public_partial_structNoneNoneSystemTextJsonConverter()) }
{ typeof(global::Whatever._casting_public_partial_structNoneNone), new global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>(() => new global::Whatever._casting_public_partial_structNoneNone._casting_public_partial_structNoneNoneSystemTextJsonConverter()) }
};

public override bool CanConvert(global::System.Type typeToConvert) => _lookup.ContainsKey(typeToConvert);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class VogenTypesFactory : global::System.Text.Json.Serialization.JsonConv
public VogenTypesFactory() { }
private static readonly global::System.Collections.Generic.Dictionary<global::System.Type, global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>> _lookup =
new global::System.Collections.Generic.Dictionary<global::System.Type, global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>> {
{ typeof(Whatever._casting_public_partial_classImplicitExplicitstring), new global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>(() => new Whatever._casting_public_partial_classImplicitExplicitstring._casting_public_partial_classImplicitExplicitstringSystemTextJsonConverter()) }
{ typeof(global::Whatever._casting_public_partial_classImplicitExplicitstring), new global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>(() => new global::Whatever._casting_public_partial_classImplicitExplicitstring._casting_public_partial_classImplicitExplicitstringSystemTextJsonConverter()) }
};

public override bool CanConvert(global::System.Type typeToConvert) => _lookup.ContainsKey(typeToConvert);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class VogenTypesFactory : global::System.Text.Json.Serialization.JsonConv
public VogenTypesFactory() { }
private static readonly global::System.Collections.Generic.Dictionary<global::System.Type, global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>> _lookup =
new global::System.Collections.Generic.Dictionary<global::System.Type, global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>> {
{ typeof(Whatever._casting_public_partial_recordNoneImplicit), new global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>(() => new Whatever._casting_public_partial_recordNoneImplicit._casting_public_partial_recordNoneImplicitSystemTextJsonConverter()) }
{ typeof(global::Whatever._casting_public_partial_recordNoneImplicit), new global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>(() => new global::Whatever._casting_public_partial_recordNoneImplicit._casting_public_partial_recordNoneImplicitSystemTextJsonConverter()) }
};

public override bool CanConvert(global::System.Type typeToConvert) => _lookup.ContainsKey(typeToConvert);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class VogenTypesFactory : global::System.Text.Json.Serialization.JsonConv
public VogenTypesFactory() { }
private static readonly global::System.Collections.Generic.Dictionary<global::System.Type, global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>> _lookup =
new global::System.Collections.Generic.Dictionary<global::System.Type, global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>> {
{ typeof(Whatever._casting_public_partial_classExplicitNoneint), new global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>(() => new Whatever._casting_public_partial_classExplicitNoneint._casting_public_partial_classExplicitNoneintSystemTextJsonConverter()) }
{ typeof(global::Whatever._casting_public_partial_classExplicitNoneint), new global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>(() => new global::Whatever._casting_public_partial_classExplicitNoneint._casting_public_partial_classExplicitNoneintSystemTextJsonConverter()) }
};

public override bool CanConvert(global::System.Type typeToConvert) => _lookup.ContainsKey(typeToConvert);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class VogenTypesFactory : global::System.Text.Json.Serialization.JsonConv
public VogenTypesFactory() { }
private static readonly global::System.Collections.Generic.Dictionary<global::System.Type, global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>> _lookup =
new global::System.Collections.Generic.Dictionary<global::System.Type, global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>> {
{ typeof(Whatever._casting_public_partial_recordExplicitNonedecimal), new global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>(() => new Whatever._casting_public_partial_recordExplicitNonedecimal._casting_public_partial_recordExplicitNonedecimalSystemTextJsonConverter()) }
{ typeof(global::Whatever._casting_public_partial_recordExplicitNonedecimal), new global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>(() => new global::Whatever._casting_public_partial_recordExplicitNonedecimal._casting_public_partial_recordExplicitNonedecimalSystemTextJsonConverter()) }
};

public override bool CanConvert(global::System.Type typeToConvert) => _lookup.ContainsKey(typeToConvert);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class VogenTypesFactory : global::System.Text.Json.Serialization.JsonConv
public VogenTypesFactory() { }
private static readonly global::System.Collections.Generic.Dictionary<global::System.Type, global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>> _lookup =
new global::System.Collections.Generic.Dictionary<global::System.Type, global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>> {
{ typeof(Whatever._casting_public_partial_recordImplicitNonedecimal), new global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>(() => new Whatever._casting_public_partial_recordImplicitNonedecimal._casting_public_partial_recordImplicitNonedecimalSystemTextJsonConverter()) }
{ typeof(global::Whatever._casting_public_partial_recordImplicitNonedecimal), new global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>(() => new global::Whatever._casting_public_partial_recordImplicitNonedecimal._casting_public_partial_recordImplicitNonedecimalSystemTextJsonConverter()) }
};

public override bool CanConvert(global::System.Type typeToConvert) => _lookup.ContainsKey(typeToConvert);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class VogenTypesFactory : global::System.Text.Json.Serialization.JsonConv
public VogenTypesFactory() { }
private static readonly global::System.Collections.Generic.Dictionary<global::System.Type, global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>> _lookup =
new global::System.Collections.Generic.Dictionary<global::System.Type, global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>> {
{ typeof(Whatever._casting_public_partial_structExplicitNone), new global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>(() => new Whatever._casting_public_partial_structExplicitNone._casting_public_partial_structExplicitNoneSystemTextJsonConverter()) }
{ typeof(global::Whatever._casting_public_partial_structExplicitNone), new global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>(() => new global::Whatever._casting_public_partial_structExplicitNone._casting_public_partial_structExplicitNoneSystemTextJsonConverter()) }
};

public override bool CanConvert(global::System.Type typeToConvert) => _lookup.ContainsKey(typeToConvert);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class VogenTypesFactory : global::System.Text.Json.Serialization.JsonConv
public VogenTypesFactory() { }
private static readonly global::System.Collections.Generic.Dictionary<global::System.Type, global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>> _lookup =
new global::System.Collections.Generic.Dictionary<global::System.Type, global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>> {
{ typeof(Whatever._casting_public_partial_classNoneImplicitint), new global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>(() => new Whatever._casting_public_partial_classNoneImplicitint._casting_public_partial_classNoneImplicitintSystemTextJsonConverter()) }
{ typeof(global::Whatever._casting_public_partial_classNoneImplicitint), new global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>(() => new global::Whatever._casting_public_partial_classNoneImplicitint._casting_public_partial_classNoneImplicitintSystemTextJsonConverter()) }
};

public override bool CanConvert(global::System.Type typeToConvert) => _lookup.ContainsKey(typeToConvert);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class VogenTypesFactory : global::System.Text.Json.Serialization.JsonConv
public VogenTypesFactory() { }
private static readonly global::System.Collections.Generic.Dictionary<global::System.Type, global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>> _lookup =
new global::System.Collections.Generic.Dictionary<global::System.Type, global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>> {
{ typeof(Whatever._casting_public_partial_recordImplicitExplicitdecimal), new global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>(() => new Whatever._casting_public_partial_recordImplicitExplicitdecimal._casting_public_partial_recordImplicitExplicitdecimalSystemTextJsonConverter()) }
{ typeof(global::Whatever._casting_public_partial_recordImplicitExplicitdecimal), new global::System.Lazy<global::System.Text.Json.Serialization.JsonConverter>(() => new global::Whatever._casting_public_partial_recordImplicitExplicitdecimal._casting_public_partial_recordImplicitExplicitdecimalSystemTextJsonConverter()) }
};

public override bool CanConvert(global::System.Type typeToConvert) => _lookup.ContainsKey(typeToConvert);
Expand Down
Loading

0 comments on commit 63d1053

Please sign in to comment.