示例#1
0
 internal MethodInfo this[TypeModel.CallbackType callbackType]
 {
     get
     {
         switch (callbackType)
         {
             case TypeModel.CallbackType.BeforeSerialize: return beforeSerialize;
             case TypeModel.CallbackType.AfterSerialize: return afterSerialize;
             case TypeModel.CallbackType.BeforeDeserialize: return beforeDeserialize;
             case TypeModel.CallbackType.AfterDeserialize: return afterDeserialize;
             default: throw new ArgumentException("Callback type not supported: " + callbackType.ToString(), "callbackType");
         }
     }
 }