Exemplo n.º 1
0
            public TmsDocumentation(string tmsRiskName, string rootPath)
            {
                TmsRiskType tmsRiskType = TmsRiskType.Unknown;

                // Try to identify the appropriate memeber of the TMS Risk Type enumeration
                try
                {
                    tmsRiskType =
                        _riskEngineName.Where(m => String.Compare(m.Value, tmsRiskName, true /* ignore case */) == 0)
                        .First()
                        .Key;
                }
                catch (Exception)
                {
                    Console.WriteLine("TMS Risk Name \"{0}\" is not known", tmsRiskName);
                    throw;
                }
                Initialise(tmsRiskType, rootPath);
            }
Exemplo n.º 2
0
            private void Initialise(TmsRiskType tmsRiskType, string rootPath)
            {
                _tmsRiskType = tmsRiskType;

                if (rootPath.Substring(rootPath.Length - 1) != "\\")
                {
                    rootPath = rootPath.ToUpper() + "\\";
                }
                _rootPath = rootPath;
                try
                {
                    _riskEngineFullPath = Path.Combine(rootPath, _riskEngineRelativePath[tmsRiskType]);
                    _riskDataFullPath   = Path.Combine(rootPath, _riskDataRelativePath[tmsRiskType]);
                }
                catch (Exception)
                {
                    Console.WriteLine("Unexpected Risk Type \"{0}\"", Enum.GetName(typeof(TmsRiskType), tmsRiskType));
                    throw;
                }
                Console.WriteLine("Path to {0} PremCalc is \"{1}\"", _riskEngineName[tmsRiskType], _riskEngineFullPath);
                Console.WriteLine("Path to {0} TMS is \"{1}\"", _riskEngineName[tmsRiskType], _riskDataFullPath);
            }
Exemplo n.º 3
0
 public TmsDocumentation(TmsRiskType tmsRiskType, string rootPath)
 {
     Initialise(tmsRiskType, rootPath);
 }