/// <summary>
        /// Create messageReader accroding to file extension
        /// </summary>
        /// <param name="CaptureFile">Capture file path</param>
        /// <returns></returns>
        IMessageReader CreateMessageReader(string CaptureFile)
        {
            IMessageReader reader = null;
            //Create and Initialize Message Meta data loader catalog
            MessageMetadataLoaderCatalog messageMetadataLoaderCatalog = new MessageMetadataLoaderCatalog();

            messageMetadataLoaderCatalog.Initialize(monitor.Settings.ExtensionLoadPath);

            if (PersistUtils.IsUnparsedProjectFile(CaptureFile))
            {
                //If capture file is an uncompressed project file
                reader = FileMessageReader.CreateReaderFromProjectFile(CaptureFile, messageMetadataLoaderCatalog);
            }
            else if (PersistUtils.IsCompressedUnparsedProjectFile(CaptureFile) || PersistUtils.IsCompressedProjectFile(CaptureFile))
            {
                //If capture file is a compressed project file
                reader = FileMessageReader.CreateReaderFromCompressedFile(CaptureFile, messageMetadataLoaderCatalog);
            }
            else
            {
                //other file type, such as netmon capture file
                FileReaderCatalog fileReaderCatalog = new FileReaderCatalog();
                fileReaderCatalog.Initialize(monitor.Settings.ExtensionLoadPath);
                IFileLoader fileLoader = fileReaderCatalog.GetRegisteredFileLoaders(CaptureFile).First();
                reader = fileLoader.OpenFile(CaptureFile, fileLoader.CreateDefaultConfig(null));
            }
            return(reader);
        }
