Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 21st, 2012  |  syntax: None  |  size: 0.39 KB  |  hits: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. using DotLiquid;
  2.  
  3. namespace Jessica.Sample.Models
  4. {
  5.     public class User : Drop
  6.     {
  7.         public int ID { get; set; }
  8.         public string Username { get; set; }
  9.  
  10.         public override object BeforeMethod(string method)
  11.         {
  12.             if (method.ToUpper() == "ID")
  13.                 return ID.ToString();
  14.             return base.BeforeMethod(method);
  15.         }
  16.     }
  17. }