diff --git a/Source/EventHorizon.Blazor.TypeScript.Interop.Generator/Normalizers/DotNetNormalizer.cs b/Source/EventHorizon.Blazor.TypeScript.Interop.Generator/Normalizers/DotNetNormalizer.cs index bc0c306b..88b90756 100644 --- a/Source/EventHorizon.Blazor.TypeScript.Interop.Generator/Normalizers/DotNetNormalizer.cs +++ b/Source/EventHorizon.Blazor.TypeScript.Interop.Generator/Normalizers/DotNetNormalizer.cs @@ -13,6 +13,9 @@ public static class DotNetNormalizer "event", "bool", "virtual", + "string", + "this", + "params" }; public static string Normalize( diff --git a/Tests/EventHorizon.Blazor.TypeScript.Interop.Generator.Tests/GenerateClassStatementStringTests/Accessors/Scenarios/DotNetNormalized.Expected.txt b/Tests/EventHorizon.Blazor.TypeScript.Interop.Generator.Tests/GenerateClassStatementStringTests/Accessors/Scenarios/DotNetNormalized.Expected.txt index c1052149..a1f2cdbf 100644 --- a/Tests/EventHorizon.Blazor.TypeScript.Interop.Generator.Tests/GenerateClassStatementStringTests/Accessors/Scenarios/DotNetNormalized.Expected.txt +++ b/Tests/EventHorizon.Blazor.TypeScript.Interop.Generator.Tests/GenerateClassStatementStringTests/Accessors/Scenarios/DotNetNormalized.Expected.txt @@ -167,6 +167,66 @@ namespace Examples return __virtual; } } + + private Vector3 __string; + public Vector3 @string + { + get + { + if(__string == null) + { + __string = EventHorizonBlazorInterop.GetClass( + this.___guid, + "string", + (entity) => + { + return new Vector3() { ___guid = entity.___guid }; + } + ); + } + return __string; + } + } + + private Vector3 __this; + public Vector3 @this + { + get + { + if(__this == null) + { + __this = EventHorizonBlazorInterop.GetClass( + this.___guid, + "this", + (entity) => + { + return new Vector3() { ___guid = entity.___guid }; + } + ); + } + return __this; + } + } + + private Vector3 __params; + public Vector3 @params + { + get + { + if(__params == null) + { + __params = EventHorizonBlazorInterop.GetClass( + this.___guid, + "params", + (entity) => + { + return new Vector3() { ___guid = entity.___guid }; + } + ); + } + return __params; + } + } #endregion #region Properties diff --git a/Tests/EventHorizon.Blazor.TypeScript.Interop.Generator.Tests/GenerateClassStatementStringTests/Accessors/Scenarios/DotNetNormalized.ts b/Tests/EventHorizon.Blazor.TypeScript.Interop.Generator.Tests/GenerateClassStatementStringTests/Accessors/Scenarios/DotNetNormalized.ts index 5ab42e6a..8de29a86 100644 --- a/Tests/EventHorizon.Blazor.TypeScript.Interop.Generator.Tests/GenerateClassStatementStringTests/Accessors/Scenarios/DotNetNormalized.ts +++ b/Tests/EventHorizon.Blazor.TypeScript.Interop.Generator.Tests/GenerateClassStatementStringTests/Accessors/Scenarios/DotNetNormalized.ts @@ -7,5 +7,8 @@ declare module Examples { get event(): Vector3; get bool(): Vector3; get virtual(): Vector3; + get string(): Vector3; + get this(): Vector3; + get params(): Vector3; } } \ No newline at end of file diff --git a/Tests/EventHorizon.Blazor.TypeScript.Interop.Generator.Tests/GenerateClassStatementStringTests/Constructors/DotNetNormalizedArguments.Expected.txt b/Tests/EventHorizon.Blazor.TypeScript.Interop.Generator.Tests/GenerateClassStatementStringTests/Constructors/DotNetNormalizedArguments.Expected.txt index 60d958cd..10e78db9 100644 --- a/Tests/EventHorizon.Blazor.TypeScript.Interop.Generator.Tests/GenerateClassStatementStringTests/Constructors/DotNetNormalizedArguments.Expected.txt +++ b/Tests/EventHorizon.Blazor.TypeScript.Interop.Generator.Tests/GenerateClassStatementStringTests/Constructors/DotNetNormalizedArguments.Expected.txt @@ -46,12 +46,12 @@ namespace Examples } public ExampleClass( - string @ref, string @lock, string @unlock, string @object, string @event, string @bool, string @virtual + string @ref, string @lock, string @unlock, string @object, string @event, string @bool, string @virtual, string @string, string @params ) { var entity = EventHorizonBlazorInterop.New( new string[] { "Examples", "ExampleClass" }, - @ref, @lock, @unlock, @object, @event, @bool, @virtual + @ref, @lock, @unlock, @object, @event, @bool, @virtual, @string, @params ); ___guid = entity.___guid; } diff --git a/Tests/EventHorizon.Blazor.TypeScript.Interop.Generator.Tests/GenerateClassStatementStringTests/Constructors/DotNetNormalizedArguments.ts b/Tests/EventHorizon.Blazor.TypeScript.Interop.Generator.Tests/GenerateClassStatementStringTests/Constructors/DotNetNormalizedArguments.ts index 4a743e09..218a5882 100644 --- a/Tests/EventHorizon.Blazor.TypeScript.Interop.Generator.Tests/GenerateClassStatementStringTests/Constructors/DotNetNormalizedArguments.ts +++ b/Tests/EventHorizon.Blazor.TypeScript.Interop.Generator.Tests/GenerateClassStatementStringTests/Constructors/DotNetNormalizedArguments.ts @@ -6,6 +6,9 @@ declare module Examples { object: string, event: string, bool: string, - virtual: string); + virtual: string, + string: string, + params: string + ); } } \ No newline at end of file diff --git a/Tests/EventHorizon.Blazor.TypeScript.Interop.Generator.Tests/GenerateClassStatementStringTests/Properties/Scenarios/DotNetNormalized.Expected.txt b/Tests/EventHorizon.Blazor.TypeScript.Interop.Generator.Tests/GenerateClassStatementStringTests/Properties/Scenarios/DotNetNormalized.Expected.txt index 0c9f0d04..2e5a44ab 100644 --- a/Tests/EventHorizon.Blazor.TypeScript.Interop.Generator.Tests/GenerateClassStatementStringTests/Properties/Scenarios/DotNetNormalized.Expected.txt +++ b/Tests/EventHorizon.Blazor.TypeScript.Interop.Generator.Tests/GenerateClassStatementStringTests/Properties/Scenarios/DotNetNormalized.Expected.txt @@ -234,6 +234,93 @@ __virtual = null; ); } } + + private Vector3 __string; + public Vector3 @string + { + get + { + if(__string == null) + { + __string = EventHorizonBlazorInterop.GetClass( + this.___guid, + "string", + (entity) => + { + return new Vector3() { ___guid = entity.___guid }; + } + ); + } + return __string; + } + set + { +__string = null; + EventHorizonBlazorInterop.Set( + this.___guid, + "string", + value + ); + } + } + + private Vector3 __this; + public Vector3 @this + { + get + { + if(__this == null) + { + __this = EventHorizonBlazorInterop.GetClass( + this.___guid, + "this", + (entity) => + { + return new Vector3() { ___guid = entity.___guid }; + } + ); + } + return __this; + } + set + { +__this = null; + EventHorizonBlazorInterop.Set( + this.___guid, + "this", + value + ); + } + } + + private Vector3 __params; + public Vector3 @params + { + get + { + if(__params == null) + { + __params = EventHorizonBlazorInterop.GetClass( + this.___guid, + "params", + (entity) => + { + return new Vector3() { ___guid = entity.___guid }; + } + ); + } + return __params; + } + set + { +__params = null; + EventHorizonBlazorInterop.Set( + this.___guid, + "params", + value + ); + } + } #endregion #region Constructor diff --git a/Tests/EventHorizon.Blazor.TypeScript.Interop.Generator.Tests/GenerateClassStatementStringTests/Properties/Scenarios/DotNetNormalized.ts b/Tests/EventHorizon.Blazor.TypeScript.Interop.Generator.Tests/GenerateClassStatementStringTests/Properties/Scenarios/DotNetNormalized.ts index 65b59506..0e18aea9 100644 --- a/Tests/EventHorizon.Blazor.TypeScript.Interop.Generator.Tests/GenerateClassStatementStringTests/Properties/Scenarios/DotNetNormalized.ts +++ b/Tests/EventHorizon.Blazor.TypeScript.Interop.Generator.Tests/GenerateClassStatementStringTests/Properties/Scenarios/DotNetNormalized.ts @@ -7,5 +7,8 @@ declare module Examples { event: Vector3; bool: Vector3; virtual: Vector3; + string: Vector3; + this: Vector3; + params: Vector3; } } \ No newline at end of file