|
|
|
@ -105,17 +105,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver |
|
|
|
if (value == null) { |
|
|
|
if (value == null) { |
|
|
|
currentTypeDefinition = null; |
|
|
|
currentTypeDefinition = null; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (currentTypeDefinition != null && currentTypeDefinition.TypeDefinition == value) |
|
|
|
if (currentTypeDefinition == null || currentTypeDefinition.TypeDefinition != value) { |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CacheManager cache = context.CacheManager; |
|
|
|
|
|
|
|
if (cache != null) { |
|
|
|
|
|
|
|
currentTypeDefinition = cache.GetThreadLocal(value) as TypeDefinitionCache; |
|
|
|
|
|
|
|
if (currentTypeDefinition == null) { |
|
|
|
|
|
|
|
currentTypeDefinition = new TypeDefinitionCache(value); |
|
|
|
|
|
|
|
cache.SetThreadLocal(value, currentTypeDefinition); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
currentTypeDefinition = new TypeDefinitionCache(value); |
|
|
|
currentTypeDefinition = new TypeDefinitionCache(value); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -148,17 +138,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver |
|
|
|
if (value == null) { |
|
|
|
if (value == null) { |
|
|
|
currentUsingScope = null; |
|
|
|
currentUsingScope = null; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (currentUsingScope != null && currentUsingScope.UsingScope == value) |
|
|
|
if (currentUsingScope == null || currentUsingScope.UsingScope != value) { |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CacheManager cache = context.CacheManager; |
|
|
|
|
|
|
|
if (cache != null) { |
|
|
|
|
|
|
|
currentUsingScope = cache.GetThreadLocal(value) as UsingScopeCache; |
|
|
|
|
|
|
|
if (currentUsingScope == null) { |
|
|
|
|
|
|
|
currentUsingScope = new UsingScopeCache(value); |
|
|
|
|
|
|
|
cache.SetThreadLocal(value, currentUsingScope); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
currentUsingScope = new UsingScopeCache(value); |
|
|
|
currentUsingScope = new UsingScopeCache(value); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|