Skip to content

Instantly share code, notes, and snippets.

@KevM
Created January 30, 2015 15:19
Show Gist options
  • Select an option

  • Save KevM/470652ff29864adfe13e to your computer and use it in GitHub Desktop.

Select an option

Save KevM/470652ff29864adfe13e to your computer and use it in GitHub Desktop.
FubuMVC modify chain attribute example
[AttributeUsage(AttributeTargets.Method)]
public class OutputXml : ModifyChainAttribute
{
public override void Alter(ActionCall call)
{
call.ParentChain().AlterConnegOutput(c =>
{
c.ClearAll();
c.AddFormatter<XmlFormatter>();
});
}
}
[OutputXml]
public UploadResultModel post_file_upload(FileUploadPostRequest request)
{
// action goes here
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment