diff options
author | Marco Rossignoli <marco.rossignoli@gmail.com> | 2018-03-19 20:53:35 +0300 |
---|---|---|
committer | Santiago Fernandez Madero <safern@microsoft.com> | 2018-03-19 20:53:35 +0300 |
commit | dc7de2ef73e33cc0b690175198e42e7a6c032205 (patch) | |
tree | bfc1703d0ea7e70fb1f79ae8c1d28c0d162c08ba /src/System.ComponentModel.TypeConverter | |
parent | a298f2c84e2c0beb9bc5253fdc02fbfb7adac6ec (diff) |
Bug fix: Force properties reload (#28167)
* force proterties reload
* rename test method
Diffstat (limited to 'src/System.ComponentModel.TypeConverter')
2 files changed, 4 insertions, 2 deletions
diff --git a/src/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/DesignerOptionService.cs b/src/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/DesignerOptionService.cs index 9088ef3fd6..4e4358ed03 100644 --- a/src/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/DesignerOptionService.cs +++ b/src/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/DesignerOptionService.cs @@ -154,6 +154,7 @@ namespace System.ComponentModel.Design if (Parent != null) { + parent._properties = null; if (Parent._children == null) { Parent._children = new ArrayList(1); diff --git a/src/System.ComponentModel.TypeConverter/tests/Design/DesignerOptionServiceTests.cs b/src/System.ComponentModel.TypeConverter/tests/Design/DesignerOptionServiceTests.cs index b44922d2a7..63b8cb2001 100644 --- a/src/System.ComponentModel.TypeConverter/tests/Design/DesignerOptionServiceTests.cs +++ b/src/System.ComponentModel.TypeConverter/tests/Design/DesignerOptionServiceTests.cs @@ -180,13 +180,14 @@ namespace System.ComponentModel.Design.Tests } [Fact] - public void Properties_GetBeforeAddingChild_ReturnsEmpty() + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] + public void Properties_GetBeforeAddingChild_ReturnsNonEmpty() { var service = new TestDesignerOptionService(); Assert.Empty(service.Options.Properties); DesignerOptionService.DesignerOptionCollection options = service.DoCreateOptionCollection(service.Options, "name", "value"); - Assert.Empty(service.Options.Properties); + Assert.NotEmpty(service.Options.Properties); } [Fact] |