Skip to content

Commit 828d314

Browse files
authored
Add IEnumerable<double> Samples to ISampleMonitor (#31)
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.
1 parent e8b0015 commit 828d314

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/SimSharp/Analysis/IMonitor.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#endregion
77

88
using System;
9+
using System.Collections.Generic;
910

1011
namespace SimSharp {
1112
public interface IMonitor {
@@ -34,6 +35,7 @@ public interface INumericMonitor : IMonitor {
3435

3536
public interface ISampleMonitor : INumericMonitor {
3637
void Add(double value);
38+
IEnumerable<double> Samples { get; }
3739
}
3840

3941
public interface ITimeSeriesMonitor : INumericMonitor {

0 commit comments

Comments
 (0)