{
return ns.LookupTypeOrNamespace (ctx, name, arity, mode, loc);
}
+
+ public override string ToString()
+ {
+ return Namespace.Name;
+ }
}
/// <summary>
public string GetUsing ()
{
+ if (source_file == null || source_file.Usings == null)
+ return string.Empty;
+
StringBuilder sb = new StringBuilder ();
// TODO:
//foreach (object x in ns.using_alias_list)
// sb.AppendFormat ("using {0};\n", x);
foreach (var ue in source_file.Usings) {
- sb.AppendFormat ("using {0};", ue.ToString ());
+ if (ue.Alias != null || ue.ResolvedExpression == null)
+ continue;
+
+ sb.AppendFormat("using {0};", ue.ToString());
sb.Append (Environment.NewLine);
}
{
var res = new List<string> ();
- foreach (var ue in source_file.Usings) {
+ if (source_file == null || source_file.Usings == null)
+ return res;
+
+ foreach (var ue in source_file.Usings)
+ {
if (ue.Alias != null || ue.ResolvedExpression == null)
continue;