本文整理汇总了C#中INode.GetFullName方法的典型用法代码示例。如果您正苦于以下问题:C# INode.GetFullName方法的具体用法?C# INode.GetFullName怎么用?C# INode.GetFullName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类INode
的用法示例。
在下文中一共展示了INode.GetFullName方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Add
/**
* Unlike normal nodes, the root node needs to take the package name of its
* children into account. Therefore, we use the full name as the key when
* we insert nodes into the root.
*/
public override void Add(INode n) {
if (children.Count == 289)
{
Console.WriteLine("Test");
}
children.Add(n.GetFullName(), n);
}
示例2: NewAvroNode
private AvroNode NewAvroNode(INode n)
{
IList<AvroNode> children = new List<AvroNode>();
foreach (INode child in n.GetChildren())
{
children.Add(NewAvroNode(child));
}
if (n is IClassNode)
{
IClassNode cn = (IClassNode) n;
IList<IConstructorDef> injectable = cn.GetInjectableConstructors();
IList<IConstructorDef> all = cn.GetAllConstructors();
IList<IConstructorDef> others = new List<IConstructorDef>(all);
foreach (var c in injectable)
{
others.Remove(c);
}
IList<AvroConstructorDef> injectableConstructors = new List<AvroConstructorDef>();
foreach (IConstructorDef inj in injectable)
{
injectableConstructors.Add(NewConstructorDef(inj));
}
IList<AvroConstructorDef> otherConstructors = new List<AvroConstructorDef>();
foreach (IConstructorDef other in others)
{
otherConstructors.Add(NewConstructorDef(other));
}
List<string> implFullNames = new List<string>();
foreach (IClassNode impl in cn.GetKnownImplementations())
{
implFullNames.Add(impl.GetFullName()); //we use class fully qualifed name
}
return NewClassNode(cn.GetName(), cn.GetFullName(),
cn.IsInjectionCandidate(), cn.IsExternalConstructor(), cn.IsUnit(),
injectableConstructors, otherConstructors, implFullNames, children);
}
if (n is INamedParameterNode)
{
INamedParameterNode np = (INamedParameterNode) n;
return NewNamedParameterNode(np.GetName(), np.GetFullName(),
np.GetSimpleArgName(), np.GetFullArgName(), np.IsSet(), np.IsList(), np.GetDocumentation(),
np.GetShortName(), np.GetDefaultInstanceAsStrings(), children);
}
if (n is IPackageNode)
{
return NewPackageNode(n.GetName(), n.GetFullName(), children);
}
Utilities.Diagnostics.Exceptions.Throw(
new IllegalStateException("Encountered unknown type of Node: " + n), LOGGER);
return null;
}
示例3: Add
public virtual void Add(INode n)
{
children.Add(n.GetFullName(), n);
}
示例4: CompareTo
public int CompareTo(INode n)
{
return fullName.CompareTo(n.GetFullName());
}
示例5: GetFullName
private static string GetFullName(INode n)
{
string s = n.GetFullName();
Type t = ReflectionUtilities.GetTypeByName(s);
return t.FullName;
}
示例6: put
/**
* Unlike normal nodes, the root node needs to take the package name of its
* children into account. Therefore, we use the full name as the key when
* we insert nodes into the root.
*/
public void put(INode n)
{
children.Add(n.GetFullName(), n);
}
示例7: Add
/**
* Unlike normal nodes, the root node needs to take the package name of its
* children into account. Therefore, we use the full name as the key when
* we insert nodes into the root.
*/
public override void Add(INode n) {
children.Add(n.GetFullName(), n);
}
示例8: SerializeNode
private static ClassHierarchyProto.Node SerializeNode(INode n)
{
IList<ClassHierarchyProto.Node> children = new List<ClassHierarchyProto.Node>();
foreach (INode child in n.GetChildren())
{
children.Add(SerializeNode(child));
}
if (n is IClassNode)
{
IClassNode cn = (IClassNode)n;
IList<IConstructorDef> injectable = cn.GetInjectableConstructors();
IList<IConstructorDef> all = cn.GetAllConstructors();
IList<IConstructorDef> others = new List<IConstructorDef>(all);
foreach (var c in injectable)
{
others.Remove(c);
}
IList<ClassHierarchyProto.ConstructorDef> injectableConstructors = new List<ClassHierarchyProto.ConstructorDef>();
foreach (IConstructorDef inj in injectable)
{
injectableConstructors.Add(SerializeConstructorDef(inj));
}
IList<ClassHierarchyProto.ConstructorDef> otherConstructors = new List<ClassHierarchyProto.ConstructorDef>();
foreach (IConstructorDef other in others)
{
otherConstructors.Add(SerializeConstructorDef(other));
}
List<string> implFullNames = new List<string>();
foreach (IClassNode impl in cn.GetKnownImplementations())
{
implFullNames.Add(impl.GetFullName());
}
return NewClassNode(cn.GetName(), cn.GetFullName(),
cn.IsInjectionCandidate(), cn.IsExternalConstructor(), cn.IsUnit(),
injectableConstructors, otherConstructors, implFullNames, children);
}
else if (n is INamedParameterNode)
{
INamedParameterNode np = (INamedParameterNode)n;
return NewNamedParameterNode(np.GetName(), np.GetFullName(),
np.GetSimpleArgName(), np.GetFullArgName(), np.IsSet(), np.GetDocumentation(),
np.GetShortName(), np.GetDefaultInstanceAsStrings(), children);
}
else if (n is IPackageNode)
{
return NewPackageNode(n.GetName(), n.GetFullName(), children);
}
else
{
throw new IllegalStateException("Encountered unknown type of Node: " + n);
}
}