Exemplo n.º 1
0
 public static IEntity ToEntity(ContractBase contract)
 {
     // Do reflection to call the right method here
     string methodName = string.Format("To{0}", 
         contract.GetType().Name.Replace("Contract", ""));
     MethodInfo method = typeof(Converter).GetMethod(methodName);
     return method.Invoke(null, new object[] { contract }) as IEntity;
 }
Exemplo n.º 2
0
 public ServerTransaction(object key, TransactionType type,
     ContractBase contract)
     : base(key, type)
 {
     this.contract = contract;
 }