using System;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Activation;
using System.ServiceModel.Web;
using System.Web;

namespace ApplicationServicesDemo
{
    [ServiceContract(Namespace = "http://ajaxbooksamples.com")]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    public class OrderProcessing
    {
        // Add [WebGet] attribute to use HTTP GET
        [OperationContract]
        public string Test()
        {
            string result;
            if (HttpContext.Current.User.IsInRole("Manager"))
            {
                result = "in role";
            }
            else
            {
                result = "not in role";
            }
            // Add your operation implementation here
            return result;
        }

        // Add more operations here and mark them with [OperationContract]
    }
}
