本文整理汇总了C#中IMethodCallMessage.GetInArgName方法的典型用法代码示例。如果您正苦于以下问题:C# IMethodCallMessage.GetInArgName方法的具体用法?C# IMethodCallMessage.GetInArgName怎么用?C# IMethodCallMessage.GetInArgName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IMethodCallMessage
的用法示例。
在下文中一共展示了IMethodCallMessage.GetInArgName方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PreProcess
protected void PreProcess(ref IMethodCallMessage msg)
{
Trace.WriteLine(String.Format("TracePreProcessor {0} is called", msg.MethodName));
if (msg.InArgCount > 0) Trace.WriteLine(String.Format("In Argument Count {0}", msg.InArgCount));
for (int idx = 0; idx < msg.InArgCount; idx++)
{
Trace.WriteLine(String.Format("{0}={1}", msg.GetInArgName(idx), msg.GetInArg(idx)));
}
}
示例2: FormatInMessage
public static string FormatInMessage(IMethodCallMessage msg)
{
string message = String.Format("Trace {0}.{1} is called",msg.MethodBase.DeclaringType.FullName, msg.MethodName) + System.Environment.NewLine;
if (msg.InArgCount > 0)
{
message += String.Format("In Argument Count {0}", msg.InArgCount) + System.Environment.NewLine;
for (int idx = 0; idx < msg.InArgCount; idx++)
{
message += String.Format("{0} = {1}", msg.GetInArgName(idx), msg.GetInArg(idx)) + System.Environment.NewLine;
}
}
return message;
}
示例3: GetInArgNames
internal virtual string[] GetInArgNames(IMethodCallMessage m, int c)
{
string[] strArray = new string[c];
for (int i = 0; i < c; i++)
{
string inArgName = m.GetInArgName(i);
if (inArgName == null)
{
inArgName = "__param" + i;
}
strArray[i] = inArgName;
}
return strArray;
}
示例4: PrintValues
internal void PrintValues(IMethodCallMessage msg)
{
try {
SeleniumLog log = SeleniumLog.Instance();
log.Blue().WriteLine("Expand to view input parameters");
log.SaveIndent("__SELENIUMLOG_PRINT_INPUTS__");
log.Indent();
int argumentIndex = 0;
foreach (var arg in msg.Args)
{
// Display Values for custom attribute
CURRENT_ARGUMENT_NAME = msg.GetInArgName(argumentIndex);
DispalyInformation(CURRENT_ARGUMENT_NAME, arg);
argumentIndex++;
}
log.RestoreIndent("__SELENIUMLOG_PRINT_INPUTS__");
}
catch (Exception e)
{
SeleniumLog log = SeleniumLog.Instance();
log.Warning().WriteLine("SeleniumLog Exception: 01-18 - " + e.Message);
}
}
示例5: GetInArgNames
[System.Security.SecurityCritical] // auto-generated
internal virtual String[] GetInArgNames(IMethodCallMessage m, int c)
{
String[] names = new String[c];
for (int i = 0; i < c; i++)
{
String name = m.GetInArgName(i);
if (name == null)
{
name = "__param" + i;
}
names[i] = name;
}
return names;
}
示例6: PrintValues
internal void PrintValues(IMethodCallMessage msg)
{
int argumentIndex = 0;
foreach (var arg in msg.Args)
{
//Console.WriteLine(string.Format("Argument Name: {0}", msg.GetInArgName(argumentIndex)));
// Display Values for custom attribute
DispalyInformation(msg.GetInArgName(argumentIndex), arg);
argumentIndex++;
}
}