Skip to content

Instantly share code, notes, and snippets.

@dkarzon
Created May 29, 2012 00:43
Show Gist options
  • Save dkarzon/2821914 to your computer and use it in GitHub Desktop.
Save dkarzon/2821914 to your computer and use it in GitHub Desktop.
DataGen
public interface IValueProvider
{
object GetValue();
}
public interface IProviderSelector
{
IValueProvider GetProvider(System.Reflection.PropertyInfo prop, List<IValueProvider> providers);
}
public class DataGen
{
public List<IValueProvider> AvailableProviders { get; set; }
public IProviderSelector ProviderSelector { get; set; }
public T GenerateData<T>()
{
//for each property in T
//get the ValueProvider
//Call GetValue()
throw new NotImplementedException();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment