Example #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     using (var locator = new WcfServiceLocator())
     {
         var service = locator.GetService <IBackCompatibleService>();
         Response.Write(service.GetCompatibleResult().Value);
     }
 }
Example #2
0
        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);
        }
Example #3
0
 public BackCompatibleResultV2 GetCompatibleResult()
 {
     return(_locator.GetService <IBackCompatibleService>().GetCompatibleResult());
 }
Example #4
0
 public DataTable Select(Criteria criteria)
 {
     return(_locator.GetService <IQueryService>().Select(criteria.ToSerializableCriteria()));
 }
 public BackIncompatibleResultV2 GetIncompatibleResult()
 {
     return(_locator.GetService <IBackIncompatibleServiceV2>().GetIncompatibleResultV2());
 }
Example #6
0
 public byte[] GetCache(string key)
 {
     return(_locator.GetService <ICachingService>().GetCache(key));
 }
Example #7
0
 public void WriteLog(string message)
 {
     _locator.GetService <ILoggingService>().WriteLog(message);
 }