From bcb4f3b43b0cd1d380bf6804d8489b705e2f0c65 Mon Sep 17 00:00:00 2001 From: Samuele Lorefice Date: Sun, 12 Nov 2023 03:48:36 +0100 Subject: [PATCH] Adds constructors where needed --- ComfySharp/ComfyClient.cs | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/ComfySharp/ComfyClient.cs b/ComfySharp/ComfyClient.cs index c738b86..c849aec 100644 --- a/ComfySharp/ComfyClient.cs +++ b/ComfySharp/ComfyClient.cs @@ -89,6 +89,18 @@ public class Node { public string Category { get; set; } [DataMember(Name = "output_node")] public bool IsOutputNode { get; set; } + + public Node() { + Name = ""; + Input = new(); + Outputs = new(); + OutputIsList = new(); + OutputNames = new(); + DisplayName = ""; + Description = ""; + Category = ""; + IsOutputNode = false; + } } [DataContract] @@ -100,8 +112,11 @@ public struct Input { [DataMember] public List Hidden { get; set; } - - + public Input() { + Required = new(); + Optional = new(); + Hidden = new(); + } } public struct InputField {