Beispiel #1
0
        private bool disposedValue = false; // To detect redundant calls

        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (disposing)
                {
                    JavaProvider.Dispose();
                }
                disposedValue = true;
            }
        }
Beispiel #2
0
 protected void RegenerateScript(string scriptPath, CodeCompileUnit targetCodeUnit, CodeGeneratorOptions options)
 {
     try
     {
         new FileInfo(scriptPath).Directory.Create();
         using (StreamWriter sourceWriter = new StreamWriter(scriptPath))
         {
             JavaProvider.GenerateCodeFromCompileUnit(targetCodeUnit, sourceWriter, options);
         }
     }
     catch (Exception ex)
     {
         Log.Error(ex, $"Couldnt generate code for file. Make sure it's not accesed by any process. {scriptPath}", true);
     }
 }