using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using InvExplorer.ServiceReference1;

namespace InvExplorer
{
    public static class WebServiceClient
    {
        /// <summary>
        /// Gets a service client that will work on localhost and after deployment.
        /// see http://forums.silverlight.net/forums/t/19021.aspx
        /// </summary>
        public static Service1Client GetServiceClient()
        {
            var uri = new Uri(Application.Current.Host.Source, "../Service1.svc");
            return new Service1Client("CustomBinding_Service1", uri.AbsolutePath);
        }
    }
}
