protected void Page_Load(object sender, EventArgs e) { using (var locator = new WcfServiceLocator()) { var service = locator.GetService <IBackCompatibleService>(); Response.Write(service.GetCompatibleResult().Value); } }
public object AfterReceiveRequest(ref System.ServiceModel.Channels.Message request, System.ServiceModel.IClientChannel channel, System.ServiceModel.InstanceContext instanceContext) { if (!request.Headers.Action.EndsWith("/ILoggingService/WriteLog")) { using (var locator = new WcfServiceLocator()) { var logging = locator.GetService <ILoggingService>(); logging.WriteLog(string.Format("Action: {0}, To: {1}", request.Headers.Action, request.Headers.To)); } } return(null); }
public BackCompatibleResultV2 GetCompatibleResult() { return(_locator.GetService <IBackCompatibleService>().GetCompatibleResult()); }
public DataTable Select(Criteria criteria) { return(_locator.GetService <IQueryService>().Select(criteria.ToSerializableCriteria())); }
public BackIncompatibleResultV2 GetIncompatibleResult() { return(_locator.GetService <IBackIncompatibleServiceV2>().GetIncompatibleResultV2()); }
public byte[] GetCache(string key) { return(_locator.GetService <ICachingService>().GetCache(key)); }
public void WriteLog(string message) { _locator.GetService <ILoggingService>().WriteLog(message); }