public OrientationController(IQueryBuilder queryBuilder, ICharacterizer <Entrant> entrantCharacterizer, IInfoExtractor infoExtractor) { _queryBuilder = queryBuilder; _entrantCharacterizer = entrantCharacterizer; _infoExtractor = infoExtractor; }
public OlympiadController(IQueryBuilder queryBuilder, ICommandBuilder commandBuilder, IInfoExtractor infoExtractor) { _queryBuilder = queryBuilder; _commandBuilder = commandBuilder; _infoExtractor = infoExtractor; }
internal static void AddDefaultExtraInfo(InfoDict infoDict, IInfoExtractor ie, string url) { if (Uri.TryCreate(url, UriKind.Absolute, out Uri result)) { var dict = new Dictionary <string, object>() { { "extractor", ie.GetType().Name }, { "extractor_key", ie.Name }, { "webpage_url", url }, { "webpage_url_basename", result.AbsolutePath } }; infoDict.AddExtraInfo(dict, false); } else { var dict = new Dictionary <string, object>() { { "extractor", ie.GetType().Name }, { "extractor_key", ie.Name }, { "webpage_url", url }, { "webpage_url_basename", url } }; infoDict.AddExtraInfo(dict, false); } }
public UnitedStateExamsController(IQueryBuilder queryBuilder, ICommandBuilder commandBuilder, IInfoExtractor infoExtractor) { _queryBuilder = queryBuilder; _commandBuilder = commandBuilder; _infoExtractor = infoExtractor; }
public SchoolMarkController(IQueryBuilder queryBuilder, ICommandBuilder commandBuilder, IInfoExtractor infoExtractor) { _queryBuilder = queryBuilder; _commandBuilder = commandBuilder; _infoExtractor = infoExtractor; }
public RecomendationsController( IQueryBuilder queryBuilder, IDistanceRecomendator <Entrant, EducationLine> distanceRecomendator, IMulticriterialAnalysisRecomendator multicriterialAnalysisRecomendator, IInfoExtractor infoExtractor) { _queryBuilder = queryBuilder; _distanceRecomendator = distanceRecomendator; _multicriterialAnalysisRecomendator = multicriterialAnalysisRecomendator; _infoExtractor = infoExtractor; }
public void OnGenerate() { try { IInfoExtractor extractor = null; switch (SelectedAccessorType) { case "MsSql": extractor = new MsSqlInfoExtractor(CString); break; case "SqLite": extractor = new SqLiteInfoExtractor(CString); break; } if (extractor != null) { var writables = (TableFilter ?? "").Split(',') .Where(f => !String.IsNullOrWhiteSpace(f)) .Select(f => f.Trim()) .ToArray(); var readables = (ReadOnlyTableFilter ?? "").Split(',') .Where(f => !String.IsNullOrWhiteSpace(f)) .Select(f => f.Trim()) .ToArray(); var writableInfo = extractor.GetDatabaseMetadata(writables); var readableInfo = extractor.GetDatabaseMetadata(readables); var fileWriter = new FileWriter(); var entityWriter = new EntityWriter(); var typeWriter = new TypeWriter(); var output = fileWriter.WriteHeader(Namespace); output += entityWriter.Execute(AppName, Namespace, UseLinq, LessChanges, WriteSchema, ScriptDefaults, UseUnspecified, writableInfo); output += typeWriter.Execute(readableInfo); output += fileWriter.WriteFooter(); Output = output; OnPropertyChanged("Output"); } } catch (Exception e) { Output = e.StackTrace; OnPropertyChanged("Output"); } }