コード例 #1
0
        //ServiceFactory factory = ServiceFactory.GetInstance();

        public void StoreNewBusinessClient(BusinessClient bc)
        {
            try
            {
                IBusinessClient bcSvc = (IBusinessClient)GetService(typeof(IBusinessClient).Name);
                bcSvc.StoreBusinessClient(bc);
            }
            catch (InterfaceNotFoundException)
            {
                throw new Exception("Submission failed. Try again.");
            }
        }
コード例 #2
0
 public void DeleteBusinessClient(BusinessClient bc)
 {
     try
     {
         IBusinessClient bcSvc = (IBusinessClient)GetService(typeof(IBusinessClient).Name);
         bcSvc.DeleteBusinessClient(bc);
     }
     catch (InterfaceNotFoundException)
     {
         throw new Exception("Delete failed. Try again");
     }
 }
コード例 #3
0
        public BusinessClient RetrieveBusinessClient(BusinessClient bc)
        {
            try
            {
                IBusinessClient bcSvc = (IBusinessClient)GetService(typeof(IBusinessClient).Name);
                BusinessClient  getBc = bcSvc.GetBusinessClient(bc);
                bc = getBc;
            }
            catch (ImplementationNotFoundException)
            {
                throw new Exception("Submission failed. Try again.");
            }

            return(bc);
        }
コード例 #4
0
        public void GetBusinessClientTest()
        {
            BusinessClient bc = new BusinessClient();

            bc.CompanyName    = "Google";
            bc.PointOfContact = "John Doe";
            bc.Address1       = "2342 Google Dr.";
            bc.Address2       = "Suite 2013";
            bc.City           = "Mountain View";
            bc.State          = "CA";
            bc.Zip            = "93445";
            bc.Phone          = "312-222-3244";
            bc.Email          = "*****@*****.**";

            IBusinessClient iBC = new BusinessClientImpl();

            iBC.GetBusinessClient(bc);
            IBusinessClient actualBC = iBC;

            Assert.AreEqual(iBC, actualBC);
        }
コード例 #5
0
 public RemoteController()
 {
     _peopleClient = ServiceProxy.Create <IBusinessClient>(BusinessService.Uri);
 }
コード例 #6
0
ファイル: BusinessController.cs プロジェクト: mumby0168/VMS
 public BusinessController(IDispatcher dispatcher, IBusinessClient client, HttpClientOptions options, IVmsLogger <GatewayControllerBase> logger) : base(dispatcher, options, logger)
 {
     _client = client;
 }