Esempio n. 1
0
        private void SelectMethod(string methodName, string typeName, string nameSpace, string assemblyName,
                                  SequenceData data)
        {
            foreach (MethodCallInfo mInfo in AssemblyData.MethodCallList)
            {
                if (!mInfo.StartMethod.Equals(nameSpace + "." + typeName + "." + methodName)) 
                    continue;
                
                data.AddObject(mInfo.MethodCallType);
                data.AddMessage(mInfo);
                Logger.Current.Debug(">> Found method:" + mInfo);

                // if targetAssembly is different from assemblyName then recursively call this method
                var targetAssembly = Helper.RemoveExtension(Helper.RemoveExtension(mInfo.TargetMethodAssembly, ".dll"), ".exe");
                if (!targetAssembly.Equals(assemblyName))
                {
                    SelectMethod(mInfo.MethodCallName, mInfo.MethodCallType, mInfo.MethodCallNamespace,
                                 mInfo.TargetMethodAssembly, data);
                }
               
            }
        }
 /// <summary>
 /// Selects the method.
 /// </summary>
 /// <param name="methodName">Name of the method.</param>
 /// <param name="typeName">Name of the type.</param>
 /// <param name="namespaceName">Name of the namespace.</param>
 /// <param name="data">The sequence data.</param>
 private void SelectMethod(string methodName, string typeName, string namespaceName, SequenceData data)
 {
   foreach (MethodCallInfo methodInfo in this.Data.MethodCallList)
   {
     if (methodInfo.StartMethod.Equals(namespaceName + "." + typeName + "." + methodName))
     {
       data.AddObject(methodInfo.MethodCallType);
       data.AddMessage(methodInfo);
       Logger.Current.Info(">> Found method:" + methodInfo.ToString());
     }
   }
 }