From f1c7bb9bb5b040b8870f1a488b7f8dfbb2626c7d Mon Sep 17 00:00:00 2001 From: Blaise Taylor Date: Fri, 30 Jan 2026 09:50:04 -0500 Subject: [PATCH] AB#4 Fixing recommendations from GitHub Code Quality. --- .github/workflows/ci.yml | 6 ++---- .../DesignerSerializationManager.cs | 9 ++++++--- 2 files changed, 8 insertions(+), 7 deletions(-) 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;