Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove XML serialization properties from public API #1451

Merged
merged 1 commit into from
Jul 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Bonsai.Core/Expressions/ExternalizedDateTimeOffset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public DateTimeOffset Value
/// </summary>
[Browsable(false)]
[XmlElement(nameof(Value))]
[EditorBrowsable(EditorBrowsableState.Never)]
public string ValueXml
{
get { return property.ValueXml; }
Expand Down
1 change: 1 addition & 0 deletions Bonsai.Core/Expressions/ExternalizedTimeSpan.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public TimeSpan Value
/// </summary>
[Browsable(false)]
[XmlElement(nameof(Value))]
[EditorBrowsable(EditorBrowsableState.Never)]
public string ValueXml
{
get { return property.ValueXml; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ internal override Type PropertyType
/// </summary>
[Browsable(false)]
[XmlElement(nameof(Value))]
[EditorBrowsable(EditorBrowsableState.Never)]
public string ValueXml
{
get { return Value.ToString("o"); }
Expand Down
1 change: 1 addition & 0 deletions Bonsai.Core/Expressions/Properties/TimeSpanProperty.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ internal override Type PropertyType
/// </summary>
[Browsable(false)]
[XmlElement(nameof(Value))]
[EditorBrowsable(EditorBrowsableState.Never)]
public string ValueXml
{
get { return XmlConvert.ToString(Value); }
Expand Down
2 changes: 2 additions & 0 deletions Bonsai.Core/Expressions/ReplaySubjectBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public class ReplaySubjectBuilder : SubjectBuilder
/// </summary>
[Browsable(false)]
[XmlElement(nameof(Window))]
[EditorBrowsable(EditorBrowsableState.Never)]
public string WindowXml
{
get
Expand Down Expand Up @@ -113,6 +114,7 @@ public class ReplaySubjectBuilder<T> : SubjectBuilder<T>
/// </summary>
[Browsable(false)]
[XmlElement(nameof(Window))]
[EditorBrowsable(EditorBrowsableState.Never)]
public string WindowXml
{
get
Expand Down
2 changes: 2 additions & 0 deletions Bonsai.Core/Reactive/BufferTime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public class BufferTime
/// </summary>
[Browsable(false)]
[XmlElement(nameof(TimeSpan))]
[EditorBrowsable(EditorBrowsableState.Never)]
public string TimeSpanXml
{
get { return XmlConvert.ToString(TimeSpan); }
Expand All @@ -51,6 +52,7 @@ public string TimeSpanXml
/// </summary>
[Browsable(false)]
[XmlElement(nameof(TimeShift))]
[EditorBrowsable(EditorBrowsableState.Never)]
public string TimeShiftXml
{
get
Expand Down
1 change: 1 addition & 0 deletions Bonsai.Core/Reactive/BufferTrigger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public class BufferTrigger
/// </summary>
[Browsable(false)]
[XmlElement(nameof(TimeSpan))]
[EditorBrowsable(EditorBrowsableState.Never)]
public string TimeSpanXml
{
get
Expand Down
1 change: 1 addition & 0 deletions Bonsai.Core/Reactive/Concurrency/SchedulerMapping.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public SchedulerMapping(IScheduler scheduler)
/// </summary>
[XmlText]
[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
public string InstanceXml
{
get
Expand Down
1 change: 1 addition & 0 deletions Bonsai.Core/Reactive/Delay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public class Delay : Combinator
/// </summary>
[Browsable(false)]
[XmlElement(nameof(DueTime))]
[EditorBrowsable(EditorBrowsableState.Never)]
public string DueTimeXml
{
get { return XmlConvert.ToString(DueTime); }
Expand Down
1 change: 1 addition & 0 deletions Bonsai.Core/Reactive/DelaySubscription.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public class DelaySubscription : Combinator
/// </summary>
[Browsable(false)]
[XmlElement(nameof(DueTime))]
[EditorBrowsable(EditorBrowsableState.Never)]
public string DueTimeXml
{
get { return XmlConvert.ToString(DueTime); }
Expand Down
1 change: 1 addition & 0 deletions Bonsai.Core/Reactive/Gate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public class Gate
/// </summary>
[Browsable(false)]
[XmlElement(nameof(DueTime))]
[EditorBrowsable(EditorBrowsableState.Never)]
public string DueTimeXml
{
get
Expand Down
2 changes: 2 additions & 0 deletions Bonsai.Core/Reactive/GateInterval.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public class GateInterval : Combinator
/// </summary>
[Browsable(false)]
[XmlElement(nameof(Interval))]
[EditorBrowsable(EditorBrowsableState.Never)]
public string IntervalXml
{
get { return XmlConvert.ToString(Interval); }
Expand All @@ -52,6 +53,7 @@ public string IntervalXml
/// </summary>
[Browsable(false)]
[XmlElement(nameof(DueTime))]
[EditorBrowsable(EditorBrowsableState.Never)]
public string DueTimeXml
{
get
Expand Down
1 change: 1 addition & 0 deletions Bonsai.Core/Reactive/Replay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public Replay(ExpressionBuilderGraph workflow)
/// </summary>
[Browsable(false)]
[XmlElement(nameof(Window))]
[EditorBrowsable(EditorBrowsableState.Never)]
public string WindowXml
{
get
Expand Down
1 change: 1 addition & 0 deletions Bonsai.Core/Reactive/SampleInterval.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public class SampleInterval : Combinator
/// </summary>
[Browsable(false)]
[XmlElement(nameof(Interval))]
[EditorBrowsable(EditorBrowsableState.Never)]
public string IntervalXml
{
get { return XmlConvert.ToString(Interval); }
Expand Down
2 changes: 2 additions & 0 deletions Bonsai.Core/Reactive/Subjects/ReplaySubject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public class ReplaySubject : SubjectBuilder
/// </summary>
[Browsable(false)]
[XmlElement(nameof(Window))]
[EditorBrowsable(EditorBrowsableState.Never)]
public string WindowXml
{
get
Expand Down Expand Up @@ -104,6 +105,7 @@ public class ReplaySubject<T> : SubjectBuilder<T>
/// </summary>
[Browsable(false)]
[XmlElement(nameof(Window))]
[EditorBrowsable(EditorBrowsableState.Never)]
public string WindowXml
{
get
Expand Down
1 change: 1 addition & 0 deletions Bonsai.Core/Reactive/Throttle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public class Throttle : Combinator
/// </summary>
[Browsable(false)]
[XmlElement(nameof(DueTime))]
[EditorBrowsable(EditorBrowsableState.Never)]
public string DueTimeXml
{
get { return XmlConvert.ToString(DueTime); }
Expand Down
1 change: 1 addition & 0 deletions Bonsai.Core/Reactive/TimedGate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public class TimedGate
/// </summary>
[Browsable(false)]
[XmlElement(nameof(TimeSpan))]
[EditorBrowsable(EditorBrowsableState.Never)]
public string TimeSpanXml
{
get { return XmlConvert.ToString(TimeSpan); }
Expand Down
1 change: 1 addition & 0 deletions Bonsai.Core/Reactive/Timeout.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public class Timeout : Combinator
/// </summary>
[Browsable(false)]
[XmlElement(nameof(DueTime))]
[EditorBrowsable(EditorBrowsableState.Never)]
public string DueTimeXml
{
get { return XmlConvert.ToString(DueTime); }
Expand Down
2 changes: 2 additions & 0 deletions Bonsai.Core/Reactive/Timer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public class Timer : Source<long>
/// </summary>
[Browsable(false)]
[XmlElement(nameof(DueTime))]
[EditorBrowsable(EditorBrowsableState.Never)]
public string DueTimeXml
{
get { return XmlConvert.ToString(DueTime); }
Expand All @@ -49,6 +50,7 @@ public string DueTimeXml
/// </summary>
[Browsable(false)]
[XmlElement(nameof(Period))]
[EditorBrowsable(EditorBrowsableState.Never)]
public string PeriodXml
{
get { return XmlConvert.ToString(Period); }
Expand Down
2 changes: 2 additions & 0 deletions Bonsai.Core/Reactive/WindowTime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public class WindowTime : WindowCombinator
/// </summary>
[Browsable(false)]
[XmlElement(nameof(TimeSpan))]
[EditorBrowsable(EditorBrowsableState.Never)]
public string TimeSpanXml
{
get { return XmlConvert.ToString(TimeSpan); }
Expand All @@ -49,6 +50,7 @@ public string TimeSpanXml
/// </summary>
[Browsable(false)]
[XmlElement(nameof(TimeShift))]
[EditorBrowsable(EditorBrowsableState.Never)]
public string TimeShiftXml
{
get
Expand Down
1 change: 1 addition & 0 deletions Bonsai.Core/Reactive/WindowTrigger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public class WindowTrigger
/// </summary>
[Browsable(false)]
[XmlElement(nameof(TimeSpan))]
[EditorBrowsable(EditorBrowsableState.Never)]
public string TimeSpanXml
{
get
Expand Down
1 change: 1 addition & 0 deletions Bonsai.Dsp/FirFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public class FirFilter : Transform<Mat, Mat>
/// </summary>
[Browsable(false)]
[XmlElement(nameof(Kernel))]
[EditorBrowsable(EditorBrowsableState.Never)]
public string KernelXml
{
get { return ArrayConvert.ToString(Kernel, CultureInfo.InvariantCulture); }
Expand Down
2 changes: 2 additions & 0 deletions Bonsai.Dsp/IirFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public class IirFilter : Transform<Mat, Mat>
/// </summary>
[Browsable(false)]
[XmlElement(nameof(FeedforwardCoefficients))]
[EditorBrowsable(EditorBrowsableState.Never)]
public string FeedforwardCoefficientsXml
{
get { return ArrayConvert.ToString(FeedforwardCoefficients, CultureInfo.InvariantCulture); }
Expand All @@ -49,6 +50,7 @@ public string FeedforwardCoefficientsXml
/// </summary>
[Browsable(false)]
[XmlElement(nameof(FeedbackCoefficients))]
[EditorBrowsable(EditorBrowsableState.Never)]
public string FeedbackCoefficientsXml
{
get { return ArrayConvert.ToString(FeedbackCoefficients, CultureInfo.InvariantCulture); }
Expand Down
1 change: 1 addition & 0 deletions Bonsai.Shaders/Delay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public class Delay : Combinator
/// </summary>
[Browsable(false)]
[XmlElement(nameof(DueTime))]
[EditorBrowsable(EditorBrowsableState.Never)]
public string DueTimeXml
{
get { return XmlConvert.ToString(DueTime); }
Expand Down
1 change: 1 addition & 0 deletions Bonsai.Shaders/DelaySubscription.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public class DelaySubscription : Combinator
/// </summary>
[Browsable(false)]
[XmlElement(nameof(DueTime))]
[EditorBrowsable(EditorBrowsableState.Never)]
public string DueTimeXml
{
get { return XmlConvert.ToString(DueTime); }
Expand Down
2 changes: 2 additions & 0 deletions Bonsai.Shaders/Timer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public class Timer : Source<long>
/// </summary>
[Browsable(false)]
[XmlElement(nameof(DueTime))]
[EditorBrowsable(EditorBrowsableState.Never)]
public string DueTimeXml
{
get { return XmlConvert.ToString(DueTime); }
Expand All @@ -51,6 +52,7 @@ public string DueTimeXml
/// </summary>
[Browsable(false)]
[XmlElement(nameof(Period))]
[EditorBrowsable(EditorBrowsableState.Never)]
public string PeriodXml
{
get { return Period.HasValue ? XmlConvert.ToString(Period.Value) : null; }
Expand Down
1 change: 1 addition & 0 deletions Bonsai.Vision/Drawing/AddTextBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ internal AddTextBase()
/// </summary>
[Browsable(false)]
[XmlElement(nameof(Font))]
[EditorBrowsable(EditorBrowsableState.Never)]
public string FontXml
{
get
Expand Down
1 change: 1 addition & 0 deletions Bonsai.Vision/Drawing/CreateFont.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public Font Font
/// </summary>
[Browsable(false)]
[XmlElement(nameof(Font))]
[EditorBrowsable(EditorBrowsableState.Never)]
public string FontXml
{
get
Expand Down
1 change: 1 addition & 0 deletions Bonsai.Vision/Filter2D.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public class Filter2D : Transform<IplImage, IplImage>
/// </summary>
[Browsable(false)]
[XmlElement(nameof(Kernel))]
[EditorBrowsable(EditorBrowsableState.Never)]
public string KernelXml
{
get { return ArrayConvert.ToString(Kernel, CultureInfo.InvariantCulture); }
Expand Down
3 changes: 2 additions & 1 deletion Bonsai.Vision/WarpAffine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@ public class WarpAffine : Transform<IplImage, IplImage>
/// </summary>
[Browsable(false)]
[XmlElement(nameof(Transform))]
[EditorBrowsable(EditorBrowsableState.Never)]
public string TransformXml
{
get
{
var transform = (Mat)Transform;
var transform = Transform;
if (transform == null) return null;

var array = new float[transform.Rows, transform.Cols];
Expand Down