本文整理汇总了C#中IMethod.fullName方法的典型用法代码示例。如果您正苦于以下问题:C# IMethod.fullName方法的具体用法?C# IMethod.fullName怎么用?C# IMethod.fullName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IMethod
的用法示例。
在下文中一共展示了IMethod.fullName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Create
public static Saved_MethodStream Create(O2MappedAstData astData, IMethod iMethod, string methodStreams_CacheLocation, bool forceCreate)
{
if (methodStreams_CacheLocation.isNull())
methodStreams_CacheLocation = "_methodStreams_CacheLocation".tempDir();
var safeFileName = iMethod.fullName().safeFileName();//240 - methodStreams_CacheLocation.size());
var pathToSaveSerializedObject = methodStreams_CacheLocation.pathCombine_MaxSize(safeFileName + ".methodStream.xml");
if (forceCreate.isFalse() && pathToSaveSerializedObject.fileExists())
{
"Skipping iMethod '{0}' since serialized object already exists ".debug(iMethod.Name);
var loaded_SavedMethodStream = pathToSaveSerializedObject.load<Saved_MethodStream>();
if (loaded_SavedMethodStream.notNull())
return loaded_SavedMethodStream;
}
var savedMethodStream = new Saved_MethodStream(astData, iMethod);
if (savedMethodStream.isNull())
return null;
else
{
savedMethodStream.Serialized_Saved_MethodStream_FileCache = pathToSaveSerializedObject;
savedMethodStream.saveAs(pathToSaveSerializedObject);
"Serialized method stream object saved to: {0}".debug(pathToSaveSerializedObject);
return savedMethodStream;
}
}
示例2: methodStreamItem
public static MethodStream_Item methodStreamItem(this Saved_MethodStream savedMethodStream, O2MappedAstData astData, IMethod iMethod, MethodStream_ItemType itemType)
{
var methodStreamItem = new MethodStream_Item();
methodStreamItem.ItemType = itemType;
if (iMethod.Parameters.Count > 0)
{
methodStreamItem.Parameters = new NameValueItems();
foreach(var parameter in iMethod.Parameters)
methodStreamItem.Parameters.add(parameter.Name.str(), parameter.ReturnType.FullyQualifiedName);
}
if (iMethod.Attributes.Count > 0)
{
methodStreamItem.Attributes = new NameValueItems();
foreach(var attribute in iMethod.Attributes)
methodStreamItem.Attributes.add(attribute.AttributeTarget.str(), attribute.AttributeType.FullyQualifiedName);
}
methodStreamItem.Name = iMethod.name();
methodStreamItem.Class = iMethod.DeclaringType.Name;
if (astData.file(iMethod).notNull())
methodStreamItem.Location = new Ast_Location(astData, iMethod);
methodStreamItem.Namespace = iMethod.DeclaringType.Namespace;
methodStreamItem.Signature = iMethod.fullName();
methodStreamItem.ReturnType = iMethod.ReturnType.FullyQualifiedName;
methodStreamItem.DotNetName = iMethod.DotNetName;
return methodStreamItem;
}
示例3: iMethodsThatCallThisIMethod
public static List<IMethod> iMethodsThatCallThisIMethod(this O2MappedAstData astData, IMethod targetIMethod)
{
var results = new List<IMethod>();
if (astData != null && targetIMethod != null)
{
var targetIMethodName = targetIMethod.fullName();
foreach (var iMethod in astData.iMethods())
if (iMethod != null && iMethod.DotNetName.valid())
{
try
{
foreach (var iMethodCalled in astData.calledIMethods(iMethod))
{
if (iMethodCalled != null && iMethodCalled.fullName() == targetIMethodName)
if (results.Contains(iMethod).isFalse())
results.add(iMethod);
//"{0} -> {1}".debug(iMethod.DotNetName, iMethodCalled.DotNetName);
//results.add(iMethod);
}
}
catch (Exception ex)
{
ex.log("iMethodsThatCallThisIMethod");
}
}
}
return results;
}