CreateServiceFor() public method

public CreateServiceFor ( BankDataAccessor accessor ) : BLZServicePortTypeClient
accessor BankDataAccessor
return BLZServicePortTypeClient
コード例 #1
0
ファイル: Program.cs プロジェクト: Lysander/snippets
 public thomasbayer.com.blz.details GetBankByBankleitzahl(string blz)
 {
     var serviceFactory = new BLZServiceFactory ();
     var client = serviceFactory.CreateServiceFor (this);
     try {
         return client.getBank (blz);
     } catch (System.Web.Services.Protocols.SoapException ex) {
         throw new InvalidOperationException ("Der Webservice hat einen Fehler gemeldet!", ex);
     }
 }
コード例 #2
0
        public thomasbayer.com.blz.details GetBankByBankleitzahl(string blz)
        {
            var serviceFactory = new BLZServiceFactory();
            var client         = serviceFactory.CreateServiceFor(this);

            try {
                return(client.getBank(blz));
            } catch (System.Web.Services.Protocols.SoapException ex) {
                throw new InvalidOperationException("Der Webservice hat einen Fehler gemeldet!", ex);
            }
        }