本文整理汇总了C#中IScope.upDeref方法的典型用法代码示例。如果您正苦于以下问题:C# IScope.upDeref方法的具体用法?C# IScope.upDeref怎么用?C# IScope.upDeref使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IScope
的用法示例。
在下文中一共展示了IScope.upDeref方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: commonDeref
public static DerefResults commonDeref(
Identifier name,
IDictionary<Identifier,IScidentre> scidentres,
IEnumerable<ISieve> sieves,
IEnumerable<IWorker> exposes,
IScope scope )
{
DerefResults results = new DerefResults(null, null);
if( scidentres != null && scidentres.ContainsKey(name) )
results.Add( scidentres[name].deref() );
if(sieves != null)
foreach(ISieve d in sieves)
results.Add(d.deref(name));
if(exposes != null && results.worker == null) {
foreach(IWorker w in exposes) {
DerefResults exposeResults = GE.deref(w, name);
if(results.workerList == null || exposeResults.worker == null)
results.Add(exposeResults);
}
}
if(scope != null && results.worker == null) {
DerefResults scopeResults = scope.upDeref(name);
if(results.workerList == null || scopeResults.worker == null)
results.Add(scopeResults);
}
return results;
}
示例2: evalIdent
public static IWorker evalIdent(IScope scope, Identifier name)
{
DerefResults results = scope.upDeref(name);
if( results.worker != null )
return results.worker;
if( results.workerList != null ) {
if( results.workerList.Count > 1 )
throw new NotImplementedException();
return results.workerList[0];
}
throw new ClientException(
String.Format("wo-scidentre '{0}' not found", name));
}