Created
August 21, 2015 12:28
-
-
Save straubt1/de868ca8d842bd6147da to your computer and use it in GitHub Desktop.
AOPinIoC_ProjectDataLocal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ProjectDataLocal : IProjectData | |
{ | |
private List<ProjectItem> _masterList; | |
public ProjectDataLocal() | |
{ | |
_masterList = new List<ProjectItem> | |
{ | |
new ProjectItem { Id = Guid.Parse("5843b73d-45f7-4284-86cf-c2f07821e01d"), Name ="Item 1", ItemType = "A" }, | |
new ProjectItem { Id = Guid.Parse("9815b73d-45f7-4284-86cf-c2f07821e01d"), Name ="Item 2", ItemType = "A" }, | |
new ProjectItem { Id = Guid.Parse("2100b73d-45f7-4284-86cf-c2f07821e01d"), Name ="Item 3", ItemType = "B" }, | |
new ProjectItem { Id = Guid.Parse("8688b73d-45f7-4284-86cf-c2f07821e01d"), Name ="Item 4", ItemType = "C" } | |
}; | |
} | |
public List<ProjectItem> GetAllItems() | |
{ | |
return _masterList; | |
} | |
public ProjectItem GetItemById(Guid id) | |
{ | |
return _masterList.Single(x => x.Id == id); | |
} | |
public ProjectItem GetItemByName(string name) | |
{ | |
return _masterList.Single(x => x.Name == name); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment