This commit is contained in:
Бондарев Иван 2017-12-17 14:41:34 +01:00
parent d76288900f
commit de2bb4724d

View file

@ -179,20 +179,29 @@ namespace CodeCompletion
public SymScope(SymInfo si, SymScope topScope)
{
this.si = si;
//si.describe = "unit "+si.name;
si.IsUnitNamespace = true;
this.topScope = topScope;
//this.ht = new Hashtable(CaseInsensitiveHashCodeProvider.Default,CaseInsensitiveComparer.Default);
this.used_units = new List<SymScope>();
members = new List<SymScope>();
}
public virtual void Clear()
{
if (members != null) members.Clear();
if (symbol_table != null) symbol_table.Clear();
if (used_units != null) used_units.Clear();
if (members != null)
members.Clear();
if (symbol_table != null)
symbol_table.Clear();
if (used_units != null)
used_units.Clear();
if (extension_methods != null)
{
foreach (TypeScope ts in extension_methods.Keys)
{
List<ProcScope> meths = extension_methods[ts];
foreach (ProcScope meth in meths)
ts.RemoveExtensionMethod(ts, meth);
}
}
declaringUnit = null;
topScope = null;
}
@ -317,6 +326,16 @@ namespace CodeCompletion
meth_list.Add(meth);
}
public void RemoveExtensionMethod(TypeScope ts, ProcScope meth)
{
List<ProcScope> meth_list = null;
if (extension_methods != null && extension_methods.TryGetValue(ts, out meth_list))
{
if (meth_list.Contains(meth))
meth_list.Remove(meth);
}
}
public SymInfo[] GetSymInfosForExtensionMethods(TypeScope ts)
{
/*if (ts is ArrayScope && !(ts as ArrayScope).is_dynamic_arr)
@ -1019,7 +1038,8 @@ namespace CodeCompletion
public override void Clear()
{
base.Clear();
if (ref_assms != null) ref_assms.Clear();
if (ref_assms != null)
ref_assms.Clear();
}
public override bool IsAssembliesChanged()