Mini Kabibi Habibi
using System;
using System.Collections.Generic;
using System.ServiceModel.Activation;
using DevExpress.RealtorWorld.Xpf.Model;
using System.IO;
namespace DevExpress.RealtorWorld.DataService {
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class RealtorWorldDataService : IRealtorWorldDataService {
public IList<Home> GetHomes() { return HomesData.Current.DataSource; }
public IList<Agent> GetAgents() { return AgentsSourceData.Current.DataSource; }
public IList<Home> GetAgentHomes(int agentID) { return HomesData.GetAgentHomes(agentID); }
public IList<AgentStatisticData> GetAgentStatistic(int agentID) { return AgentStatisticsData.GetAgentStatistic(agentID); }
public IList<MortgageRate> GetMortgageRates() { return MortgageRatesData.Current.DataSource; }
public IList<HomePhoto> GetPhotos(int homeID) { return HomePhotosData.Current.GetPhotos(homeID); }
public byte[] GetLayout(int homeID) { return LayoutsData.GetLayout(homeID); }
public Agent GetHomeAgent(int homeID) { return AgentsSourceData.GetHomeAgent(homeID); }
public IList<StaticticPoint> GetPopularityRating(int homeID) { return HomeStatisticsData.GetPopularityRating(homeID); }
public IList<StaticticPoint> GetPrices(int homeID) { return HomeStatisticsData.GetPrices(homeID); }
public IList<SimilarHousesStatisticData> GetSimilarHouses(int homeID) { return HomeStatisticsData.GetSimilarHouses(homeID); }
#region GetPlugins
public IList<byte[]> GetPlugins() {
List<byte[]> plugins = new List<byte[]>();
try {
foreach(string file in Directory.GetFiles(Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments), "DevExpress.RealtorWorld.Xpf.Plugins.*.dll"))
plugins.Add(File.ReadAllBytes(file));
} catch { }
return plugins;
}
#endregion
}
}