User-748049670 posted
Hi, I have an Interface
public interface IAppDomainFactory
{
/// <summary>
///
/// </summary>
/// <returns></returns>
DesktopApp GetDesktopDomain();
/// <summary>
///
/// </summary>
/// <returns></returns>
WebApp GetWebDomain();
}
I have two classes :
DesktopDomainFactory implement IAppDomainFactory and is use as DeskTop
public class DesktopDomainFactory<T> : IAppDomainFactory where T : DesktopApp, new()
{
public T _domain { get; set; }
public DesktopDomainFactory()
{
_domain = new T();
}
public DesktopApp GetDesktopDomain()
{
return DeskTopService.GetDomain();
}
public WebApp GetWebDomain()
{
throw new NotImplementedException();
}
}
WebDomainFactoryimplement IAppDomainFactory and is use as Web
public class WebDomainFactory<T> : IAppDomainFactory where T : WebApp, new()
{
public T _domain { get; set; }
public WebDomainFactory()
{
_domain = new T();
}
public DesktopApp GetDesktopDomain()
{
throw new NotImplementedException();
}
public WebApp GetWebDomain()
{
return WebAppService.GetDomain();
}
}
So I would like DesktopDomainFactory to implement only GetDesktopDomain and WebDomainFactory to implement only GetWebDomain.
So this functions must be removed from my classes
public DesktopApp GetDesktopDomain()
{
throw new NotImplementedException();
}
public WebApp GetWebDomain()
{
throw new NotImplementedException();
}
Best Regards