Exemplo n.º 2
0
        // POST
        public async Task <Attendee> IdentifyProfile(IEnumerable <Attendee> people, AudioFile file, bool shortAudio = false)
        {
            // Request parameters
            try {
                string profileIds = "";

                foreach (Attendee a in people)
                {
                    profileIds += "," + a.ProfileID;
                }
                var url = string.Format(IndentifyProfileURL, profileIds, shortAudio);

                HttpResponseMessage response;

                // Request body
                IFileLoader loader   = DependencyService.Get <IFileLoader>();
                Stream      byteData = loader.LoadFile(file.FileName);

                using (var content = new StreamContent(byteData)) {
                    content.Headers.ContentType = octetMedia;
                    response = await client.PostAsync(url, content);
                }

                var body = await response.Content.ReadAsStringAsync();

                Debug.WriteLine(body); // Need get
            } catch (Exception e) {
                Debug.WriteLine(e);
            }
            return(null);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Registers a file loader with the selector
 /// </summary>
 /// <param name="fileLoader"></param>
 public void Register(IFileLoader fileLoader)
 {
     if (fileLoader != null)
     {
         _fileLoaders.Add(fileLoader);
     }
 }
Exemplo n.º 4
0
        public LoaderManager(IFileLoader loader, LoaderExtension ext)
        {
            Instance = loader;
            m_Ext    = ext;

            m_Ext.RequestPreLoadFile += OnRequestPreLoadFile;
        }
Exemplo n.º 5
0
        public static IEnumerable <Animation> LoadAnimationGroup(Resource resource, IFileLoader fileLoader)
        {
            var data = resource.DataBlock.AsKeyValueCollection();

            // Get the key to decode the animations
            var decodeKey = data.GetSubCollection("m_decodeKey");

            var animationList = new List <Animation>();

            if (resource.ContainsBlockType(BlockType.ANIM))
            {
                var animBlock = (KeyValuesOrNTRO)resource.GetBlockByType(BlockType.ANIM);
                animationList.AddRange(Animation.FromData(animBlock.Data, decodeKey));
                return(animationList);
            }

            // Get the list of animation files
            var animArray = data.GetArray <string>("m_localHAnimArray").Where(a => !string.IsNullOrEmpty(a));

            // Load animation files
            foreach (var animationFile in animArray)
            {
                animationList.AddRange(LoadAnimationFile(animationFile, decodeKey, fileLoader));
            }

            return(animationList);
        }
Exemplo n.º 6
0
        public override void DownloadUpdate(IFileLoader fileLoader)
        {
            byte[] buffer = new byte[0xffff];
            long currentPosition = UpdateSetup.Position;

            UpdateSetup.Seek(0, SeekOrigin.Begin);

            long allBytes = 0;
            while (allBytes < UpdateSetup.Length)
            {
                int readBytes = UpdateSetup.Read(buffer, 0, 0xffff);
                if (readBytes == 0)
                    break;

                lock (fileLoader)
                {
                    fileLoader.SendBytes(buffer);
                    fileLoader.Percent = (100d * allBytes / UpdateSetup.Length);
                }

                allBytes += readBytes;
            }

            UpdateSetup.Position = currentPosition;

            if (allBytes < UpdateSetup.Length)
                throw new IOException("Error while copy UpdateSetup: Cannot copy all bytes from source!");
        }
        public FileSubstitutionsProvider(string file, IFileLoader fileLoader)
        {
            Console.WriteLine($"New file substitution provider in {file} using {fileLoader} loader");
            if (!File.Exists(file))
            {
                throw new FileNotFoundException($"File does not exist: {file}");
            }
            this.fileLoader = fileLoader;
            this.file       = file;
            var fileName = Path.GetFileName(file);
            var filePath = Path.GetDirectoryName(file);

            watcher = new FileSystemWatcher(filePath, fileName);
            var changeLock = new Object();
            var lastChange = DateTime.Now;

            watcher.Changed += async(object source, FileSystemEventArgs e) =>
            {
                if (this.OnSubstitutionsUpdated != null &&
                    DateTime.Now.Subtract(lastChange).TotalMilliseconds > 1100) // Sometimes 2 events get triggered for same change
                {
                    lastChange = DateTime.Now;
                    Thread.Sleep(1000);
                    var substitutions = await fileLoader.loadFileAsync(file);
                    await OnSubstitutionsUpdated(substitutions);
                }
            };
            watcher.EnableRaisingEvents = true;
        }
Exemplo n.º 8
0
        public MatchDayController(ILogger <MatchDayController> logger, IFileLoader fileloader)
        {
            _logger     = logger;
            _fileloader = fileloader;

            Load(@"2019.json").Wait();
        }
        public void CreatingWixDocumentWithNullFileLoaderThrowsArgumentNullException()
        {
            IFileLoader fileLoader = null;
            WixProject  project    = WixBindingTestsHelper.CreateEmptyWixProject();

            Assert.Throws <ArgumentNullException>(delegate { WixDocument doc = new WixDocument(project, fileLoader); });
        }
Exemplo n.º 10
0
 public Loader(IFileLoader fileLoader, IHostingEnvironment hostingEnvironment, BaseContext.Context context, ICustomLogger logger)
 {
     _fileLoader         = fileLoader;
     _hostingEnvironment = hostingEnvironment;
     _context            = context;
     _logger             = logger;
 }
Exemplo n.º 11
0
        /// <summary>
        /// Loads a score synchronously from the given datasource
        /// </summary>
        /// <param name="path">the source path to load the binary file from</param>
        /// <returns></returns>
        public static Score LoadScore(string path)
        {
            IFileLoader loader = Environment.FileLoaders["default"]();
            var         data   = loader.LoadBinary(path);

            return(LoadScoreFromBytes(data));
        }
Exemplo n.º 12
0
        public override void Register()
        {
            RegisterLoader();
            RegisterSelector();

            App.Singleton <Translator>().Alias <ITranslator>().Alias("translation").Resolving((app, bind, obj) => {
                IConfigStore config = app.Make <IConfigStore>();
                Translator tran     = obj as Translator;

                IFileLoader loader = app.Make("translation.loader") as IFileLoader;
                ISelector selector = app.Make("translation.selector") as ISelector;

                tran.SetFileLoader(loader);
                tran.SetSelector(selector);

                if (config != null)
                {
                    tran.SetLocale(config.Get(typeof(Translator), "default", "zh"));
                    tran.SetRoot(config.Get(typeof(Translator), "root", null));
                    tran.SetFallback(config.Get(typeof(Translator), "fallback", null));
                }

                return(obj);
            });
        }
Exemplo n.º 13
0
        // POST
        public async Task <bool> EnrolProfile(Attendee person, AudioFile file, bool shortAudio = false)
        {
            Debug.WriteLine("Enrol a Profile");
            try {
                var url = string.Format(EnrollProfileURL, person.ProfileID, shortAudio);

                HttpResponseMessage response;

                // Request body
                IFileLoader loader   = DependencyService.Get <IFileLoader>();
                Stream      byteData = loader.LoadFile(file.FileName);

                using (var content = new StreamContent(byteData)) {
                    content.Headers.ContentType = octetMedia;
                    response = await client.PostAsync(url, content);
                }

                if (!response.IsSuccessStatusCode)
                {
                    var body = await response.Content.ReadAsStringAsync();

                    Debug.WriteLine(body);
                }
                return(response.IsSuccessStatusCode);
            } catch (Exception e) {
                Debug.WriteLine(e);
            }
            return(false);
        }
Exemplo n.º 14
0
    private void InitializeEquipmentNameStrs()
    {
        ConfigDatabase.DelayLoadFileDelegate delayLoadFileDel = ConfigDelayLoader.DelayLoadConfig;
        string          str        = "";
        int             fileFormat = 0;
        IFileLoader     fileLoader = delayLoadFileDel(typeof(EquipmentConfig), out str, out fileFormat);
        EquipmentConfig config1    = ConfigDatabase.LoadConfig <EquipmentConfig>(ConfigDatabase.DefaultCfg, fileLoader, fileFormat, str);

        config1.GetType();
        //int weaponCount = 0;
        //for (int i = 0; i < ConfigDatabase.DefaultCfg.EquipmentConfig.equipments.Count; i++)
        //{
        //    EquipmentConfig.Equipment equipmentCfg = ConfigDatabase.DefaultCfg.EquipmentConfig.equipments[i];
        //    if (equipmentCfg.type == EquipmentConfig._Type.Weapon)
        //    {
        //        weaponCount++;
        //    }
        //}
        //equipmentStrs = new string[weaponCount];
        //equipmentIds = new int[weaponCount];
        //for (int i = 0; i < ConfigDatabase.DefaultCfg.EquipmentConfig.equipments.Count; i++)
        //{
        //    EquipmentConfig.Equipment equipmentCfg = ConfigDatabase.DefaultCfg.EquipmentConfig.equipments[i];
        //    if (equipmentCfg.type == EquipmentConfig._Type.Weapon)
        //    {
        //        string name = ItemInfoUtility.GetAssetName(equipmentCfg.id);
        //        equipmentIds[i] = equipmentCfg.id;
        //        equipmentStrs[i] = name;
        //    }
        //}
    }
Exemplo n.º 15
0
 public DishRepository(CanteenDbContext context, ICategoryRepository repoCtg,
                       IFileLoader file)
 {
     _context = context;
     _repoCtg = repoCtg;
     _file    = file;
 }
 void LoadNodes(IFileLoader loader)
 {
     using (var reader = loader.GetReader())
     {
         var nodes = XmlReaderUtils.EnumerateAxis(reader, new[] { "Node", "ArticleGroup" });
     }
 }
Exemplo n.º 17
0
        public override void DownloadUpdate(IFileLoader fileLoader)
        {
            byte[] buffer          = new byte[0xffff];
            long   currentPosition = UpdateSetup.Position;

            UpdateSetup.Seek(0, SeekOrigin.Begin);

            long allBytes = 0;

            while (allBytes < UpdateSetup.Length)
            {
                int readBytes = UpdateSetup.Read(buffer, 0, 0xffff);
                if (readBytes == 0)
                {
                    break;
                }

                lock (fileLoader)
                {
                    fileLoader.SendBytes(buffer);
                    fileLoader.Percent = (100d * allBytes / UpdateSetup.Length);
                }

                allBytes += readBytes;
            }

            UpdateSetup.Position = currentPosition;

            if (allBytes < UpdateSetup.Length)
            {
                throw new IOException("Error while copy UpdateSetup: Cannot copy all bytes from source!");
            }
        }
Exemplo n.º 18
0
 public Transformer(IHostingEnvironment hostingEnvironment, ILoader loader, IFileLoader fileLoader)
 {
     _hostingEnvironment = hostingEnvironment;
     _loaderService      = loader;
     _fileLoader         = fileLoader;
     _jsonConfig         = GenerateJson();
 }
Exemplo n.º 19
0
        /// <summary>
        /// Creates a new instance of <see cref="PluginManager"/>.
        /// </summary>
        /// <param name="progress">The progress context for plugin processes.</param>
        /// <param name="dialogManager">The dialog manager for plugin processes.</param>
        /// <param name="pluginPaths">The paths to search for plugins.</param>
        public PluginManager(IProgressContext progress, IDialogManager dialogManager, params string[] pluginPaths)
        {
            ContractAssertions.IsNotNull(progress, nameof(progress));
            ContractAssertions.IsNotNull(dialogManager, nameof(dialogManager));

            // 1. Setup all necessary instances
            _filePluginLoaders  = new IPluginLoader <IFilePlugin>[] { new CsFilePluginLoader(pluginPaths) };
            _gameAdapterLoaders = new IPluginLoader <IGameAdapter>[] { new CsGamePluginLoader(pluginPaths) };

            _progress      = progress;
            _dialogManager = dialogManager;

            LoadErrors = _filePluginLoaders.SelectMany(pl => pl.LoadErrors ?? Array.Empty <PluginLoadError>())
                         .Concat(_gameAdapterLoaders.SelectMany(pl => pl.LoadErrors ?? Array.Empty <PluginLoadError>()))
                         .DistinctBy(e => e.AssemblyPath)
                         .ToList();

            _streamMonitor = new StreamMonitor();

            _fileLoader = new FileLoader(_filePluginLoaders);
            _fileSaver  = new FileSaver(_streamMonitor, dialogManager);

            _fileLoader.OnManualSelection += FileLoader_OnManualSelection;

            _loadedFiles = new List <IStateInfo>();
        }
Exemplo n.º 20
0
 public Executor(IUserInterface userInterface, IFileLoader fileLoader, IDataTransformer dataTransformer, IPrecipitationRepository precipitationRepository)
 {
     _fileLoader              = fileLoader;
     _userInterface           = userInterface;
     _dataTransformer         = dataTransformer;
     _precipitationRepository = precipitationRepository;
 }
Exemplo n.º 21
0
 public HocrService(
     IRepository repository, IFileLoader fileLoader, IHocrParser hocrParser, IHocrMapper hocrMapper)
 {
     _repository = repository ?? throw new ArgumentNullException(nameof(repository));
     _fileLoader = fileLoader ?? throw new ArgumentNullException(nameof(fileLoader));
     _hocrParser = hocrParser ?? throw new ArgumentNullException(nameof(hocrParser));
     _hocrMapper = hocrMapper ?? throw new ArgumentNullException(nameof(hocrMapper));
 }
Exemplo n.º 22
0
 public void AddSqlLoader(IFileLoader sqlLoader)
 {
     if (this.GetSqlLoader(sqlLoader.GetName()) != null)
     {
         throw new DuplicateNameException("Sql Loader is already exists.");
     }
     this.SqlLoader.Add(sqlLoader);
 }
Exemplo n.º 23
0
 public FileOpenerService(IOpenedFileService openedFileService, ILoggerFactory loggerFactory, IAppSettings appSettings, IFileLoader fileLoader, IBackgroundTaskService backgroundTaskService)
 {
     _openedFileService     = openedFileService ?? throw new ArgumentNullException(nameof(openedFileService));
     _appSettings           = appSettings ?? throw new ArgumentNullException(nameof(appSettings));
     _fileLoader            = fileLoader ?? throw new ArgumentNullException(nameof(fileLoader));
     _backgroundTaskService = backgroundTaskService ?? throw new ArgumentNullException(nameof(backgroundTaskService));
     _logger = loggerFactory.CreateLogger(this.GetType());
 }
Exemplo n.º 24
0
        static void Main(string[] args)
        {
            IFileLoader loader  = resolver.Get <IFileLoader>();
            IXmlManager manager = resolver.Get <IXmlManager>();

            manager.LoadUrls(loader);
            manager.WriteToXmlFile("xml.txt");
        }
Exemplo n.º 25
0
 public TwitterLoadCommand(ILogger <TwitterLoadCommand> log, TwitterLoadConfig config, IRedisPersistency persistency, IFileLoader fileLoader)
 {
     this.log         = log ?? throw new ArgumentNullException(nameof(log));
     this.config      = config ?? throw new ArgumentNullException(nameof(config));
     this.persistency = persistency ?? throw new ArgumentNullException(nameof(persistency));
     this.fileLoader  = fileLoader ?? throw new ArgumentNullException(nameof(fileLoader));
     jsonConvert      = TweetinviContainer.Resolve <IJsonObjectConverter>();
 }
Exemplo n.º 26
0
 public void AddSqlLoader(IFileLoader sqlLoader)
 {
     if (this.GetSqlLoader(sqlLoader.GetName()) != null)
     {
         throw new DuplicateNameException("Sql Loader is already exists.");
     }
     this.SqlLoader.Add(sqlLoader);
 }
Exemplo n.º 27
0
 public EtlController(ICustomLogger logger, IExtractor extractor, ITransformer transformer, ILoader loader, IHostingEnvironment hostingEnvironment, IFileLoader fileLoader)
 {
     _logger             = logger;
     _extractor          = extractor;
     _transformer        = transformer;
     _loader             = loader;
     _hostingEnvironment = hostingEnvironment;
     _fileLoader         = fileLoader;
 }
Exemplo n.º 28
0
        public void RemoveSqlLoader(string name)
        {
            IFileLoader sqlLoader = this.GetSqlLoader(name);

            if (sqlLoader != null)
            {
                this.SqlLoader.Remove(sqlLoader);
            }
        }
Exemplo n.º 29
0
        public void LoadConfig <T>(IFileLoader fileLoader, ConfigSetting cfgSetting) where T : Configuration, new()
        {
            T local = LoadConfig <T>(this, fileLoader, cfgSetting.FileFormat, cfgSetting.GetConfigName(typeof(T)));

            if (local != null)
            {
                this.configurations[typeof(T)] = local;
            }
        }
        public void AddFileLoader(IFileLoader fileLoader)
        {
            if (fileLoader == null)
            {
                throw new ArgumentNullException();
            }

            this.fileLoaders.Add(fileLoader);
        }
 public ParserService(
     IFileLoader<T> fileLoader, 
     IFileStorage<U> fileStorage, 
     IParser<T, U> parser) 
 {
     this.fileLoader = fileLoader ?? throw new ArgumentNullException(nameof(fileLoader));
     this.fileStorage = fileStorage ?? throw new ArgumentNullException(nameof(fileStorage));
     this.parser = parser ?? throw new ArgumentNullException(nameof(parser));
 }
Exemplo n.º 32
0
 public Documenter(IFileLoader fl, ISourceCodeParser dp, IDocGenerator gen, IOutputWriter ow, ILogger <Documenter> logger)
 {
     this.loader     = fl;
     this.parser     = dp;
     this.generator  = gen;
     this.writer     = ow;
     this.OutputDocs = null;
     this.logger     = logger;
 }
Exemplo n.º 33
0
 public CodeBase(CompilerDefines compilerDefines, IFileLoader fileLoader)
 {
     _compilerDefines = compilerDefines;
     _fileLoader      = fileLoader;
     _errors          = new Dictionary <string, NamedContent <Exception> >(StringComparer.InvariantCultureIgnoreCase);
     _parsedFiles     = new Dictionary <string, NamedContent <AstNode> >(StringComparer.InvariantCultureIgnoreCase);
     _projects        = new Dictionary <string, NamedContent <AstNode> >(StringComparer.InvariantCultureIgnoreCase);
     _units           = new Dictionary <string, NamedContent <UnitNode> >(StringComparer.InvariantCultureIgnoreCase);
 }
Exemplo n.º 34
0
        public PreviewLoader(
            IFileLoader fileLoader,
            IPreviewCache previewCache)
        {
            _fileLoader = fileLoader;
            _cache      = previewCache;

            _locker = new object();
        }
Exemplo n.º 35
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Host"/> class.
        /// </summary>
        /// <param name="transformer">The transformer.</param>
        /// <param name="pathResolver">The path resolver.</param>
        /// <param name="fileLoader">The file loader.</param>
        internal Host(ITextTransformer transformer, IPathResolver pathResolver, IFileLoader fileLoader)
        {
            if (transformer == null) throw new ArgumentNullException("transformer");
            if (pathResolver == null) throw new ArgumentNullException("pathResolver");
            if (fileLoader == null) throw new ArgumentNullException("fileLoader");

            _transformer = transformer;
            _pathResolver = pathResolver;
            _fileLoader = fileLoader;
        }
Exemplo n.º 36
0
		/// <summary>
		/// Creates a new WixDialogDesignerLoader that will load the specified
		/// dialog id from the Wix xml.
		/// </summary>
		public WixDialogDesignerLoader(IWixDialogDesigner designer, IWixDialogDesignerGenerator generator = null, IFileLoader fileLoader = null)
		{
			if (designer == null) {
				throw new ArgumentNullException("designer");
			}
			
			this.designer = designer;
			this.generator = generator ?? new WixDialogDesignerGenerator(designer);
			this.fileLoader = fileLoader ?? new DefaultFileLoader();
		}
Exemplo n.º 37
0
		/// <summary>
		/// Creates a new instance of the WixDocument class but overrides the 
		/// default file loading functionality of the WixDocument. 
		/// </summary>
		public WixDocument(WixProject project, IFileLoader fileLoader)
		{
			this.project = project;
			this.fileLoader = fileLoader;
			
			if (fileLoader == null) {
				throw new ArgumentNullException("fileLoader");
			}
			
			namespaceManager = new WixNamespaceManager(NameTable);			
		}
Exemplo n.º 38
0
        public JsonRuleContainer(JsonSerializer serializer, string fileLocation, IFileLoader fileLoader)
        {
            var content = fileLoader.ReadAsString(fileLocation);
            
            var result = JsonConvert.DeserializeObject<JObject>(content);

            var descriptionRules = result["PointRules"]["DescriptionRules"].Select(t => t.ToObject<DescriptionRule>(serializer)).ToList();

            PointRules = new List<PointRule>(descriptionRules);

            SeriesRules = new List<SeriesRule>();
        }
		/// <summary>
		/// Creates a new WixDialogDesignerLoader that will load the specified
		/// dialog id from the Wix xml.
		/// </summary>
		public WixDialogDesignerLoader(IWixDialogDesigner designer, IWixDialogDesignerGenerator generator, IFileLoader fileLoader)
		{
			this.designer = designer;
			this.generator = generator;
			this.fileLoader = fileLoader;
			
			if (designer == null) {
				throw new ArgumentException("Cannot be null.", "designer");
			}
			if (generator == null) {
				throw new ArgumentException("Cannot be null.", "generator");
			}
		}
	void Start () {
		loader = GameSettingsComponent.loader;
		quick_import.options.Clear();
		
		//Automatically set the dropdown to the default file if one is present.
		default_option.CombineLatest(
			quick_import_options.ObserveCountChanged(),
			(index, count)=>{
				return Math.Min(index,count);
			}
		).Subscribe(value=>{
			quick_import.value = value;
			if (value < quick_import_options.Count)
				quick_import_options[value].rx_display_text.Subscribe(text=>{
					if (quick_import != null && quick_import.value == value)
						quick_import.captionText.text = text;
				});
		});
		
		//Keep the box synced with the loader when possible.
		loader_sub = loader.rx_filename.Subscribe((file)=>{
			foreach (QuickImportOption opt in quick_import_options){
				if (quick_import != null && opt.option_name == file){
					quick_import.captionText.text = opt.rx_display_text.Value;
				}
			}
		});
		
		select_sub = quick_import
		.SelectFromCollection(quick_import_options, (opt, index)=>{
			if (default_option.Value == 0 
				&& string.Equals(opt.option_name, "default", StringComparison.CurrentCultureIgnoreCase)){
				//If this option calls itself "default," set our default index to it.
				default_option.Value = index;
			}
			return opt.dropdown_option;
		}).Subscribe(option=>{
			data_component.current_rules = loader.load(option.option_name);
		});
		
		quick_import_options.SetRange(loader.available_files().Select(name=>new QuickImportOption(name)));
	}
Exemplo n.º 41
0
 public Parser()
 {
     _fileLoader = new FileLoader();
     _parsingService = new ParsingService();
 }
Exemplo n.º 42
0
 public TokenFilter(IEnumerable<Token> tokens, CompilerDefines compilerDefines,
     IFileLoader fileLoader)
 {
     _tokens = tokens;
     _compilerDefines = compilerDefines.Clone();
     _fileLoader = fileLoader;
     _directiveTypes =
         new Dictionary<string, DirectiveType>(StringComparer.InvariantCultureIgnoreCase);
     // Conditional-compilation directives
     _directiveTypes["IF"] = DirectiveType.If;
     _directiveTypes["IFDEF"] = DirectiveType.If;
     _directiveTypes["IFNDEF"] = DirectiveType.If;
     _directiveTypes["IFOPT"] = DirectiveType.If;
     _directiveTypes["IFNOPT"] = DirectiveType.If;
     _directiveTypes["ELSE"] = DirectiveType.Else;
     _directiveTypes["ELSEIF"] = DirectiveType.ElseIf;
     _directiveTypes["ENDIF"] = DirectiveType.EndIf;
     _directiveTypes["IFEND"] = DirectiveType.EndIf;
     // Delphi compiler directives
     _directiveTypes["ALIGN"] = DirectiveType.Ignored;
     _directiveTypes["APPTYPE"] = DirectiveType.Ignored;
     _directiveTypes["ASSERTIONS"] = DirectiveType.Ignored;
     _directiveTypes["AUTOBOX"] = DirectiveType.Ignored;
     _directiveTypes["BOOLEVAL"] = DirectiveType.Ignored;
     _directiveTypes["DEBUGINFO"] = DirectiveType.Ignored;
     _directiveTypes["DEFINE"] = DirectiveType.Define;
     _directiveTypes["DEFINITIONINFO"] = DirectiveType.Ignored;
     _directiveTypes["DENYPACKAGEUNIT"] = DirectiveType.Ignored;
     _directiveTypes["DESCRIPTION"] = DirectiveType.Ignored;
     _directiveTypes["DESIGNONLY"] = DirectiveType.Ignored;
     _directiveTypes["ENDREGION"] = DirectiveType.Ignored;
     _directiveTypes["EXTENDEDSYNTAX"] = DirectiveType.Ignored;
     _directiveTypes["EXTENSION"] = DirectiveType.Ignored;
     _directiveTypes["FINITEFLOAT"] = DirectiveType.Ignored;
     _directiveTypes["HINTS"] = DirectiveType.Ignored;
     _directiveTypes["I"] = DirectiveType.PossibleInclude;
     _directiveTypes["IMAGEBASE"] = DirectiveType.Ignored;
     _directiveTypes["IMPLICITBUILD"] = DirectiveType.Ignored;
     _directiveTypes["IMPORTEDDATA"] = DirectiveType.Ignored;
     _directiveTypes["INCLUDE"] = DirectiveType.Include;
     _directiveTypes["INLINE"] = DirectiveType.Ignored; // undocumented
     _directiveTypes["IOCHECKS"] = DirectiveType.Ignored;
     _directiveTypes["LIBPREFIX"] = DirectiveType.Ignored;
     _directiveTypes["LIBSUFFIX"] = DirectiveType.Ignored;
     _directiveTypes["LIBVERSION"] = DirectiveType.Ignored;
     _directiveTypes["LINK"] = DirectiveType.Ignored;
     _directiveTypes["LOCALSYMBOLS"] = DirectiveType.Ignored;
     _directiveTypes["LONGSTRINGS"] = DirectiveType.Ignored;
     _directiveTypes["MAXSTACKSIZE"] = DirectiveType.Ignored;
     _directiveTypes["MESSAGE"] = DirectiveType.Ignored;
     _directiveTypes["METHODINFO"] = DirectiveType.Ignored;
     _directiveTypes["MINENUMSIZE"] = DirectiveType.Ignored;
     _directiveTypes["MINSTACKSIZE"] = DirectiveType.Ignored;
     _directiveTypes["OBJEXPORTALL"] = DirectiveType.Ignored;
     _directiveTypes["OPENSTRINGS"] = DirectiveType.Ignored;
     _directiveTypes["OPTIMIZATION"] = DirectiveType.Ignored;
     _directiveTypes["OVERFLOWCHECKS"] = DirectiveType.Ignored;
     _directiveTypes["RANGECHECKS"] = DirectiveType.Ignored;
     _directiveTypes["REALCOMPATIBILITY"] = DirectiveType.Ignored;
     _directiveTypes["REFERENCEINFO"] = DirectiveType.Ignored;
     _directiveTypes["REGION"] = DirectiveType.Ignored;
     _directiveTypes["RESOURCE"] = DirectiveType.Ignored;
     _directiveTypes["RESOURCERESERVE"] = DirectiveType.Ignored;
     _directiveTypes["RUNONLY"] = DirectiveType.Ignored;
     _directiveTypes["SAFEDIVIDE"] = DirectiveType.Ignored;
     _directiveTypes["SETPEFLAGS"] = DirectiveType.Ignored;
     _directiveTypes["SOPREFIX"] = DirectiveType.Ignored; // undocumented
     _directiveTypes["SOSUFFIX"] = DirectiveType.Ignored; // undocumented
     _directiveTypes["SOVERSION"] = DirectiveType.Ignored; // undocumented
     _directiveTypes["STACKCHECKS"] = DirectiveType.Ignored; // undocumented
     _directiveTypes["STACKFRAMES"] = DirectiveType.Ignored;
     _directiveTypes["TYPEDADDRESS"] = DirectiveType.Ignored;
     _directiveTypes["TYPEINFO"] = DirectiveType.Ignored;
     _directiveTypes["UNDEF"] = DirectiveType.Undefine;
     _directiveTypes["UNSAFECODE"] = DirectiveType.Ignored;
     _directiveTypes["VARPROPSETTER"] = DirectiveType.Ignored; // undocumented
     _directiveTypes["VARSTRINGCHECKS"] = DirectiveType.Ignored;
     _directiveTypes["WARN"] = DirectiveType.Ignored;
     _directiveTypes["WARNINGS"] = DirectiveType.Ignored;
     _directiveTypes["WEAKPACKAGEUNIT"] = DirectiveType.Ignored;
     _directiveTypes["WRITEABLECONST"] = DirectiveType.Ignored;
     // Directives for generation of C++Builder .hpp files
     _directiveTypes["EXTERNALSYM"] = DirectiveType.Ignored;
     _directiveTypes["HPPEMIT"] = DirectiveType.Ignored;
     _directiveTypes["NODEFINE"] = DirectiveType.Ignored;
     _directiveTypes["NOINCLUDE"] = DirectiveType.Ignored;
 }
Exemplo n.º 43
0
 internal Parser(IFileLoader fileLoader, IParsingService parsingService)
 {
     _fileLoader = fileLoader;
     _parsingService = parsingService;
 }
Exemplo n.º 44
0
 public ProductRepository3()
 {
     loader = new FileLoader();
     mapper = new ProductsMapper();
 }
Exemplo n.º 45
0
 public XmlProfileRetriever(IFileLoader fileLoader)
 {
     _fileLoader = fileLoader;
 }
Exemplo n.º 46
0
 public ProductRepository(IFileLoader loader, IProductMapper mapper)
 {
     this.loader = loader;
     this.mapper = mapper;
 }
Exemplo n.º 47
0
 public static void RegisterLoader(IFileLoader loader)
 {
     _Loaders.Add(loader);
 }
Exemplo n.º 48
0
 internal FileParser(IFileLoader loader, Dictionary<FileType, IParsingService> services = null)
 {
     _fileLoader = loader;
     _services = services ?? GetDefaultServices();
 }
Exemplo n.º 49
0
 public abstract void DownloadUpdate(IFileLoader fileLoader);
Exemplo n.º 50
0
 public Tager(IFileLoader fileLoader)
 {
     _fileLoader = fileLoader;
     _currentFile = null;
 }
Exemplo n.º 51
0
 public ProductRepository2()
 {
     loader = new FileLoader();
 }
Exemplo n.º 52
0
 public ModelLoader(IFileLoader fileLoader, ILogger logger)
 {
     _fileLoader = fileLoader;
     _logger = logger;
 }