Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Assemblers/DtoPropertyAttributeMap.cs =================================================================== diff -u -r3522 -r3860 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Assemblers/DtoPropertyAttributeMap.cs (.../DtoPropertyAttributeMap.cs) (revision 3522) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Assemblers/DtoPropertyAttributeMap.cs (.../DtoPropertyAttributeMap.cs) (revision 3860) @@ -51,7 +51,7 @@ if (!item.PropertyName.HasValidStringValue() || propName != item.PropertyName) throw new DtoPropertyMapException("Property name is empty or doesn't match dictionary property name (key)"); - this.dict.Add(propName, item); + dict.Add(propName, item); } /// @@ -61,15 +61,15 @@ /// public bool ContainsKey(string propName) { - return this.dict.ContainsKey(propName); + return dict.ContainsKey(propName); } /// /// Gets the containing keys /// public ICollection Keys { - get { return this.dict.Keys; } + get { return dict.Keys; } } /// @@ -79,7 +79,7 @@ /// Booleand value indicating when the item is successfuly removed public bool Remove(string propName) { - return this.dict.Remove(propName); + return dict.Remove(propName); } /// @@ -90,15 +90,15 @@ /// public bool TryGetValue(string propName, out DtoPropertyAttributeMapping value) { - return this.dict.TryGetValue(propName, out value); + return dict.TryGetValue(propName, out value); } /// /// /// public ICollection Values { - get { return this.dict.Values; } + get { return dict.Values; } } /// @@ -108,8 +108,8 @@ /// public DtoPropertyAttributeMapping this[string propName] { - get { return this.dict[propName]; } - set { this.dict[propName] = value; } + get { return dict[propName]; } + set { dict[propName] = value; } } /// @@ -118,15 +118,15 @@ /// public void Add(KeyValuePair item) { - this.dict.Add(item.Key, item.Value); + dict.Add(item.Key, item.Value); } /// /// /// public void Clear() { - this.dict.Clear(); + dict.Clear(); } /// @@ -136,7 +136,7 @@ /// public bool Contains(KeyValuePair item) { - return ((IDictionary) this.dict).Contains(item); + return dict.Contains(item); } /// @@ -146,24 +146,18 @@ /// public void CopyTo(KeyValuePair[] array, int arrayIndex) { - ((IDictionary) this.dict).CopyTo(array, arrayIndex); + dict.CopyTo(array, arrayIndex); } /// /// /// - public int Count - { - get { return this.dict.Count; } - } + public int Count => dict.Count; /// /// /// - public bool IsReadOnly - { - get { return false; } - } + public bool IsReadOnly => false; /// /// @@ -172,7 +166,7 @@ /// public bool Remove(KeyValuePair item) { - return this.dict.Remove(item.Key); + return dict.Remove(item.Key); } /// @@ -181,7 +175,7 @@ /// public IEnumerator> GetEnumerator() { - return this.dict.GetEnumerator(); + return dict.GetEnumerator(); } /// @@ -190,7 +184,7 @@ /// IEnumerator IEnumerable.GetEnumerator() { - return (IEnumerator) ((IDictionary) this.dict).GetEnumerator(); + return dict.GetEnumerator(); } #endregion @@ -204,7 +198,7 @@ if (item == null) throw new ArgumentNullException("item"); - this.Add(item.PropertyName, item); + Add(item.PropertyName, item); } /// @@ -213,7 +207,7 @@ /// The item to add public void AddOrUpdate(string propName, string attrName) { - this.AddOrUpdate(propName, attrName, DtoPropertyImportance.Optional); + AddOrUpdate(propName, attrName, DtoPropertyImportance.Optional); } /// @@ -225,7 +219,7 @@ if (!attrName.HasValidStringValue()) throw new DtoPropertyMapException("attrName"); - this.AddOrUpdate(propName, + AddOrUpdate(propName, new DtoPropertyAttributeMapping() { PropertyName = propName, @@ -244,7 +238,7 @@ if (item == null) throw new ArgumentNullException("item"); - this.AddOrUpdate(item.PropertyName, item); + AddOrUpdate(item.PropertyName, item); } @@ -261,13 +255,13 @@ if (!propName.HasValidStringValue()) throw new DtoPropertyMapException("Property name (or key) is empty"); - if (!this.dict.ContainsKey(propName)) + if (!dict.ContainsKey(propName)) { - this.Add(item.PropertyName, item); + Add(item.PropertyName, item); } else { - this.dict[propName] = item; + dict[propName] = item; } } @@ -279,7 +273,7 @@ { foreach (DtoPropertyAttributeMapping item in coll) { - this.AddOrUpdate(item); + AddOrUpdate(item); } } @@ -290,7 +284,7 @@ /// The item if found null otherwise public DtoPropertyAttributeMapping GetByPropertyName(string name) { - return this.GetByPropertyName(name, StringComparison.InvariantCultureIgnoreCase); + return GetByPropertyName(name, StringComparison.InvariantCultureIgnoreCase); } /// @@ -301,7 +295,7 @@ /// The item if found null otherwise public DtoPropertyAttributeMapping GetByPropertyName(string name, StringComparison comparisonType) { - IEnumerable q = from x in this.dict.Values + IEnumerable q = from x in dict.Values where x.PropertyName.Equals(name, comparisonType) select x; @@ -318,7 +312,7 @@ /// The item if found null otherwise public DtoPropertyAttributeMapping GetByAttributeName(string name) { - return this.GetByAttributeName(name, StringComparison.InvariantCultureIgnoreCase); + return GetByAttributeName(name, StringComparison.InvariantCultureIgnoreCase); } /// @@ -329,7 +323,7 @@ /// The item if found null otherwise public DtoPropertyAttributeMapping GetByAttributeName(string name, StringComparison comparisonType) { - IEnumerable q = from x in this.dict.Values + IEnumerable q = from x in dict.Values where x.AttributeName.Equals(name, comparisonType) select x;