/// <summary> /// Initializes a new instance of the <see cref="SampleCommandDataSource{TData}"/> class. /// </summary> public SampleCommandDataSource() { var sampleData = new SampleDataService(); var getSamples = sampleData.GetSampleCommandDataSet <TData>(); if (!getSamples.IsSuccess) { throw new SkipException(); } foreach (var sample in getSamples.Entity) { Add(sample); } }
/// <summary> /// Initializes a new instance of the <see cref="SampleEventDataSource{TData}"/> class. /// </summary> public SampleEventDataSource() { var sampleData = new SampleDataService(); var getSamples = sampleData.GetSampleEventDataSet <TData>(); if (!getSamples.IsSuccess) { throw new SkipException(getSamples.Unwrap().Message); } foreach (var sample in getSamples.Entity) { Add(sample); } }