Ejemplo n.º 1
0
 /// <summary>
 /// Can be overridden by extenders to do special processing of Reset.
 /// </summary>
 /// <param name="targetMethod">The method the caller invoked.</param>
 /// <returns>The return value of the Reset implementation.</returns>
 protected override object Reset(MethodInfo targetMethod)
 {
     TestSite.Log.Add(LogEntryKind.EnterAdapter,
                      "Managed adapter: {0}, method: {1}",
                      ProxyType.Name,
                      targetMethod.Name);
     try
     {
         instance.Reset();
     }
     catch (Exception ex)
     {
         TestSite.Log.Add(LogEntryKind.Debug, ex.ToString());
         throw;
     }
     finally
     {
         TestSite.Log.Add(LogEntryKind.ExitAdapter,
                          "Managed adapter: {0}, method: {1}",
                          ProxyType.Name,
                          targetMethod.Name);
     }
     return(null);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Can be overridden by extenders to do special processing of Reset.
 /// </summary>
 /// <param name="methodCall"></param>
 /// <returns></returns>
 protected override IMessage Reset(IMethodCallMessage methodCall)
 {
     TestSite.Log.Add(LogEntryKind.EnterAdapter,
                      "Managed adapter: {0}, method: {1}",
                      ProxyType.Name,
                      methodCall.MethodName);
     try
     {
         instance.Reset();
     }
     catch (Exception ex)
     {
         TestSite.Log.Add(LogEntryKind.Debug, ex.ToString());
         throw;
     }
     finally
     {
         TestSite.Log.Add(LogEntryKind.ExitAdapter,
                          "Managed adapter: {0}, method: {1}",
                          ProxyType.Name,
                          methodCall.MethodName);
     }
     return(new ReturnMessage(null, null, 0, methodCall.LogicalCallContext, methodCall));
 }