Skip to content

Instantly share code, notes, and snippets.

@mattuu
Created March 7, 2018 15:22
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattuu/11b0c23e0d8a24bb767d628726ea765f to your computer and use it in GitHub Desktop.
Save mattuu/11b0c23e0d8a24bb767d628726ea765f to your computer and use it in GitHub Desktop.
public class ApiControllerCustomization : ICustomization
{
public void Customize(IFixture fixture)
{
fixture.Register<ICompositeMetadataDetailsProvider>(() => new CustomCompositeMetadataDetailsProvider());
fixture.Inject(new ViewDataDictionary(fixture.Create<DefaultModelMetadataProvider>(), fixture.Create<ModelStateDictionary>()));
}
private class CustomCompositeMetadataDetailsProvider : ICompositeMetadataDetailsProvider
{
public void CreateBindingMetadata(BindingMetadataProviderContext context)
{
throw new System.NotImplementedException();
}
public void CreateDisplayMetadata(DisplayMetadataProviderContext context)
{
throw new System.NotImplementedException();
}
public void CreateValidationMetadata(ValidationMetadataProviderContext context)
{
throw new System.NotImplementedException();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment