Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 0943cc9f authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

Merge pull request #744 in VECTO/vecto-sim from...

Merge pull request #744 in VECTO/vecto-sim from ~EMQUARIMA/vecto-sim:ReleaseCandidates/v3.3.2.1519 to master

* commit '5293f0d8':
  creating new release: 3.3.2.1548
  correcting testcase due to different initialization
  adapt testcases due to chanes in FC
  when re-engaging use minimum of current and previous out-angular velocity (fixes testcase VECTO-855 and others)
  refactoring: move digestData class to separate file
  extending xml declaration data provider to allwo reading component data from separate XML documents
  testing shorter time limits for consecutive shifts
  adding new mandatory parameters for vehicle comparison jobs
  adding code for plotting shift polygons of xml job
  Revert "adding testcase for writing xml reports"
  adding testcase for writing xml reports
  surround writing sum-data with try-catch
  adding testcase if sum-file is locked simulation does not abort
  adding testcase where mod-file is opened and writing mod data will fail
  refacotring method
  surround writing modd data with try-catch
parents 26637d5a 5293f0d8
Branches
Tags
No related merge requests found
Showing
with 308 additions and 119 deletions
File added
No preview for this file type
No preview for this file type
......@@ -2,7 +2,19 @@
**VECTO 3.3.2**
**Build 1519 (2019-03-01) RELEASE CANDIDATE***
**Build 1548 (2019-03-29) OFFICIAL RELEASE**
- Bugfixes
* [VECTO-861] - 3.3.1: Torque converter not working correctly
* [VECTO-904] - Range for gear loss map not sufficient.
* [VECTO-909] - 3.3.2.1519: Problems running more than one input .xml
* [VECTO-917] - TargetVelocity (0.0000) and VehicleVelocity (>0) must be zero when vehicle is halting
* [VECTO-918] - RegionalDeliveryEMS LowLoading - ResponseSpeedLimitExceeded
* [VECTO-920] - Urban Delivery: Simulation Run Aborted, TargetVelocity and VehicleVelocity must be zero when vehicle is halting!
**Build 1519 (2019-03-01) RELEASE CANDIDATE**
Release Notes - VECTO: Vehicle Energy Calculation Tool - Version 3.3.2.1519-RC
......
This diff is collapsed.
File added
......@@ -30,5 +30,5 @@
*/
using System.Reflection;
[assembly: AssemblyVersion("0.2.0.1519")]
[assembly: AssemblyFileVersion("0.2.0.1519")]
[assembly: AssemblyVersion("0.2.0.1548")]
[assembly: AssemblyFileVersion("0.2.0.1548")]
......@@ -69,6 +69,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HashingCmd", "HashingCmd\Ha
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Article10Notifications", "..\VECTO-Article10\Article10Notifications\Article10Notifications.csproj", "{EF99431D-4227-44C3-B2BD-DE8AE3E672CA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VECTO_GIT", "..\STUDENTEN_PROJEKTE\Kober_VectoGIT\VECTO_GIT\VECTO_GIT\VECTO_GIT.csproj", "{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug PerformanceStats|Any CPU = Debug PerformanceStats|Any CPU
......@@ -724,6 +726,48 @@ Global
{EF99431D-4227-44C3-B2BD-DE8AE3E672CA}.ReleaseTUG|x64.Build.0 = Release|Any CPU
{EF99431D-4227-44C3-B2BD-DE8AE3E672CA}.ReleaseTUG|x86.ActiveCfg = Release|Any CPU
{EF99431D-4227-44C3-B2BD-DE8AE3E672CA}.ReleaseTUG|x86.Build.0 = Release|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.Debug PerformanceStats|Any CPU.ActiveCfg = Debug|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.Debug PerformanceStats|Any CPU.Build.0 = Debug|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.Debug PerformanceStats|x64.ActiveCfg = Debug|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.Debug PerformanceStats|x64.Build.0 = Debug|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.Debug PerformanceStats|x86.ActiveCfg = Debug|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.Debug PerformanceStats|x86.Build.0 = Debug|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.Debug PerformanceTrace|Any CPU.ActiveCfg = Debug|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.Debug PerformanceTrace|Any CPU.Build.0 = Debug|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.Debug PerformanceTrace|x64.ActiveCfg = Debug|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.Debug PerformanceTrace|x64.Build.0 = Debug|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.Debug PerformanceTrace|x86.ActiveCfg = Debug|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.Debug PerformanceTrace|x86.Build.0 = Debug|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.Debug|x64.ActiveCfg = Debug|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.Debug|x64.Build.0 = Debug|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.Debug|x86.ActiveCfg = Debug|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.Debug|x86.Build.0 = Debug|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.DebugTUG|Any CPU.ActiveCfg = Debug|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.DebugTUG|Any CPU.Build.0 = Debug|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.DebugTUG|x64.ActiveCfg = Debug|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.DebugTUG|x64.Build.0 = Debug|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.DebugTUG|x86.ActiveCfg = Debug|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.DebugTUG|x86.Build.0 = Debug|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.Deploy|Any CPU.ActiveCfg = Debug|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.Deploy|Any CPU.Build.0 = Debug|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.Deploy|x64.ActiveCfg = Debug|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.Deploy|x64.Build.0 = Debug|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.Deploy|x86.ActiveCfg = Debug|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.Deploy|x86.Build.0 = Debug|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.Release|Any CPU.Build.0 = Release|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.Release|x64.ActiveCfg = Release|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.Release|x64.Build.0 = Release|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.Release|x86.ActiveCfg = Release|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.Release|x86.Build.0 = Release|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.ReleaseTUG|Any CPU.ActiveCfg = Release|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.ReleaseTUG|Any CPU.Build.0 = Release|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.ReleaseTUG|x64.ActiveCfg = Release|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.ReleaseTUG|x64.Build.0 = Release|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.ReleaseTUG|x86.ActiveCfg = Release|Any CPU
{A684BC49-C9B3-4C0C-8D2E-A13077853EDA}.ReleaseTUG|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......
......@@ -140,7 +140,7 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<WarningsAsErrors>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</WarningsAsErrors>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<DefineConstants>RELEASE_CANDIDATE</DefineConstants>
<DefineConstants>CERTIFICATION_RELEASE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Deploy|x86'">
<DefineTrace>true</DefineTrace>
......
using System.Collections.Generic;
using System.Xml;
using System.Xml.Linq;
using System.Xml.XPath;
namespace TUGraz.VectoCommon.InputData {
public class DigestData
{
private const string ReferenceElementXPath = ".//*[local-name()='Reference']";
private const string TransformElementXPath = ".//*[local-name()='Transform']";
private const string DigestMethodElementXPath = ".//*[local-name()='DigestMethod']";
private const string UriAttr = "URI";
private const string AlgorithmAttr = "Algorithm";
private const string ReferenceUriAttrXPath = ReferenceElementXPath + "/@" + UriAttr;
private const string TransformAlgorithmAttrXPath = TransformElementXPath + "/@" + AlgorithmAttr;
private const string DigestMethodAlgorithmAttrXPath = DigestMethodElementXPath + "/@" + AlgorithmAttr;
private const string DigestValueElementXPath = ".//*[local-name()='DigestValue']";
public DigestData(string reference, string[] c14n, string digestMethod, string digestValue)
{
Reference = reference;
CanonicalizationMethods = c14n;
DigestMethod = digestMethod;
DigestValue = digestValue;
}
public DigestData(XPathNavigator navigator)
{
Reference = navigator.SelectSingleNode(ReferenceUriAttrXPath)?.InnerXml;
var nodes = navigator.Select(TransformAlgorithmAttrXPath);
var c14n = new List<string>();
while (nodes.MoveNext()) {
c14n.Add(nodes.Current.InnerXml);
}
CanonicalizationMethods = c14n.ToArray();
DigestMethod = navigator.SelectSingleNode(DigestMethodAlgorithmAttrXPath)?.InnerXml;
DigestValue = navigator.SelectSingleNode(DigestValueElementXPath)?.InnerXml;
}
public DigestData(XmlNode xmlNode)
{
Reference = xmlNode.SelectSingleNode(ReferenceUriAttrXPath)?.InnerXml;
var nodes = xmlNode.SelectNodes(TransformAlgorithmAttrXPath);
var c14n = new List<string>();
if (nodes != null) {
for (var i = 0; i < nodes.Count; i++) {
c14n.Add(nodes[i].InnerXml);
}
}
CanonicalizationMethods = c14n.ToArray();
DigestMethod = xmlNode.SelectSingleNode(DigestMethodAlgorithmAttrXPath)?.InnerXml;
DigestValue = xmlNode.SelectSingleNode(DigestValueElementXPath)?.InnerXml;
}
public DigestData(XNode xmlNode)
{
Reference = xmlNode.XPathSelectElement(ReferenceElementXPath)?.Attribute(XName.Get(UriAttr))?.Value;
var nodes = xmlNode.XPathSelectElements(TransformElementXPath);
var c14n = new List<string>();
foreach (var node in nodes) {
c14n.Add(node.Attribute(XName.Get(AlgorithmAttr))?.Value);
}
CanonicalizationMethods = c14n.ToArray();
DigestMethod = xmlNode.XPathSelectElement(DigestMethodElementXPath)?.Attribute(XName.Get(AlgorithmAttr))?.Value;
DigestValue = xmlNode.XPathSelectElement(DigestValueElementXPath)?.Value;
}
public string DigestValue { get; }
public string Reference { get; }
public string[] CanonicalizationMethods { get; }
public string DigestMethod { get; }
}
}
\ No newline at end of file
......@@ -30,8 +30,7 @@
*/
using System.Collections.Generic;
using System.Xml;
using System.Xml.XPath;
using System.Linq;
using TUGraz.VectoCommon.Hashing;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoHashing;
......@@ -73,56 +72,4 @@ namespace TUGraz.VectoCommon.InputData
DigestData JobDigest { get; }
}
public class DigestData
{
private const string ReferenceQueryXPath = ".//*[local-name()='Reference']/@URI";
private const string AlgorithmQueryXPath = ".//*[local-name()='Transform']/@Algorithm";
private const string DigestMethodQueryXPath = ".//*[local-name()='DigestMethod']/@Algorithm";
private const string DigestValueQuerXPath = ".//*[local-name()='DigestValue']";
public DigestData(string reference, string[] c14n, string digestMethod, string digestValue)
{
Reference = reference;
CanonicalizationMethods = c14n;
DigestMethod = digestMethod;
DigestValue = digestValue;
}
public DigestData(XPathNavigator navigator)
{
Reference = navigator.SelectSingleNode(ReferenceQueryXPath)?.InnerXml;
var nodes = navigator.Select(AlgorithmQueryXPath);
var c14n = new List<string>();
while (nodes.MoveNext()) {
c14n.Add(nodes.Current.InnerXml);
}
CanonicalizationMethods = c14n.ToArray();
DigestMethod = navigator.SelectSingleNode(DigestMethodQueryXPath)?.InnerXml;
DigestValue = navigator.SelectSingleNode(DigestValueQuerXPath)?.InnerXml;
}
public DigestData(XmlNode xmlNode)
{
Reference = xmlNode.SelectSingleNode(ReferenceQueryXPath)?.InnerXml;
var nodes = xmlNode.SelectNodes(AlgorithmQueryXPath);
var c14n = new List<string>();
if (nodes != null) {
for (var i = 0; i < nodes.Count; i++) {
c14n.Add(nodes[i].InnerXml);
}
}
CanonicalizationMethods = c14n.ToArray();
DigestMethod = xmlNode.SelectSingleNode(DigestMethodQueryXPath)?.InnerXml;
DigestValue = xmlNode.SelectSingleNode(DigestValueQuerXPath)?.InnerXml;
}
public string DigestValue { get; }
public string Reference { get; }
public string[] CanonicalizationMethods { get; }
public string DigestMethod { get; }
}
}
......@@ -30,5 +30,5 @@
*/
using System.Reflection;
[assembly: AssemblyVersion("3.3.2.1519")]
[assembly: AssemblyFileVersion("3.3.2.1519")]
\ No newline at end of file
[assembly: AssemblyVersion("3.3.2.1548")]
[assembly: AssemblyFileVersion("3.3.2.1548")]
\ No newline at end of file
......@@ -53,6 +53,7 @@
<Compile Include="Hashing\IVectoHash.cs" />
<Compile Include="Hashing\VectoComponents.cs" />
<Compile Include="InputData\DataSourceType.cs" />
<Compile Include="InputData\DigestData.cs" />
<Compile Include="InputData\TableData.cs">
<SubType>Component</SubType>
</Compile>
......
......@@ -30,5 +30,5 @@
*/
using System.Reflection;
[assembly: AssemblyVersion("1.2.0.1519")]
[assembly: AssemblyFileVersion("1.2.0.1519")]
[assembly: AssemblyVersion("1.2.0.1548")]
[assembly: AssemblyFileVersion("1.2.0.1548")]
......@@ -30,5 +30,5 @@
*/
using System.Reflection;
[assembly: AssemblyVersion("3.3.2.1519")]
[assembly: AssemblyFileVersion("3.3.2.1519")]
\ No newline at end of file
[assembly: AssemblyVersion("3.3.2.1548")]
[assembly: AssemblyFileVersion("3.3.2.1548")]
\ No newline at end of file
......@@ -175,6 +175,8 @@ namespace TUGraz.VectoCore.Configuration
public const string VectoDeclarationDefinitionsNS =
"urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v" + XSDDeclarationVersion;
public const string VectoDeclarationComponentNS = "urn:tugraz:ivt:VectoAPI:DeclarationComponent:v" + XSDDeclarationVersion;
public const string VectoEngineeringDefinitionsNS =
"urn:tugraz:ivt:VectoAPI:EngineeringDefinitions:v" + XSDEngineeringVersion;
......
......@@ -29,10 +29,16 @@
* Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology
*/
using System;
using System.Xml;
using System.Xml.Linq;
using System.Xml.XPath;
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Resources;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.Configuration;
using TUGraz.VectoCore.Utils;
namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration
{
......@@ -48,6 +54,23 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration
XMLNames.ComponentDataWrapper);
}
public XMLDeclarationAirdragDataProvider(XDocument xml)
{
if (xml.Document == null) {
throw new ArgumentException("No Document found");
}
Navigator = xml.Document.CreateNavigator();
Manager = new XmlNamespaceManager(Navigator.NameTable ?? new NameTable());
Helper = new XPathHelper(ExecutionMode.Declaration);
Manager.AddNamespace(Constants.XML.DeclarationNSPrefix, Constants.XML.VectoDeclarationDefinitionsNS);
Manager.AddNamespace(Constants.XML.RootNSPrefix, Constants.XML.VectoDeclarationComponentNS);
XBasePath = Helper.Query(Helper.NSPrefix(XMLNames.VectoInputDeclaration, Constants.XML.RootNSPrefix),
Helper.NSPrefix(XMLNames.Component_AirDrag, Constants.XML.RootNSPrefix),
XMLNames.ComponentDataWrapper);
SourceType = DataSourceType.Embedded;
}
public new CertificationMethod CertificationMethod
{
get { return CertificationMethod.Measured; }
......
......@@ -29,11 +29,17 @@
* Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology
*/
using System;
using System.Xml;
using System.Xml.Linq;
using System.Xml.XPath;
using TUGraz.IVT.VectoXML;
using TUGraz.VectoCommon.Exceptions;
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Resources;
using TUGraz.VectoCore.Configuration;
using TUGraz.VectoCore.Utils;
namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration
{
......@@ -47,6 +53,23 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration
XMLNames.ComponentDataWrapper);
}
public XMLDeclarationAngledriveDataProvider(XDocument xml)
{
if (xml.Document == null) {
throw new ArgumentException("No Document found");
}
Navigator = xml.Document.CreateNavigator();
Manager = new XmlNamespaceManager(Navigator.NameTable ?? new NameTable());
Helper = new XPathHelper(ExecutionMode.Declaration);
Manager.AddNamespace(Constants.XML.DeclarationNSPrefix, Constants.XML.VectoDeclarationDefinitionsNS);
Manager.AddNamespace(Constants.XML.RootNSPrefix, Constants.XML.VectoDeclarationComponentNS);
XBasePath = Helper.Query(Helper.NSPrefix(XMLNames.VectoInputDeclaration, Constants.XML.RootNSPrefix),
Helper.NSPrefix(XMLNames.Component_Angledrive, Constants.XML.RootNSPrefix),
XMLNames.ComponentDataWrapper);
SourceType = DataSourceType.Embedded;
}
public AngledriveType Type
{
get { return InputData.XMLJob.XMLVehicle.AngulargearType; }
......
......@@ -29,12 +29,18 @@
* Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology
*/
using System;
using System.Xml;
using System.Xml.Linq;
using System.Xml.XPath;
using TUGraz.IVT.VectoXML;
using TUGraz.VectoCommon.Exceptions;
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Resources;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.Configuration;
using TUGraz.VectoCore.Utils;
namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration
{
......@@ -49,6 +55,23 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration
XMLNames.ComponentDataWrapper);
}
public XMLDeclarationAxlegearDataProvider(XDocument xml)
{
if (xml.Document == null) {
throw new ArgumentException("No Document found");
}
Navigator = xml.Document.CreateNavigator();
Manager = new XmlNamespaceManager(Navigator.NameTable ?? new NameTable());
Helper = new XPathHelper(ExecutionMode.Declaration);
Manager.AddNamespace(Constants.XML.DeclarationNSPrefix, Constants.XML.VectoDeclarationDefinitionsNS);
Manager.AddNamespace(Constants.XML.RootNSPrefix, Constants.XML.VectoDeclarationComponentNS);
XBasePath = Helper.Query(Helper.NSPrefix(XMLNames.VectoInputDeclaration, Constants.XML.RootNSPrefix),
Helper.NSPrefix(XMLNames.Component_Axlegear, Constants.XML.RootNSPrefix),
XMLNames.ComponentDataWrapper);
SourceType = DataSourceType.Embedded;
}
public double Ratio
{
get { return GetDoubleElementValue(XMLNames.Axlegear_Ratio); }
......
......@@ -30,11 +30,16 @@
*/
using System;
using System.Xml;
using System.Xml.Linq;
using System.Xml.XPath;
using TUGraz.IVT.VectoXML;
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Resources;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.Configuration;
using TUGraz.VectoCore.Utils;
namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration
{
......@@ -50,6 +55,23 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration
XMLNames.ComponentDataWrapper);
}
public XMLDeclarationEngineDataProvider(XDocument xml)
{
if (xml.Document == null) {
throw new ArgumentException("No Document found");
}
Navigator = xml.Document.CreateNavigator();
Manager = new XmlNamespaceManager(Navigator.NameTable ?? new NameTable());
Helper = new XPathHelper(ExecutionMode.Declaration);
Manager.AddNamespace(Constants.XML.DeclarationNSPrefix, Constants.XML.VectoDeclarationDefinitionsNS);
Manager.AddNamespace(Constants.XML.RootNSPrefix, Constants.XML.VectoDeclarationComponentNS);
XBasePath = Helper.Query(Helper.NSPrefix(XMLNames.VectoInputDeclaration, Constants.XML.RootNSPrefix),
Helper.NSPrefix(XMLNames.Component_Engine, Constants.XML.RootNSPrefix),
XMLNames.ComponentDataWrapper);
SourceType = DataSourceType.Embedded;
}
public CubicMeter Displacement
{
get { return GetDoubleElementValue(XMLNames.Engine_Displacement).SI(Unit.SI.Cubic.Centi.Meter).Cast<CubicMeter>(); }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment