本文整理汇总了C#中INode.typeName方法的典型用法代码示例。如果您正苦于以下问题:C# INode.typeName方法的具体用法?C# INode.typeName怎么用?C# INode.typeName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类INode
的用法示例。
在下文中一共展示了INode.typeName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MethodMapping
public MethodMapping(string signature, string key, string file, string parentMethod, string parentClass, INode iNode)
: this()
{
INodeType = iNode.typeName();
Signature = signature ?? "";
Key = key ?? "";
IsMethodDeclaration = iNode is MethodDeclaration;
File = file;
Start_Line = iNode.notNull() && iNode.StartLocation.notNull() ? iNode.StartLocation.Line : -1;
Start_Column = iNode.notNull() && iNode.StartLocation.notNull() ? iNode.StartLocation.Column : -1;
End_Line = iNode.notNull() && iNode.EndLocation.notNull() ? iNode.EndLocation.Line : -1;
End_Column = iNode.notNull() && iNode.EndLocation.notNull() ? iNode.EndLocation.Column : -1;
ParentMethod = parentMethod;
ParentClass = parentClass;
SourceCode = iNode.notNull() ? iNode.csharpCode().trim() : "";
}
示例2: BeginVisit
protected override void BeginVisit(INode node)
{
AllNodes.add(node);
NodesByType.add(node.typeName(), node);
}
示例3: caretMoved
void caretMoved(Caret caret)
{
// same code as the one in "public static INode iNode(this O2MappedAstData o2MappedAstData, string file, Caret caret)" in O2MappedAstData_ExtensionMethods.cs (O2 Script)
var o2MappedAstData = compiledFileAstData;
var file = sPathToFileLoaded;
if (o2MappedAstData != null && file != null && caret != null)
{
if (o2MappedAstData.FileToINodes.hasKey(file))
{
var allINodes = o2MappedAstData.FileToINodes[file];
var adjustedLine = caret.Line + 1;
var adjustedColumn = caret.Column + 1;
CurrentINode = allINodes.getINodeAt(adjustedLine, adjustedColumn);
if (CurrentINode != null)
lbCurrentAstNode.set_Text("Current Ast Node: {0}".format(CurrentINode.typeName()));
}
}
if (compiledFileAstData.notNull())
{
//var iNode = compiledFileAstData.iNode(sPathToFileLoaded, caret);
//if (iNode != null)
//{
//CurrentINode = iNode;
//lbCurrentAstNode.set_Text("Current Ast Node: {0}".format(iNode.typeName()))
//}
}
}