public string SendIndicatorToServer(string solutionPath) { var indicatorName = Path.GetFileNameWithoutExtension(solutionPath); var DLLs = GetCompressedScriptingDlls(Path.GetDirectoryName(solutionPath)); if (!DLLs.ContainsKey(indicatorName + ".dll")) { return($"Failed to locate or compress {indicatorName} libraries"); } if (Indicators.ContainsKey(indicatorName)) { Indicators.Remove(indicatorName); ScriptingListUpdated?.Invoke(); IndicatorInstanceRemoved?.Invoke(this, new EventArgs <string>(indicatorName)); } _connector.Send(new SaveScriptingDataRequest { Files = DLLs, Path = indicatorName, RequestID = Guid.NewGuid().ToString(), ScriptingType = ScriptingType.Indicator }); return(String.Empty); }
public void RemoveIndicatorFromServer(string name) { Indicators.Remove(name); _connector.Send(new RemoveScriptingInstanceRequest { Name = name, ScriptingType = ScriptingType.Indicator, RemoveProject = true }); ScriptingListUpdated?.Invoke(); IndicatorInstanceRemoved?.Invoke(this, new EventArgs <string>(name)); }