initialize refsByID if it has not been initialized yet
This commit is contained in:
parent
c1aafc0052
commit
b77ba0339b
@ -95,6 +95,16 @@ namespace UniversalEditor
|
||||
/// <returns>True if an <see cref="ObjectModelReference" /> with the specified ID exists in the collection; false otherwise.</returns>
|
||||
public bool Contains(Guid ID)
|
||||
{
|
||||
if (refsByID.Count == 0)
|
||||
{
|
||||
foreach (ObjectModelReference omr in this)
|
||||
{
|
||||
if (omr.ID != Guid.Empty)
|
||||
{
|
||||
refsByID.Add(omr.ID, omr);
|
||||
}
|
||||
}
|
||||
}
|
||||
return (refsByID.ContainsKey(ID));
|
||||
}
|
||||
/// <summary>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user