laughingblade
10/23/2013 - 1:19 PM

Example service classes consuming Simple Proxy

Example service classes consuming Simple Proxy

using System.Xml.Linq;

namespace LeeSoft.TestUtils.SimpleProxy
{
    public interface IService
    {
        XDocument GetData();
    }
}
using System.Xml.Linq;

namespace LeeSoft.TestUtils.SimpleProxy
{
    public class ConcreteService: IService
    {
        protected IServiceProxy ServiceProxy;

        public ConcreteService(IServiceProxy serviceProxy)
        {
            ServiceProxy = serviceProxy;
        }

        public XDocument GetData()
        {
            return ServiceProxy.Load();
        }
    }
}