using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;

namespace StocksWS
{
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [ToolboxItem(false)]
    public class Service1 : System.Web.Services.WebService
    {
        [WebMethod]
        public float GetStockPrice(string symbol)
        {
            switch (symbol)
            {
                case "MSFT": return 29.91f;
                case "AAPL": return 180.21f;
                case "YHOO": return 23.93f;
                default: return 0;
            }
        }
    }
}
