Rozdzia 7.
Budowanie aplikacji rozproszonych
----------------------------------------------------------
Usugi sieciowe ASP.NET  System.Web.Services
----------------------------------------------------------
Aplikacje usug sieciowych ASP.NET  podstawy
----------------------------------------------------------
<%@ WebService Language="c#" Class="Compute" %>
using System.Web.Services;
public class Compute
{
   [WebMethod]
   public int Factorial(int f)
   {
      int i;
      int result = 1;
      for (i=2; i<=f; i++)
         result = result * i;
      return result;
   }
   [WebMethod]
   public double SquareRoot(double s)
   {
      return System.Math.Sqrt(s);
   }
}

----------------------------------------------------------
Aplikacje usug sieciowych ASP.NET  zagadnienia zaawansowane
----------------------------------------------------------
[WebMethod(EnableSession=true)]
public int Factorial(int f)
{ ... }
---
[WebMethod(TransactionOption=TransactionOption.Required)]
public bool MoveMoney(int fromAccount, int toAccount, decimal amount)
{ ... }
---
[WebService(Namespace="http://www.qwickbank.com/mathinfo")]
public class Compute
{ ... }

----------------------------------------------------------
Enterprise Services  System.EnterpriseServices
----------------------------------------------------------
Co udostpniaj Enterprise Services
----------------------------------------------------------
<Transaction(TransactionOption.Required)> _
   Public Class BankAccount
      Inherits ServicedComponent
   <AutoComplete()> _
   Public Sub Deposit(Account As Integer, Amount As Decimal)
      ' Dodanie sumy Amount do konta Account
   End Sub
   <AutoComplete()> _
   Public Sub Withdrawal(Account As Integer, Amount As Decimal)
      ' Odjcie sumy Amount z konta Account
   End Sub
End Class



