private IEntity ImportedNamespaceFor(Import import, IEntity entity)
{
var ns = entity as INamespace;
if (ns == null)
return entity;
var selectiveImportSpec = import.Expression as MethodInvocationExpression;
var imported = selectiveImportSpec != null ? SelectiveImportFor(ns, selectiveImportSpec) : ns;
var actualNamespace = null != import.Alias ? AliasedNamespaceFor(imported, import) : imported;
return new ImportedNamespace(import, actualNamespace);
}