public bool Save() { try { if (_hasSaved) { return(true); } XIMMappingHelper.GenerateTargetFieldName(Config.Messages); using (StreamWriter sw = File.CreateText(FileName)) { string str = Config.ToXMLString(); str = XMLHeader + str; sw.Write(str); } XIMMappingHelper.ClearMapping(Config.Messages); XIMMappingHelper.SaveXSLFiles(Config.Messages, Config.SocketConfig); _hasSaved = true; return(true); } catch (Exception e) { Program.Log.Write(e); _lastError = e; return(false); } }
public bool Initialize(string[] arguments) { Program.PreLoading(); Program.Log.Write(Program.AppName + " is running in Adapter.Service host."); if (arguments != null && arguments.Length > 0) { string str = arguments[0]; //Program.Log.Write("GWDataDB connection: " + str); //contains db pw Program.ConfigMgt.Config.GWDataDBConnection = str; } XIMMappingHelper.ClearMapping(Program.ConfigMgt.Config.Messages); return(true); }