From 9693cb937f726e08822f47211e02b85703d0a7b7 Mon Sep 17 00:00:00 2001 From: alcexhim Date: Thu, 30 Apr 2015 16:00:35 -0400 Subject: [PATCH] Updated comments --- .../ObjectModelReference.cs | 32 ++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/CSharp/Libraries/UniversalEditor.Core/ObjectModelReference.cs b/CSharp/Libraries/UniversalEditor.Core/ObjectModelReference.cs index ad11ec28..f6d0f4e8 100644 --- a/CSharp/Libraries/UniversalEditor.Core/ObjectModelReference.cs +++ b/CSharp/Libraries/UniversalEditor.Core/ObjectModelReference.cs @@ -13,6 +13,11 @@ namespace UniversalEditor private Dictionary refsByID = new Dictionary(); private Dictionary refsByType = new Dictionary(); + /// + /// Associates a new with the specified ID and returns it. + /// + /// The of the for which to create an . + /// The newly-created . public ObjectModelReference Add(Guid ID) { if (refsByID.ContainsKey(ID)) return refsByID[ID]; @@ -22,6 +27,11 @@ namespace UniversalEditor Add(omr); return omr; } + /// + /// Associates a new with the specified and returns it. + /// + /// The of the for which to create an . + /// The newly-created . public ObjectModelReference Add(Type type) { if (refsByType.ContainsKey(type)) return refsByType[type]; @@ -32,6 +42,11 @@ namespace UniversalEditor return omr; } + /// + /// Gets the associated with the specified ID. + /// + /// The to search for. + /// The associated with the specified ID, or null if no is associated with the specified ID. public ObjectModelReference this[Guid ID] { get @@ -40,6 +55,12 @@ namespace UniversalEditor return null; } } + + /// + /// Gets the associated with the specified . + /// + /// The to search for. + /// The associated with the specified , or null if no is associated with the specified . public ObjectModelReference this[Type type] { get @@ -48,11 +69,20 @@ namespace UniversalEditor return null; } } - + /// + /// Determines if a with the specified ID exists in the collection. + /// + /// The of the to search for. + /// True if an with the specified ID exists in the collection; false otherwise. public bool Contains(Guid ID) { return (refsByID.ContainsKey(ID)); } + /// + /// Determines if a associated with the specified exists in the collection. + /// + /// The of the to search for. + /// True if an associated with the specified exists in the collection; false otherwise. public bool Contains(Type type) { if (refsByType.Count == 0)