diff --git a/src/DryGen.CSharpFromJsonSchema/CSharpFromJsonSchemaGenerator.cs b/src/DryGen.CSharpFromJsonSchema/CSharpFromJsonSchemaGenerator.cs index 5def47c..803f44a 100644 --- a/src/DryGen.CSharpFromJsonSchema/CSharpFromJsonSchemaGenerator.cs +++ b/src/DryGen.CSharpFromJsonSchema/CSharpFromJsonSchemaGenerator.cs @@ -57,10 +57,7 @@ private static void RemoveSynteticSchemaProperty(JsonSchema jsonSchema) { // Hack to get rid of the syntetic $schema property we must use if we want additionalProperties = false in the topmost object const string schemaPropertyName = "$schema"; - if (jsonSchema.Properties.ContainsKey(schemaPropertyName)) - { - jsonSchema.Properties.Remove(schemaPropertyName); - } + jsonSchema.Properties.Remove(schemaPropertyName); } private static async Task LoadJsonSchemaFromFile(string? jsonSchemaFileName, JsonSchemaFileFormat jsonSchemaFileFormat) diff --git a/src/DryGen.MermaidFromCSharp/ClassDiagram/ClassDiagramGenerator.cs b/src/DryGen.MermaidFromCSharp/ClassDiagram/ClassDiagramGenerator.cs index 788d294..34aee9c 100644 --- a/src/DryGen.MermaidFromCSharp/ClassDiagram/ClassDiagramGenerator.cs +++ b/src/DryGen.MermaidFromCSharp/ClassDiagram/ClassDiagramGenerator.cs @@ -94,7 +94,7 @@ private static ClassDiagramClass[] ConvertExtensionMethodsToInstanceMethodsOnKno return classDiagramClasses.Except(removedExtensionClasses).ToArray(); } - private static void GenerateClassAssociationsCompositionsAndAggregations(IDictionary classLookup, ClassDiagramClass classDiagramClass) + private static void GenerateClassAssociationsCompositionsAndAggregations(Dictionary classLookup, ClassDiagramClass classDiagramClass) { foreach (var property in classDiagramClass.Type.GetProperties( BindingFlags.Instance | @@ -179,7 +179,7 @@ private static void GenerateClassInheritanceOrRealizationForInterfaces(Dictionar } } - private static void GenerateClassInheritanceForBaseType(IDictionary classLookup, ClassDiagramClass classDiagramClass) + private static void GenerateClassInheritanceForBaseType(Dictionary classLookup, ClassDiagramClass classDiagramClass) { if (classDiagramClass.Type.IsInterface) {