Building upon the previous example we can also show the total number of facilities and meters contained within each data source.
// display the data source names foreach (ManagingEnergy.Data.DataSource source in dataSources) Console.WriteLine("{0} has {1} facilities and {2} meters.",source.UserFriendlyName, source.GetFacilityCount(api), source.GetMeterCount(api));
// OUTPUT Auma has 4031 facilities and 4805 meters. Development has 5 facilities and 11 meters. Greenwin has 52 facilities and 131 meters. Internal has 677 facilities and 1367 meters. Niagara Health has 8 facilities and 37 meters. Profac has 124 facilities and 332 meters. Prospects has 4 facilities and 7 meters. Springfield has 6 facilities and 4 meters. Template has 9 facilities and 32 meters. THESI has 13 facilities and 37 meters. |