private void CreatePerformerAndDoWork(IRequest request) { IServicePerformer performer = null; RequestPerformerLocator requestPerformerLocator = RequestReceiver.NorthwindAdapter.RequestPerformerLocator; switch (_requestContext.SdataUri.ServiceMethod.ToLowerInvariant()) { case "computeprice": performer = requestPerformerLocator.Resolve <ComputePriceServicePerformer>(_requestContext); break; } if (null != performer) { performer.DoWork(request); } else { throw new RequestException(string.Format("Invalid request: No service named {0} supported.", _requestContext.SdataUri.ServiceMethod)); } }
public NorthwindAdapter() { StoreLocator = new StoreLocator(); RequestPerformerLocator = new RequestPerformerLocator(); }
public NorthwindAdapter() { StoreLocator = new StoreLocator(); RequestPerformerLocator = new RequestPerformerLocator(); }