private bool TryRemoveConstantNoLock(string/*!*/ name, out object value) {
Context.RequiresClassHierarchyLock();
InitializeConstantsNoLock();
bool result;
ConstantStorage storage;
if (_constants.TryGetValue(name, out storage)) {
if (storage.IsRemoved) {
value = null;
return false;
} else {
value = storage.Value;
result = true;
}
} else {
value = null;
result = false;
}
object namespaceValue;
if (_namespaceTracker != null && _namespaceTracker.TryGetValue(name, out namespaceValue)) {
_constants[name] = ConstantStorage.Removed;
_context.ConstantAccessVersion++;
value = namespaceValue;
result = true;
} else if (result) {
_constants.Remove(name);
_context.ConstantAccessVersion++;
}
return result;
}