Skip to content

Instantly share code, notes, and snippets.

@msbukkuri
Created January 22, 2012 05:47
Show Gist options
  • Save msbukkuri/1655808 to your computer and use it in GitHub Desktop.
Save msbukkuri/1655808 to your computer and use it in GitHub Desktop.
SystemMonitoring Objects
public class Alert
{
public String Id { get; set; }
public int Priority { get; set; }
public String Message { get; set; }
}
public class Client
{
public string Id { get; set; }
public string Name { get; set; }
public List<Alert> Alerts { get; set; }
}
public class ClientRepository : IRepository
{
private readonly IList<Client> _clientList = new List<Client>();
public ClientRepository()
{
_clientList.Add(new Client()
{
Alerts = new List<Alert>()
{
new Alert()
{
Id = Guid.NewGuid().ToString(),
Message = "This is Alert1",
Priority = 1
},
new Alert()
{
Id = Guid.NewGuid().ToString(),
Message = "This is Alert2",
Priority = 2
},
new Alert()
{
Id = Guid.NewGuid().ToString(),
Message = "This is Alert3",
Priority = 3
}
},
Id = Guid.NewGuid().ToString(),
Name = "7-11"
});
_clientList.Add(new Client()
{
Alerts = new List<Alert>()
{
new Alert()
{
Id = Guid.NewGuid().ToString(),
Message = "This is Alert1",
Priority = 1
},
new Alert()
{
Id = Guid.NewGuid().ToString(),
Message = "This is Alert2",
Priority = 2
},
new Alert()
{
Id = Guid.NewGuid().ToString(),
Message = "This is Alert3",
Priority = 3
}
},
Id = Guid.NewGuid().ToString(),
Name = "Barnes & Noble"
});
_clientList.Add(new Client()
{
Alerts = new List<Alert>()
{
new Alert()
{
Id = Guid.NewGuid().ToString(),
Message = "This is Alert1",
Priority = 1
},
new Alert()
{
Id = Guid.NewGuid().ToString(),
Message = "This is Alert2",
Priority = 2
},
new Alert()
{
Id = Guid.NewGuid().ToString(),
Message = "This is Alert3",
Priority = 3
}
},
Id = Guid.NewGuid().ToString(),
Name = "Steinmart"
});
}
public IEnumerable<Client> GetAll()
{
return _clientList;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment