本文整理汇总了C#中IMethodCallMessage.GetInArg方法的典型用法代码示例。如果您正苦于以下问题:C# IMethodCallMessage.GetInArg方法的具体用法?C# IMethodCallMessage.GetInArg怎么用?C# IMethodCallMessage.GetInArg使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IMethodCallMessage
的用法示例。
在下文中一共展示了IMethodCallMessage.GetInArg方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: SerializeRequest
public void SerializeRequest(IMethodCallMessage message, ITransportHeaders requestHeaders, Stream requestStream)
{
var writer = new BinaryWriter(requestStream, Encoding.UTF8);
// method info
writer.Write(message.MethodName);
// arguments count
writer.Write((byte)message.InArgCount);
// arguments list
for (int i = 0; i < message.InArgCount; ++i)
{
SerializeObject(writer, message.GetInArg(i));
}
}