예제 #1
0
 public void Initialize(string workingDirPath, string[] arguments)
 {
     if (_insertedOpenDAModelProvider == null)
     {
         _openDAModelProvider = Utils.CreateOpenDaModelProviderInstance(arguments[0], typeof(IOpenDaModelProvider));
     }
     else
     {
         // Model factory already set. Check class name
         if (!_insertedOpenDAModelProvider.GetType().ToString().Equals(arguments[0]))
         {
             throw new Exception(String.Format("Inserted OpenDAModelProvider {0} is not of the type specified in the OpenDA config file {1}",
                                               _insertedOpenDAModelProvider.GetType(), arguments[0]));
         }
         _openDAModelProvider = _insertedOpenDAModelProvider;
     }
 }