diff --git a/src/Razor/Microsoft.CodeAnalysis.Razor/src/BindTagHelperDescriptorProvider.cs b/src/Razor/Microsoft.CodeAnalysis.Razor/src/BindTagHelperDescriptorProvider.cs index cd1b335103..f055cc3bfd 100644 --- a/src/Razor/Microsoft.CodeAnalysis.Razor/src/BindTagHelperDescriptorProvider.cs +++ b/src/Razor/Microsoft.CodeAnalysis.Razor/src/BindTagHelperDescriptorProvider.cs @@ -437,7 +437,7 @@ namespace Microsoft.CodeAnalysis.Razor changeAttribute.Name); attribute.Name = "bind-" + valueAttribute.Name; - attribute.TypeName = valueAttribute.TypeName; + attribute.TypeName = changeAttribute.TypeName; attribute.IsEnum = valueAttribute.IsEnum; // WTE has a bug 15.7p1 where a Tag Helper without a display-name that looks like diff --git a/src/Razor/Microsoft.CodeAnalysis.Razor/test/BindTagHelperDescriptorProviderTest.cs b/src/Razor/Microsoft.CodeAnalysis.Razor/test/BindTagHelperDescriptorProviderTest.cs index bb8025c2bc..0265459112 100644 --- a/src/Razor/Microsoft.CodeAnalysis.Razor/test/BindTagHelperDescriptorProviderTest.cs +++ b/src/Razor/Microsoft.CodeAnalysis.Razor/test/BindTagHelperDescriptorProviderTest.cs @@ -122,11 +122,11 @@ namespace Test Assert.Equal("bind-MyProperty", attribute.Name); Assert.Equal("MyProperty", attribute.GetPropertyName()); - Assert.Equal("string Test.MyComponent.MyProperty", attribute.DisplayName); + Assert.Equal("System.Action Test.MyComponent.MyProperty", attribute.DisplayName); // Defined from the property type - Assert.Equal("System.String", attribute.TypeName); - Assert.True(attribute.IsStringProperty); + Assert.Equal("System.Action", attribute.TypeName); + Assert.False(attribute.IsStringProperty); Assert.False(attribute.IsBooleanProperty); Assert.False(attribute.IsEnum); } @@ -237,11 +237,11 @@ namespace Test Assert.Equal("bind-MyProperty", attribute.Name); Assert.Equal("MyProperty", attribute.GetPropertyName()); - Assert.Equal("string Test.MyComponent.MyProperty", attribute.DisplayName); + Assert.Equal("Microsoft.AspNetCore.Components.EventCallback Test.MyComponent.MyProperty", attribute.DisplayName); // Defined from the property type - Assert.Equal("System.String", attribute.TypeName); - Assert.True(attribute.IsStringProperty); + Assert.Equal("Microsoft.AspNetCore.Components.EventCallback", attribute.TypeName); + Assert.False(attribute.IsStringProperty); Assert.False(attribute.IsBooleanProperty); Assert.False(attribute.IsEnum); }