Skip to content

Commit f9854f2

Browse files
authored
Added getter for InputObjectDataView's Data value (dotnet#5378)
1 parent 4bd6f19 commit f9854f2

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

docs/samples/Microsoft.ML.Samples/Dynamic/SimpleDataViewImplementation.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,13 @@ public InputObject(bool label, string text)
146146
private sealed class InputObjectDataView : IDataView
147147
{
148148
private readonly IEnumerable<InputObject> _data;
149+
public IEnumerable<InputObject> Data
150+
{
151+
get
152+
{
153+
return _data;
154+
}
155+
}
149156
public DataViewSchema Schema { get; }
150157
public bool CanShuffle => false;
151158

@@ -249,7 +256,7 @@ public Cursor(InputObjectDataView parent, bool wantsLabel,
249256
{
250257
Schema = parent.Schema;
251258
_position = -1;
252-
_enumerator = parent._data.GetEnumerator();
259+
_enumerator = parent.Data.GetEnumerator();
253260
_getters = new Delegate[]
254261
{
255262
wantsLabel ?

0 commit comments

Comments
 (0)