fix: ignore CameraBase routing port list

The `RoutingPortCollection` type appears to not be currently
serializable. If a class that contains this collection is going to be
serialized, the collection should have the `JsonIgnore` attribute added.
If the list is needed, use a conversion object and convert it to a
regular list.
This commit is contained in:
Andrew Welker
2025-04-02 11:56:13 -05:00
parent f735f7377d
commit 1fe8993db3
6 changed files with 300 additions and 199 deletions

View File

@@ -1,4 +1,5 @@
using System;
using Newtonsoft.Json;
using System;
namespace PepperDash.Essentials.Core
@@ -8,10 +9,11 @@ namespace PepperDash.Essentials.Core
/// </summary>
public class RoutingInputPort : RoutingPort
{
/// <summary>
/// The IRoutingInputs object this lives on
/// </summary>
public IRoutingInputs ParentDevice { get; private set; }
/// <summary>
/// The IRoutingInputs object this lives on
/// </summary>
[JsonIgnore]
public IRoutingInputs ParentDevice { get; private set; }
/// <summary>
/// Constructor for a basic RoutingInputPort

View File

@@ -1,14 +1,17 @@
using System;
using Newtonsoft.Json;
using System;
namespace PepperDash.Essentials.Core
{
public class RoutingOutputPort : RoutingPort
{
/// <summary>
/// The IRoutingOutputs object this port lives on
/// </summary>
public IRoutingOutputs ParentDevice { get; private set; }
{
/// <summary>
/// The IRoutingOutputs object this port lives on
/// </summary>
///
[JsonIgnore]
public IRoutingOutputs ParentDevice { get; private set; }
public InUseTracking InUseTracker { get; private set; }

View File

@@ -2,9 +2,6 @@
using System.Collections.Generic;
using System.Linq;
using PepperDash.Core;
namespace PepperDash.Essentials.Core
{
/// <summary>