本文整理汇总了C#中System.Reflection.MethodBase.GetSignature方法的典型用法代码示例。如果您正苦于以下问题:C# MethodBase.GetSignature方法的具体用法?C# MethodBase.GetSignature怎么用?C# MethodBase.GetSignature使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Reflection.MethodBase
的用法示例。
在下文中一共展示了MethodBase.GetSignature方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetDisplayName
/// <summary>Gets the display.</summary>
/// <param name="methodBase">The method base.</param>
/// <returns>The display name.</returns>
public static string GetDisplayName(MethodBase methodBase)
{
return methodBase.GetSignature(true);
}
示例2: Register
public int Register(MemberInfoData callee, MethodBase member) {
if (NativesManager.Instance.IsNative(member)) {
return this.RegisterNative(callee, member);
} else {
if ((member.IsVirtual || member.IsAbstract) && member.DeclaringType.IsSubclassOf(typeof(MK.JavaScript.Window))) {
ThrowHelper.Throw("{0} cannot be called as it is virtual or abstract method of subclass of Window.", member.GetSignature());
}
MethodBaseData data;
if (this.Methods.TryGetValue(member, out data)) {
++data.HitCount;
} else {
//zaczynam numeracje metod od 1 a nie od zera... ciekawe kiedy to spowoduje problemy
//dlaczego tak numeruje? bo if(0) zwraca false w .js
data = new MethodBaseData(member, this.Methods.Count + 1);
this.Methods[member] = data;
if ((member.IsVirtual || member.IsAbstract)) {// && ((MethodInfo)member).GetBaseDefinition() == member) {
var typeData = this.Resolve(member.DeclaringType);
VirtualMethodCallData vmcd;
if (!typeData.VirtualMethods.TryGetValue(data, out vmcd)) {
typeData.VirtualMethods[data] = new VirtualMethodCallData();
}
}
if (!member.IsAbstract)
this.methodsToCompile.Enqueue(data);
}
if (this.PageCompiler.WindowAttribute.MethodsOnTop
&& member.DeclaringType.GetDeclaringTypesWithType().Any(t => t == this.PageCompiler.WindowType)) {
this.addDependency(this.PageCompiler.TypeData, data);
} if (this.PageCompiler.WindowAttribute.RunAtThis.Any(t => member.DeclaringType.GetDeclaringTypesWithType().Contains(t))) {
this.addDependency(this.PageCompiler.TypeData, data);
} else {
var moduleCompiler = this.GetModuleCompiler(member.DeclaringType);
if (moduleCompiler != null) {
this.addDependency(moduleCompiler.TypeData, data);
} else {
this.addDependency(callee, data);
}
}
return data.Index;
}
}