本文整理汇总了C#中TypeWrapper.GetMethodParameters方法的典型用法代码示例。如果您正苦于以下问题:C# TypeWrapper.GetMethodParameters方法的具体用法?C# TypeWrapper.GetMethodParameters怎么用?C# TypeWrapper.GetMethodParameters使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TypeWrapper
的用法示例。
在下文中一共展示了TypeWrapper.GetMethodParameters方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WriteClass
//.........这里部分代码省略.........
if (throws.classes != null)
{
foreach (string ex in throws.classes)
{
attrib.Add(ex.Replace('.', '/'));
}
}
if (throws.types != null)
{
foreach (Type ex in throws.types)
{
attrib.Add(ClassLoaderWrapper.GetWrapperFromType(ex).Name.Replace('.', '/'));
}
}
m.AddAttribute(attrib);
}
if (mb.IsDefined(JVM.Import(typeof(ObsoleteAttribute)), false)
// HACK the instancehelper methods are marked as Obsolete (to direct people toward the ikvm.extensions methods instead)
// but in the Java world most of them are not deprecated (and to keep the Japi results clean we need to reflect this)
&& (!mb.Name.StartsWith("instancehelper_")
|| mb.DeclaringType.FullName != "java.lang.String"
// the Java deprecated methods actually have two Obsolete attributes
|| GetObsoleteCount(mb) == 2))
{
m.AddAttribute(new DeprecatedAttribute(writer));
}
CustomAttributeData attr = GetAnnotationDefault(mb);
if (attr != null)
{
m.AddAttribute(new AnnotationDefaultClassFileAttribute(writer, GetAnnotationDefault(writer, attr.ConstructorArguments[0])));
}
if (includeParameterNames)
{
MethodParametersEntry[] mp = tw.GetMethodParameters(mw);
if (mp == MethodParametersEntry.Malformed)
{
m.AddAttribute(new MethodParametersAttribute(writer, null, null));
}
else if (mp != null)
{
ushort[] names = new ushort[mp.Length];
ushort[] flags = new ushort[mp.Length];
for (int i = 0; i < names.Length; i++)
{
if (mp[i].name != null)
{
names[i] = writer.AddUtf8(mp[i].name);
}
flags[i] = mp[i].flags;
}
m.AddAttribute(new MethodParametersAttribute(writer, names, flags));
}
}
}
string sig = tw.GetGenericMethodSignature(mw);
if (sig != null)
{
m.AddAttribute(writer.MakeStringAttribute("Signature", sig));
}
AddAnnotations(writer, m, mw.GetMethod());
AddParameterAnnotations(writer, m, mw.GetMethod());
AddTypeAnnotations(writer, m, tw, tw.GetMethodRawTypeAnnotations(mw));
}
}
bool hasSerialVersionUID = false;
foreach (FieldWrapper fw in tw.GetFields())