Created
February 5, 2013 05:08
-
-
Save emiaj/4712305 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class InputQueryModel | |
| { | |
| public string Name { get; set; } | |
| } | |
| public class InputCommandModel : InputQueryModel | |
| { | |
| } | |
| public class Endpoint | |
| { | |
| public InputQueryModel Query(InputQueryModel input) | |
| { | |
| return new InputQueryModel(); | |
| } | |
| public AjaxContinuation Command(InputCommandModel input) | |
| { | |
| Debug.Assert(input.Name.IsEmpty()); // FAILS! | |
| return AjaxContinuation.Successful(); | |
| } | |
| } | |
| public class InputCommandModelRules : OverridesFor<InputCommandModel> | |
| { | |
| public InputCommandModelRules() | |
| { | |
| // This wont be picked up | |
| Property(x => x.Name).Required(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment