Skip to content

Commit

Permalink
Add IEnumerable<double> Samples to ISampleMonitor (#31)
Browse files Browse the repository at this point in the history
The field `IEnumerable<double> Samples` is already present on
`SampleMonitor`, but it's missing from `ISampleMonitor`, which requires
a (potentially dangerous) cast.

To make the cast unnecessary, add it to the interface.
  • Loading branch information
MattKotsenas committed Apr 30, 2020
1 parent e8b0015 commit 828d314
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/SimSharp/Analysis/IMonitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#endregion

using System;
using System.Collections.Generic;

namespace SimSharp {
public interface IMonitor {
Expand Down Expand Up @@ -34,6 +35,7 @@ public interface INumericMonitor : IMonitor {

public interface ISampleMonitor : INumericMonitor {
void Add(double value);
IEnumerable<double> Samples { get; }
}

public interface ITimeSeriesMonitor : INumericMonitor {
Expand Down

0 comments on commit 828d314

Please sign in to comment.