Example #1
0
 public void Reset(Object target, MethodInfo methodInfo)
 {
     if (methodInfo != null)
     {
         if (target == null)
         {
             throw new System.ArgumentNullException("target");
         }
         if (!methodInfo.DeclaringType.IsAssignableFrom(target.GetType()))
         {
             throw new System.ArgumentException($"typemismatch {target.GetType()} vs {methodInfo.DeclaringType.GetType()}");
         }
     }
     _target   = target;
     _funcName = methodInfo == null ? null :methodInfo.Name;
     if (methodInfo != null)
     {
         var parameters = methodInfo.GetParameters();
         RebuildArguements(parameters);
     }
     else
     {
         RebuildArguements(null);
     }
     _isCachedCallDirty = true;
     _cachedCall        = null;
     _arguementsCache   = null;
 }
Example #2
0
 public void OnAfterDeserialize()
 {
     _editorArguementsNamesDirty = true;
     _arguementsCache            = null;
     _cachedCall        = null;
     _isCachedCallDirty = true;
 }