Skip to content

Instantly share code, notes, and snippets.

@codereflection
Created December 6, 2012 06:55
Show Gist options
  • Save codereflection/4222309 to your computer and use it in GitHub Desktop.
Save codereflection/4222309 to your computer and use it in GitHub Desktop.
Fake out that ToList!
dynamic cutRuleParameters = new ExpandoObject();
cutRuleParameters.ToList = (Func<List<CutRuleParameterViewModel>>)(() =>
new List<CutRuleParameterViewModel> {
new CutRuleParameterViewModel { ParamId = 77, IsDynamic = 'Y' , UIParamCode = "MedianRounding", ParamName = "MedianRounding" , ParamValue = "5000", ParamCode = "MedianRounding" },
new CutRuleParameterViewModel { ParamId = 78, ParamName = "Rounding Direction", IsDynamic = 'Y' , UIParamCode = "RoundDirection", ParamCode = "RoundingDir" }
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment