コード例 #1
0
 public OrientationController(IQueryBuilder queryBuilder, ICharacterizer <Entrant> entrantCharacterizer,
                              IInfoExtractor infoExtractor)
 {
     _queryBuilder         = queryBuilder;
     _entrantCharacterizer = entrantCharacterizer;
     _infoExtractor        = infoExtractor;
 }
コード例 #2
0
 public OlympiadController(IQueryBuilder queryBuilder, ICommandBuilder commandBuilder,
                           IInfoExtractor infoExtractor)
 {
     _queryBuilder   = queryBuilder;
     _commandBuilder = commandBuilder;
     _infoExtractor  = infoExtractor;
 }
コード例 #3
0
ファイル: YoutubeDL.cs プロジェクト: java4fun/YoutubeDL-NET
 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);
     }
 }
コード例 #4
0
 public UnitedStateExamsController(IQueryBuilder queryBuilder, ICommandBuilder commandBuilder,
                                   IInfoExtractor infoExtractor)
 {
     _queryBuilder   = queryBuilder;
     _commandBuilder = commandBuilder;
     _infoExtractor  = infoExtractor;
 }
コード例 #5
0
 public SchoolMarkController(IQueryBuilder queryBuilder, ICommandBuilder commandBuilder,
                             IInfoExtractor infoExtractor)
 {
     _queryBuilder   = queryBuilder;
     _commandBuilder = commandBuilder;
     _infoExtractor  = infoExtractor;
 }
コード例 #6
0
 public RecomendationsController(
     IQueryBuilder queryBuilder,
     IDistanceRecomendator <Entrant, EducationLine> distanceRecomendator,
     IMulticriterialAnalysisRecomendator multicriterialAnalysisRecomendator,
     IInfoExtractor infoExtractor)
 {
     _queryBuilder         = queryBuilder;
     _distanceRecomendator = distanceRecomendator;
     _multicriterialAnalysisRecomendator = multicriterialAnalysisRecomendator;
     _infoExtractor = infoExtractor;
 }
コード例 #7
0
        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");
            }
        }