From cd3fc69fdd441e69c4bd7b7152e862a59efbc4d7 Mon Sep 17 00:00:00 2001 From: bparks13 Date: Wed, 28 Aug 2024 16:34:56 -0400 Subject: [PATCH] Bump version to 0.1.1 - Removed extra field from being serialized - Exposed Probe copy constructor as public --- Directory.Build.props | 2 +- OpenEphys.ProbeInterface.NET/Probe.cs | 5 +++-- OpenEphys.ProbeInterface.NET/ProbeGroup.cs | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 1c1e1d4..e9e1ada 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -12,7 +12,7 @@ LICENSE true icon.png - 0.1.0 + 0.1.1 10.0 strict diff --git a/OpenEphys.ProbeInterface.NET/Probe.cs b/OpenEphys.ProbeInterface.NET/Probe.cs index b7a84ad..d18decb 100644 --- a/OpenEphys.ProbeInterface.NET/Probe.cs +++ b/OpenEphys.ProbeInterface.NET/Probe.cs @@ -13,7 +13,7 @@ public class Probe /// [XmlIgnore] [JsonProperty("ndim", Required = Required.Always)] - public ProbeNdim NumDimensions { get; protected set; } + public ProbeNdim NumDimensions { get; protected set; } /// /// Gets the to use while plotting the . @@ -149,7 +149,7 @@ public Probe(ProbeNdim ndim, ProbeSiUnits si_units, ProbeAnnotations annotations /// Copy constructor given an existing object. /// /// Existing object to be copied. - protected Probe(Probe probe) + public Probe(Probe probe) { NumDimensions = probe.NumDimensions; SiUnits = probe.SiUnits; @@ -324,6 +324,7 @@ public Contact GetContact(int index) /// /// Gets the number of contacts within this . /// + [JsonIgnore] public int NumberOfContacts => ContactPositions.Length; } } diff --git a/OpenEphys.ProbeInterface.NET/ProbeGroup.cs b/OpenEphys.ProbeInterface.NET/ProbeGroup.cs index 5c6408f..b5955d0 100644 --- a/OpenEphys.ProbeInterface.NET/ProbeGroup.cs +++ b/OpenEphys.ProbeInterface.NET/ProbeGroup.cs @@ -75,6 +75,7 @@ protected ProbeGroup(ProbeGroup probeGroup) /// /// Gets the number of contacts across all objects. /// + [JsonIgnore] public int NumberOfContacts => Probes.Aggregate(0, (total, next) => total + next.NumberOfContacts); ///