Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Assemblers/DtoHelperServices.cs =================================================================== diff -u -r2895 -r2898 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Assemblers/DtoHelperServices.cs (.../DtoHelperServices.cs) (revision 2895) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Assemblers/DtoHelperServices.cs (.../DtoHelperServices.cs) (revision 2898) @@ -260,7 +260,7 @@ /// /// /// - public static IEnumerable ToPropertyMap(this T type, Stream xsdStream) + public static IEnumerable ToPropertyMap(this T type, Stream xsdStream) { return null; } @@ -272,7 +272,7 @@ /// /// /// - public static IEnumerable ToPropertyMap(this T type, XDocument xsdDocument) + public static IEnumerable ToPropertyMap(this T type, XDocument xsdDocument) { return null; } @@ -283,7 +283,7 @@ /// /// /// - public static IEnumerable ToPropertyMap(this T type) + public static IEnumerable ToPropertyMap(this T type) { foreach (PropertyInfo pInfo in type.GetType().GetProperties()) { @@ -299,7 +299,7 @@ if (val != null) { - yield return new DtoPropertyAttriubteMapping() + yield return new DtoPropertyAttributeMapping() { PropertyName = pInfo.Name, AttributeName = pInfo.Name, @@ -354,7 +354,7 @@ /// /// /// - public static IEnumerable ToPropertyMap(this T type, string elementName, XDocument doc) + public static IEnumerable ToPropertyMap(this T type, string elementName, XDocument doc) { IEnumerable refTable = GetAttributes(doc, elementName); @@ -372,7 +372,7 @@ // ok we have a property attribute match we can now // safely create and return the mapping object AttributeInfo item = q.Single(); - yield return new DtoPropertyAttriubteMapping() + yield return new DtoPropertyAttributeMapping() { PropertyName = pInfo.Name, AttributeName = item.Name, @@ -423,7 +423,7 @@ if (v != null) { PropertyInfo pInfo = null; - DtoPropertyAttriubteMapping mapItem = null; + DtoPropertyAttributeMapping mapItem = null; if (hasPropertyMap) { mapItem = propertyMap.GetByAttributeName(attName); @@ -482,7 +482,7 @@ object val = pInfo.GetValue(src, null); if (val != null) { - map.Add(pInfo.Name, new DtoPropertyAttriubteMapping() + map.Add(pInfo.Name, new DtoPropertyAttributeMapping() { PropertyName = pInfo.Name, AttributeName = pInfo.Name, Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Assemblers/FileIdentificationAssembler.cs =================================================================== diff -u -r2895 -r2898 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Assemblers/FileIdentificationAssembler.cs (.../FileIdentificationAssembler.cs) (revision 2895) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Assemblers/FileIdentificationAssembler.cs (.../FileIdentificationAssembler.cs) (revision 2898) @@ -33,47 +33,47 @@ public FileIdentificationAssembler() { const string attApplication = "Application"; - this.map.Add(attApplication, new DtoPropertyAttriubteMapping() + this.map.Add(attApplication, new DtoPropertyAttributeMapping() { PropertyName = attApplication, AttributeName = attApplication, Importance = DtoPropertyImportance.Required }); const string attVersion = "Version"; - this.map.Add(attVersion, new DtoPropertyAttriubteMapping() + this.map.Add(attVersion, new DtoPropertyAttributeMapping() { PropertyName = attVersion, AttributeName = attVersion, Importance = DtoPropertyImportance.Required }); const string attCreated = "Created"; - this.map.Add(attCreated, new DtoPropertyAttriubteMapping() + this.map.Add(attCreated, new DtoPropertyAttributeMapping() { PropertyName = attCreated, AttributeName = attCreated, Importance = DtoPropertyImportance.Required }); const string attCompany = "Company"; - this.map.Add(attCompany, new DtoPropertyAttriubteMapping() + this.map.Add(attCompany, new DtoPropertyAttributeMapping() { PropertyName = attCompany, AttributeName = attCompany, Importance = DtoPropertyImportance.Required }); const string attLicense = "License"; - this.map.Add(attLicense, new DtoPropertyAttriubteMapping() + this.map.Add(attLicense, new DtoPropertyAttributeMapping() { PropertyName = attLicense, AttributeName = attLicense, Importance = DtoPropertyImportance.Optional }); const string attDescription = "Description"; - this.map.Add(attDescription, new DtoPropertyAttriubteMapping() + this.map.Add(attDescription, new DtoPropertyAttributeMapping() { PropertyName = attDescription, AttributeName = attDescription, Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Assemblers/DtoAssembler.cs =================================================================== diff -u -r2895 -r2898 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Assemblers/DtoAssembler.cs (.../DtoAssembler.cs) (revision 2895) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Assemblers/DtoAssembler.cs (.../DtoAssembler.cs) (revision 2898) @@ -84,7 +84,7 @@ protected void InitializeMappings(string elementName, XDocument xsdReferenceDocument) { var tmp = new TDomainObject(); - IEnumerable tmpMap = tmp.ToPropertyMap(elementName, xsdReferenceDocument); + IEnumerable tmpMap = tmp.ToPropertyMap(elementName, xsdReferenceDocument); this.map.AddOrUpdateRange(tmpMap); } Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Assemblers/DtoPropertyAttributeMapping.cs =================================================================== diff -u -r2895 -r2898 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Assemblers/DtoPropertyAttributeMapping.cs (.../DtoPropertyAttributeMapping.cs) (revision 2895) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Assemblers/DtoPropertyAttributeMapping.cs (.../DtoPropertyAttributeMapping.cs) (revision 2898) @@ -41,10 +41,10 @@ } /// - /// Defines a mapping class which can be used in the DtoAssemler for creating + /// Defines a mapping class which can be used in the DtoAssembler for creating /// mappings between class properties and xml attributes /// - public class DtoPropertyAttriubteMapping + public class DtoPropertyAttributeMapping { /// /// Holds the property to attribute translation rule @@ -60,7 +60,7 @@ /// /// Initializes a new instance of the DtoPropertyAttriubteMapping class /// - public DtoPropertyAttriubteMapping() + public DtoPropertyAttributeMapping() { this.Importance = DtoPropertyImportance.Optional; } Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Assemblers/DtoPropertyAttributeMap.cs =================================================================== diff -u -r2895 -r2898 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Assemblers/DtoPropertyAttributeMap.cs (.../DtoPropertyAttributeMap.cs) (revision 2895) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Assemblers/DtoPropertyAttributeMap.cs (.../DtoPropertyAttributeMap.cs) (revision 2898) @@ -29,12 +29,12 @@ /// /// The property bag defines a dynamic property collection (dictionary) /// - public class DtoPropertyAttributeMap : IDictionary + public class DtoPropertyAttributeMap : IDictionary { /// /// Holds the property dictionary /// - private readonly IDictionary dict = new Dictionary(); + private readonly IDictionary dict = new Dictionary(); #region IDictionary Members @@ -43,7 +43,7 @@ /// /// The name of the property /// The value - public void Add(string propName, DtoPropertyAttriubteMapping item) + public void Add(string propName, DtoPropertyAttributeMapping item) { if (item == null) throw new DtoPropertyMapException("Cannot add an empty or null item to the map"); @@ -88,15 +88,15 @@ /// /// /// - public bool TryGetValue(string propName, out DtoPropertyAttriubteMapping value) + public bool TryGetValue(string propName, out DtoPropertyAttributeMapping value) { return this.dict.TryGetValue(propName, out value); } /// /// /// - public ICollection Values + public ICollection Values { get { return this.dict.Values; } } @@ -106,7 +106,7 @@ /// /// /// - public DtoPropertyAttriubteMapping this[string propName] + public DtoPropertyAttributeMapping this[string propName] { get { return this.dict[propName]; } set { this.dict[propName] = value; } @@ -116,7 +116,7 @@ /// /// /// - public void Add(KeyValuePair item) + public void Add(KeyValuePair item) { this.dict.Add(item.Key, item.Value); } @@ -134,19 +134,19 @@ /// /// /// - public bool Contains(KeyValuePair item) + public bool Contains(KeyValuePair item) { - return ((IDictionary) this.dict).Contains(item); + return ((IDictionary) this.dict).Contains(item); } /// /// /// /// /// - public void CopyTo(KeyValuePair[] array, int arrayIndex) + public void CopyTo(KeyValuePair[] array, int arrayIndex) { - ((IDictionary) this.dict).CopyTo(array, arrayIndex); + ((IDictionary) this.dict).CopyTo(array, arrayIndex); } /// @@ -170,7 +170,7 @@ /// /// /// - public bool Remove(KeyValuePair item) + public bool Remove(KeyValuePair item) { return this.dict.Remove(item.Key); } @@ -179,7 +179,7 @@ /// /// /// - public IEnumerator> GetEnumerator() + public IEnumerator> GetEnumerator() { return this.dict.GetEnumerator(); } @@ -190,16 +190,16 @@ /// IEnumerator IEnumerable.GetEnumerator() { - return (IEnumerator) ((IDictionary) this.dict).GetEnumerator(); + return (IEnumerator) ((IDictionary) this.dict).GetEnumerator(); } #endregion /// /// Adds a property attribute mapping to the dictionary /// - /// The item to add - public void Add(DtoPropertyAttriubteMapping item) + /// The item to add + public void Add(DtoPropertyAttributeMapping item) { if (item == null) throw new ArgumentNullException("item"); @@ -210,7 +210,7 @@ /// /// Adds a or updtes a property attribute mapping to the dictionary /// - /// The item to add + /// The item to add public void AddOrUpdate(string propName, string attrName) { this.AddOrUpdate(propName, attrName, DtoPropertyImportance.Optional); @@ -219,14 +219,14 @@ /// /// Adds a or updtes a property attribute mapping to the dictionary /// - /// The item to add + /// The item to add public void AddOrUpdate(string propName, string attrName, DtoPropertyImportance importance) { if (!attrName.HasValidStringValue()) throw new DtoPropertyMapException("attrName"); this.AddOrUpdate(propName, - new DtoPropertyAttriubteMapping() + new DtoPropertyAttributeMapping() { PropertyName = propName, AttributeName = attrName, @@ -238,8 +238,8 @@ /// /// Adds a or updtes a property attribute mapping to the dictionary /// - /// The item to add - public void AddOrUpdate(DtoPropertyAttriubteMapping item) + /// The item to add + public void AddOrUpdate(DtoPropertyAttributeMapping item) { if (item == null) throw new ArgumentNullException("item"); @@ -253,7 +253,7 @@ /// /// The name of the property /// The value - public void AddOrUpdate(string propName, DtoPropertyAttriubteMapping item) + public void AddOrUpdate(string propName, DtoPropertyAttributeMapping item) { if (item == null) throw new ArgumentNullException("item"); @@ -275,9 +275,9 @@ /// Adds or updates new items in the dictionary /// /// The key value pair collection to handle - public void AddOrUpdateRange(IEnumerable coll) + public void AddOrUpdateRange(IEnumerable coll) { - foreach (DtoPropertyAttriubteMapping item in coll) + foreach (DtoPropertyAttributeMapping item in coll) { this.AddOrUpdate(item); } @@ -288,7 +288,7 @@ /// /// The name of the property to look for /// The item if found null otherwise - public DtoPropertyAttriubteMapping GetByPropertyName(string name) + public DtoPropertyAttributeMapping GetByPropertyName(string name) { return this.GetByPropertyName(name, StringComparison.InvariantCultureIgnoreCase); } @@ -299,9 +299,9 @@ /// The name of the property to look for /// The string type /// The item if found null otherwise - public DtoPropertyAttriubteMapping GetByPropertyName(string name, StringComparison comparisonType) + public DtoPropertyAttributeMapping GetByPropertyName(string name, StringComparison comparisonType) { - IEnumerable q = from x in this.dict.Values + IEnumerable q = from x in this.dict.Values where x.PropertyName.Equals(name, comparisonType) select x; @@ -316,7 +316,7 @@ /// /// The name of the property to look for /// The item if found null otherwise - public DtoPropertyAttriubteMapping GetByAttributeName(string name) + public DtoPropertyAttributeMapping GetByAttributeName(string name) { return this.GetByAttributeName(name, StringComparison.InvariantCultureIgnoreCase); } @@ -327,9 +327,9 @@ /// The name of the property to look for /// The string type /// The item if found null otherwise - public DtoPropertyAttriubteMapping GetByAttributeName(string name, StringComparison comparisonType) + public DtoPropertyAttributeMapping GetByAttributeName(string name, StringComparison comparisonType) { - IEnumerable q = from x in this.dict.Values + IEnumerable q = from x in this.dict.Values where x.AttributeName.Equals(name, comparisonType) select x; Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Assemblers/XMLAttributes.cs =================================================================== diff -u -r2897 -r2898 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Assemblers/XMLAttributes.cs (.../XMLAttributes.cs) (revision 2897) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Assemblers/XMLAttributes.cs (.../XMLAttributes.cs) (revision 2898) @@ -32,20 +32,16 @@ /// /// Holds the name of the xml schema /// - public const string XmlSchemaName = "DamMStabDocDefinition"; + private const string XmlSchemaName = "DamMStabDocDefinition"; - public const string XmlSchemaNameInput = "DamMStabInputDefinition"; - /// /// Holds the xsd resource path /// public const string XsdEmbeddedResourcePath = EmbeddedResourcePath + "." + XmlSchemaName + ".xsd"; - public const string XsdEmbeddedResourcePathInput = EmbeddedResourcePath + "." + XmlSchemaNameInput + ".xsd"; - /// /// Holds the xml namespace /// - public const string XmlElementNamespace = "http://deltares.nl/2008/" + XMLAttributes.XmlSchemaName; + public const string XmlElementNamespace = "http://deltares.nl/2008/" + XmlSchemaName; } } \ No newline at end of file