I have this situation:
public interface IHasValue<T>
{
T Value { get; set; }
}
public interface IClickable
{
void SubscribeOnClick(EventHandler click);
}
public interface ILoginView : IView
{
IHasValue<string> Username { get; }
IHasValue<string> Password { get; }
IClickable Login { get; }
IClickable Cancel { get; }
}
public partial class LoginVIew : Form, ILoginView
{
public LoginVIew()
{
InitializeComponent();
}
#region ILoginView Members
public IHasValue<string> Username
{
get { ?? }
}
public IHasValue<string> Password
{
get { ?? }
}
public IClickable Login
{
get { ?? }
}
public IClickable Cancel
{
get { ?? }
}
#endregion
}
How should I implement this? I have no idea.
Well you’ll need to implement
IHasValue<T>andIClickablein order to be able to create an implementation ofILoginView(because you need to be able to create instances of object implementing those interfaces in theILoginViewmembers.…