本文整理汇总了C#中CodeCompletion.ExpressionVisitor.IsInOneModule方法的典型用法代码示例。如果您正苦于以下问题:C# ExpressionVisitor.IsInOneModule方法的具体用法?C# ExpressionVisitor.IsInOneModule怎么用?C# ExpressionVisitor.IsInOneModule使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CodeCompletion.ExpressionVisitor
的用法示例。
在下文中一共展示了ExpressionVisitor.IsInOneModule方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetNameOfMethod
/// <summary>
/// Получить подсказку параметров метода
/// </summary>
public string[] GetNameOfMethod(expression expr, string str, int line, int col, int num_param,ref int defIndex, int choose_param_num, out int param_count)
{
param_count = 0;
if (stv.cur_scope == null) return null;
if (col +1 > str.Length)
col -= str.Length;
SymScope si = stv.FindScopeByLocation(line+1,col+1);//stv.cur_scope;
if (si == null)
{
si = stv.FindScopeByLocation(line,col+1);
if (si == null)
return null;
}
SetCurrentUsedAssemblies();
ExpressionVisitor ev = new ExpressionVisitor(expr, si, stv);
List<ProcScope> scopes = ev.GetOverloadScopes();
bool was_empty_params = false;
if (scopes.Count == 0)
{
RestoreCurrentUsedAssemblies();
return null;
}
si = scopes[0];
//if (si is ElementScope && (si as ElementScope).sc is ProcScope) si = (si as ElementScope).sc as ProcScope;
//if (si is ElementScope && (si as ElementScope).sc is ProcType) si = ((si as ElementScope).sc as ProcType).target;
if (si != null && si is ProcScope)
{
List<string> procs = new List<string>();
List<ProcScope> proc_defs = new List<ProcScope>();
ProcScope ps = si as ProcScope;
int i = 0; bool stop = false;
ProcScope tmp = ps;
while (i < scopes.Count)
{
if (i == defIndex)
{
if (tmp.GetParametersCount() != 0)
{
choose_param_num = tmp.GetParametersCount();
param_count = choose_param_num;
}
break;
}
i++;
tmp = scopes[i];
}
i = 0;
while (ps != null)
{
//if (!ps.si.name.StartsWith("$"))
//if (!stop && ((ps.GetParametersCount() >= num_param) || ps.GetParametersCount() == 0 && num_param == 1 && choose_param_num==1))
//if (i == defIndex) param_count = ps.GetParametersCount();
if (!stop && num_param > choose_param_num && ps.GetParametersCount() >= num_param && ps.GetParametersCount() > choose_param_num)
{
//if (ps.GetParametersCount() >= choose_param_num && choose_param_num == 1 || choose_param_num > 1 && ps.GetParametersCount() > choose_param_num)
{
defIndex = i;
stop = true;
param_count = ps.GetParametersCount();
}
//System.Diagnostics.Debug.WriteLine(defIndex);
}
if (ps is CompiledMethodScope)
ps.AddDocumentation(AssemblyDocCache.GetDocumentation((ps as CompiledMethodScope).mi));
else if (ps is CompiledConstructorScope)
ps.AddDocumentation(AssemblyDocCache.GetDocumentation((ps as CompiledConstructorScope).mi));
else if (ps is ProcScope)
{
if (!ps.si.has_doc)
{
ps.AddDocumentation(UnitDocCache.GetDocumentation(ps as ProcScope));
}
}
if (ps.acc_mod == access_modifer.protected_modifer || ps.acc_mod == access_modifer.private_modifer)
{
if (ps.acc_mod == access_modifer.private_modifer)
{
if (ev.IsInOneModule(ev.entry_scope,ps.topScope))
if (!ps.si.not_include && !equal_params(ps,proc_defs))
{
procs.Add(ps.si.description);
proc_defs.Add(ps);
}
}
else
if (ev.CheckForBaseAccess(ev.entry_scope,ps.topScope))
if (!ps.si.not_include && !equal_params(ps,proc_defs))
{
procs.Add(ps.si.description);
proc_defs.Add(ps);
}
}
else
if (!ps.si.not_include)
/*if (ps.GetParametersCount() == 0)
{
if (!was_empty_params)
//.........这里部分代码省略.........