Skip to content

Instantly share code, notes, and snippets.

@Injac
Created December 19, 2014 14:54
Show Gist options
  • Save Injac/31c1bc591509852f28d9 to your computer and use it in GitHub Desktop.
Save Injac/31c1bc591509852f28d9 to your computer and use it in GitHub Desktop.
Sample Shredded Stuff bla
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
class Program
{
public int MyProperty { get; set; }
static void Main(string[] args)
{
Test2 bla = new Test2();
bla.RegisterView<ViewModel>(HelloWorld);
}
public static void HelloWorld(ViewModel c)
{
//Registration
}
}
public interface Test
{
void RegisterView<T>(Action<T> view);
void RegisterViewModel<T>(Action<T> viewModel);
void RegisterViewModelPair<T>(Action<T> viewModel, Action<T> view);
}
public class ViewModel
{
public string FirstName { get; set; }
}
public class Test2:Test
{
public void RegisterView<T>(Action<T> view)
{
throw new NotImplementedException();
}
public void RegisterViewModel<T>(Action<T> viewModel)
{
throw new NotImplementedException();
}
public void RegisterViewModelPair<T>(Action<T> viewModel, Action<T> view)
{
throw new NotImplementedException();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment