本文整理匯總了C#中AnalysisValue.GetPrototype方法的典型用法代碼示例。如果您正苦於以下問題:C# AnalysisValue.GetPrototype方法的具體用法?C# AnalysisValue.GetPrototype怎麽用?C# AnalysisValue.GetPrototype使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類AnalysisValue
的用法示例。
在下文中一共展示了AnalysisValue.GetPrototype方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: GetRecurse
private IAnalysisSet GetRecurse(AnalysisValue protoStart, Node node, AnalysisUnit unit, string name, bool addRef) {
var prototypes = protoStart.GetPrototype(unit.ProjectEntry);
IAnalysisSet protovalue = AnalysisSet.Empty;
if (prototypes != null) {
try {
foreach (var proto in prototypes) {
if (PushProtoLookup(proto.Value)) {
var property = proto.Value.GetProperty(node, unit, name);
if (property != null) {
var value = property.GetValue(
node,
unit,
proto.Value.DeclaringModule,
this.SelfSet,
addRef
);
protovalue = protovalue.Union(value);
if (property.IsEphemeral) {
protovalue = protovalue.Union(GetRecurse(proto.Value, node, unit, name, addRef));
}
} else {
// keep searching the prototype chain...
protovalue = protovalue.Union(GetRecurse(proto.Value, node, unit, name, addRef));
}
}
}
} finally {
foreach (var proto in prototypes) {
PopProtoLookup(proto.Value);
}
}
}
return protovalue;
}