diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 51c870e..10aed1d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,10 +1,8 @@ name: CI on: - # workflow_dispatch: - - # push: - # branches: [ master ] + push: + branches: [ master ] pull_request: branches: [ master ] diff --git a/LogicBuilder.ComponentModel.Design.Serialization/DesignerSerializationManager.cs b/LogicBuilder.ComponentModel.Design.Serialization/DesignerSerializationManager.cs index 8121278..9e1e8c9 100644 --- a/LogicBuilder.ComponentModel.Design.Serialization/DesignerSerializationManager.cs +++ b/LogicBuilder.ComponentModel.Design.Serialization/DesignerSerializationManager.cs @@ -474,8 +474,11 @@ protected virtual object CreateInstance(Type type, ICollection arguments, string { obj = TypeDescriptor.CreateInstance(this.provider, type, null, array); } - catch (MissingMethodException ex) + catch (MissingMethodException) { + if (array == null || array.Length == 0) + throw; + Type[] array2 = new Type[array.Length]; for (int i = 0; i < array.Length; i++) { @@ -523,7 +526,7 @@ protected virtual object CreateInstance(Type type, ICollection arguments, string } if (obj == null) { - throw ex; + throw; } } } @@ -937,7 +940,7 @@ Type IDesignerSerializationManager.GetType(string typeName) { break; } - typeName = typeName.Substring(0, num) + "+" + typeName.Substring(num + 1, typeName.Length - num - 1); + typeName = $"{typeName.Substring(0, num)}{typeName.Substring(num + 1, typeName.Length - num - 1)}"; } } return type;