@@ -87,10 +87,10 @@ public static Func<Double, Double, Double> GetErrorFunction(ErrorFunction errorF
87
87
public class SsaAnomalyDetectionBaseWrapper : IStatefulTransformer , ICanSaveModel
88
88
{
89
89
/// <summary>
90
- /// Whether a call to <see cref="GetRowToRowMapper(DataViewSchema)"/> should succeed, on an
90
+ /// Whether a call to <see cref="ITransformer. GetRowToRowMapper(DataViewSchema)"/> should succeed, on an
91
91
/// appropriate schema.
92
92
/// </summary>
93
- public bool IsRowToRowMapper => InternalTransform . IsRowToRowMapper ;
93
+ bool ITransformer . IsRowToRowMapper => ( ( ITransformer ) InternalTransform ) . IsRowToRowMapper ;
94
94
95
95
/// <summary>
96
96
/// Creates a clone of the transfomer. Used for taking the snapshot of the state.
@@ -105,20 +105,22 @@ public class SsaAnomalyDetectionBaseWrapper : IStatefulTransformer, ICanSaveMode
105
105
public DataViewSchema GetOutputSchema ( DataViewSchema inputSchema ) => InternalTransform . GetOutputSchema ( inputSchema ) ;
106
106
107
107
/// <summary>
108
- /// Constructs a row-to-row mapper based on an input schema. If <see cref="IsRowToRowMapper"/>
108
+ /// Constructs a row-to-row mapper based on an input schema. If <see cref="ITransformer. IsRowToRowMapper"/>
109
109
/// is <c>false</c>, then an exception should be thrown. If the input schema is in any way
110
110
/// unsuitable for constructing the mapper, an exception should likewise be thrown.
111
111
/// </summary>
112
112
/// <param name="inputSchema">The input schema for which we should get the mapper.</param>
113
113
/// <returns>The row to row mapper.</returns>
114
- public IRowToRowMapper GetRowToRowMapper ( DataViewSchema inputSchema ) => InternalTransform . GetRowToRowMapper ( inputSchema ) ;
114
+ IRowToRowMapper ITransformer . GetRowToRowMapper ( DataViewSchema inputSchema )
115
+ => ( ( ITransformer ) InternalTransform ) . GetRowToRowMapper ( inputSchema ) ;
115
116
116
117
/// <summary>
117
118
/// Same as <see cref="ITransformer.GetRowToRowMapper(DataViewSchema)"/> but also supports mechanism to save the state.
118
119
/// </summary>
119
120
/// <param name="inputSchema">The input schema for which we should get the mapper.</param>
120
121
/// <returns>The row to row mapper.</returns>
121
- public IRowToRowMapper GetStatefulRowToRowMapper ( DataViewSchema inputSchema ) => ( ( IStatefulTransformer ) InternalTransform ) . GetStatefulRowToRowMapper ( inputSchema ) ;
122
+ public IRowToRowMapper GetStatefulRowToRowMapper ( DataViewSchema inputSchema )
123
+ => ( ( IStatefulTransformer ) InternalTransform ) . GetStatefulRowToRowMapper ( inputSchema ) ;
122
124
123
125
/// <summary>
124
126
/// Take the data in, make transformations, output the data.
@@ -129,7 +131,9 @@ public class SsaAnomalyDetectionBaseWrapper : IStatefulTransformer, ICanSaveMode
129
131
/// <summary>
130
132
/// For saving a model into a repository.
131
133
/// </summary>
132
- public virtual void Save ( ModelSaveContext ctx ) => InternalTransform . SaveThis ( ctx ) ;
134
+ void ICanSaveModel . Save ( ModelSaveContext ctx ) => SaveModel ( ctx ) ;
135
+
136
+ private protected virtual void SaveModel ( ModelSaveContext ctx ) => InternalTransform . SaveThis ( ctx ) ;
133
137
134
138
/// <summary>
135
139
/// Creates a row mapper from Schema.
@@ -255,7 +259,7 @@ public override DataViewSchema GetOutputSchema(DataViewSchema inputSchema)
255
259
256
260
private protected override void SaveModel ( ModelSaveContext ctx )
257
261
{
258
- Parent . Save ( ctx ) ;
262
+ ( ( ICanSaveModel ) Parent ) . Save ( ctx ) ;
259
263
}
260
264
261
265
internal void SaveThis ( ModelSaveContext ctx )
0 commit comments