public SolutionLogComponent() { mifnexsoEntities = new MIFNEXSOEntities(); solutionLog = new SolutionLog(); solutionLog.SolutionLogId = Guid.Empty; solutionLog.SolutionId = Guid.NewGuid(); mifnexsoEntities.SolutionLogs.AddObject(solutionLog); }
internal PhraseAgentWebConsole(OutputRecognitionAlgorithm algorithm, VoteContainer <object> knowledge, bool exportKnowledge, bool useKnowledge, SolutionLog log) { _algorithm = algorithm; _knowledge = knowledge; _useKnowledge = useKnowledge; _exportKnowledge = exportKnowledge; _log = log; }
internal SolutionLog GetSolution(string experimentId, int taskId) { var key = Tuple.Create(experimentId, taskId); SolutionLog log; if (!_taskToSolution.TryGetValue(key, out log)) { var experiment = Experiments.Get(experimentId); if (experiment == null) { return(null); } _taskToSolution[key] = log = new SolutionLog(this, experiment, taskId); } return(log); }
public SolutionLogComponent(Guid solutionLogId) { if (solutionLogId != Guid.Empty) { mifnexsoEntities = new MIFNEXSOEntities(); try { solutionLog = mifnexsoEntities.SolutionLogs.FirstOrDefault(a => a.SolutionLogId == solutionLogId); if (solutionLog == null) { solutionLog = new SolutionLog(); solutionLog.SolutionLogId = Guid.Empty; mifnexsoEntities.SolutionLogs.AddObject(solutionLog); } } catch (Exception) { throw; } } }