提交 75d5ca82 编写于 作者: M Matt Warren

Fix variable name

上级 dafc24c2
......@@ -52,7 +52,7 @@ private class ReferenceSet
private readonly NonReentrantLock _gate = new NonReentrantLock();
// metadata references are held weakly, so even though this is a cache that enables reuse, it does not control lifetime.
private readonly Dictionary<MetadataReferenceProperties, WeakReference<MetadataReference>> references
private readonly Dictionary<MetadataReferenceProperties, WeakReference<MetadataReference>> _references
= new Dictionary<MetadataReferenceProperties, WeakReference<MetadataReference>>();
public ReferenceSet(MetadataReferenceCache cache)
......@@ -67,10 +67,10 @@ public MetadataReference GetAddOrUpdate(string path, MetadataReferenceProperties
WeakReference<MetadataReference> weakref;
MetadataReference mref = null;
if (!(this.references.TryGetValue(properties, out weakref) && weakref.TryGetTarget(out mref)))
if (!(_references.TryGetValue(properties, out weakref) && weakref.TryGetTarget(out mref)))
{
// try to base this metadata reference off of an existing one, so we don't load the metadata bytes twice.
foreach (var wr in this.references.Values)
foreach (var wr in _references.Values)
{
if (wr.TryGetTarget(out mref))
{
......@@ -84,7 +84,7 @@ public MetadataReference GetAddOrUpdate(string path, MetadataReferenceProperties
mref = _cache._createReference(path, properties);
}
this.references[properties] = new WeakReference<MetadataReference>(mref);
_references[properties] = new WeakReference<MetadataReference>(mref);
}
return mref;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册