|
using System;
using System.ComponentModel.Composition;
using Independent_Module.Models;
namespace Independent_Module.Services
{
/// <summary>
/// Dummy data service class. Provides a dummy data model.
/// Replace with your real data model and/or data service proxy.
/// </summary>
[Export(typeof(IDataService))] // Export the DataService concrete type. By default, this will be a singleton (shared).
public class DataService : IDataService
{
private DataItems model;
public DataItems GetModel()
{
if (model == null)
{
model = new DataItems();
// Dummy Data.
model.Add(new DataItem() { Id = "1", Name = "Item 1", Description = "Description 1" });
model.Add(new DataItem() { Id = "2", Name = "Item 2", Description = "Description 2" });
model.Add(new DataItem() { Id = "3", Name = "Item 3", Description = "Description 3" });
model.Add(new DataItem() { Id = "4", Name = "Item 4", Description = "Description 4" });
}
return model;
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.