PageRenderTime 53ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/UnitTests/DataClasses/PersonExtensionMethods.cs

http://github.com/fredericaltorres/DynamicSugarNet
C# | 27 lines | 14 code | 4 blank | 9 comment | 0 complexity | ed935c5d4dbb26e886c8fc8b1f35a41b MD5 | raw file
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace DynamicSugarSharp_UnitTests {
  6. /// <summary>
  7. ///
  8. /// </summary>
  9. public static class PersonExtensionMethods {
  10. public static string Format(this Person person, string format, params object[] args) {
  11. return DynamicSugar.ExtendedFormat.Format(person, format, args);
  12. }
  13. public static Dictionary<string,object> Dictionary(this Person person, List<string> propertiesToInclude = null) {
  14. return DynamicSugar.ReflectionHelper.GetDictionary(person, propertiesToInclude);
  15. }
  16. /*
  17. public static string RazorTemplate(this Person person, string razorTemplate) {
  18. return DynamicSugarSharp.RazorHelper.RazorTemplateForInstance(person, razorTemplate);
  19. }
  20. */
  21. }
  22. }