예제 #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);
     }
 }
예제 #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);
        }
예제 #3
0
 public BackCompatibleResultV2 GetCompatibleResult()
 {
     return(_locator.GetService <IBackCompatibleService>().GetCompatibleResult());
 }
예제 #4
0
 public DataTable Select(Criteria criteria)
 {
     return(_locator.GetService <IQueryService>().Select(criteria.ToSerializableCriteria()));
 }
예제 #5
0
 public BackIncompatibleResultV2 GetIncompatibleResult()
 {
     return(_locator.GetService <IBackIncompatibleServiceV2>().GetIncompatibleResultV2());
 }
예제 #6
0
 public byte[] GetCache(string key)
 {
     return(_locator.GetService <ICachingService>().GetCache(key));
 }
예제 #7
0
 public void WriteLog(string message)
 {
     _locator.GetService <ILoggingService>().WriteLog(message);
 }