本文整理汇总了C#中Internal.TypeSystem.MethodSignature.Equals方法的典型用法代码示例。如果您正苦于以下问题:C# MethodSignature.Equals方法的具体用法?C# MethodSignature.Equals怎么用?C# MethodSignature.Equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Internal.TypeSystem.MethodSignature
的用法示例。
在下文中一共展示了MethodSignature.Equals方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetMethod
public override MethodDesc GetMethod(string name, MethodSignature signature)
{
var metadataReader = this.MetadataReader;
var stringComparer = metadataReader.StringComparer;
foreach (var handle in _typeDefinition.GetMethods())
{
if (stringComparer.Equals(metadataReader.GetMethodDefinition(handle).Name, name))
{
MethodDesc method = (MethodDesc)_module.GetObject(handle);
if (signature == null || signature.Equals(method.Signature))
return method;
}
}
return null;
}
示例2: GetMethod
/// <summary>
/// Gets a named method on the type. This method only looks at methods defined
/// in type's metadata. The <paramref name="signature"/> parameter can be null.
/// If signature is not specified and there are multiple matches, the first one
/// is returned. Returns null if method not found.
/// </summary>
// TODO: Substitutions, generics, modopts, ...
public virtual MethodDesc GetMethod(string name, MethodSignature signature)
{
foreach (var method in GetMethods())
{
if (method.Name == name)
{
if (signature == null || signature.Equals(method.Signature))
return method;
}
}
return null;
}
示例3: GetMethod
public override MethodDesc GetMethod(string name, MethodSignature signature)
{
var metadataReader = this.MetadataReader;
foreach (var handle in _typeDefinition.Methods)
{
if (metadataReader.GetMethod(handle).Name.StringEquals(name, metadataReader))
{
MethodDesc method = (MethodDesc)_metadataUnit.GetMethod(handle, this);
if (signature == null || signature.Equals(method.Signature))
return method;
}
}
return null;
}