public MarvelDataProvider(
     IXmlFileService xmlFileService,
     IMarvelParser marvelParser)
 {
     this.xmlFileService = xmlFileService;
     this.marvelParser   = marvelParser;
 }
 public DCComicsDataProvider(
     IXmlFileService xmlFileService,
     IDCComicsParser dcComicsParser)
 {
     this.xmlFileService = xmlFileService;
     this.dcComicsParser = dcComicsParser;
 }
Example #3
0
 public GridRunEngine(IGridRunService gridRunService, IXmlFileService xmlFileService, IApplicationService applicationService, ILogger logger)
 {
     _gridRunService     = gridRunService;
     _xmlFileService     = xmlFileService;
     _applicationService = applicationService;
     _logger             = logger;
 }
        protected override void SetUp()
        {
            base.SetUp();

            xmlFileService     = NewMock <IXmlFileService>();
            marvelParser       = NewMock <IMarvelParser>();
            marvelDataProvider = new MarvelDataProvider(xmlFileService, marvelParser);
        }
        protected override void SetUp()
        {
            base.SetUp();

            xmlFileService       = NewMock <IXmlFileService>();
            dcComicsParser       = NewMock <IDCComicsParser>();
            dcComicsDataProvider = new DCComicsDataProvider(xmlFileService, dcComicsParser);
        }
Example #6
0
 public FileController(
     IXmlFileService xmlFileService,
     IUserService userService,
     ILogger logger)
     : base(logger)
 {
     _xmlFileService   = xmlFileService;
     this._userService = userService;
 }
Example #7
0
        private void PerformIOC()
        {
            IoCContainer.ResoloveDependencies();

            _conFileService = IoCContainer.Resolve <IConFileService>();
            _zipFileService = IoCContainer.Resolve <IZipFileService>();
            _xmlFileService = IoCContainer.Resolve <IXmlFileService>();
            _docTypeService = IoCContainer.Resolve <IDocTypeService>();
            _manCoService   = IoCContainer.Resolve <IManCoService>();
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="RepositoryStorageServiceBase"/> class.
        /// </summary>
        public RepositoryStorageServiceBase(IXmlFileService xmlFileService, ILanguageService languageService)
        {
            _xmlFileService  = xmlFileService;
            _languageService = languageService;
            _updater         = new NoteRepositoryUpdater();

#if (DEMO && DEBUG)
            _cachedRepository = new DemoNoteRepositoryModel();
#endif
        }
 public SaveProjectCommandHandler(
     IDialogService dialogService,
     IDataContext dataContext,
     IProjectSerializer projectSerializer,
     IXmlFileService xmlFileService,
     IEventBus eventBus)
 {
     _dialogService     = dialogService;
     _dataContext       = dataContext;
     _projectSerializer = projectSerializer;
     _xmlFileService    = xmlFileService;
     _eventBus          = eventBus;
 }
Example #10
0
 public QuickSearchController(
     IGridRunService gridRunService,
     IXmlFileService xmlFileService,
     IZipFileService zipFileService,
     IUserService userService,
     ILogger logger)
     : base(logger)
 {
     _gridRunService      = gridRunService;
     _xmlFileService      = xmlFileService;
     this._zipFileService = zipFileService;
     this._userService    = userService;
 }
Example #11
0
 public OpenProjectCommandHandler(
     IDialogService dialogService,
     IEventBus eventBus,
     IApplicationStateService stateService,
     IDataContext dataContext,
     IXmlFileService xmlFileService,
     IProjectSerializer projectSerializer)
 {
     _dialogService     = dialogService;
     _xmlFileService    = xmlFileService;
     _projectSerializer = projectSerializer;
     _dataContext       = dataContext;
     _eventBus          = eventBus;
     _stateService      = stateService;
 }
Example #12
0
 /// <summary>
 /// Default Constructor.
 /// </summary>
 /// <param name="engine">The nexdox engine containing all the streams.</param>
 /// <param name="appInfo">Application Info created by NexdoxLaunch and passed to the program on declaration.</param>
 public Allocation(
     NexdoxEngine engine,
     ApplicationInfo appInfo,
     IConFileService conFileService,
     IXmlFileService xmlFileService,
     IZipFileService zipFileService,
     IDocTypeService docTypeService,
     IManCoService manCoService)
 {
     this._engine    = engine;
     this._appInfo   = appInfo;
     _conFileService = conFileService;
     _xmlFileService = xmlFileService;
     _zipFileService = zipFileService;
     _docTypeService = docTypeService;
     _manCoService   = manCoService;
 }
Example #13
0
 public ConfigurationService(string appName, IXmlFileService xmlFileService)
 {
     this.AppName = appName;
     this.ConfigurationFileName = string.Format(StringResource.ConfigurationFileNameFormat, this.AppName);
     this.XmlFileService        = xmlFileService;
 }
Example #14
0
 public TestableService(IXmlFileService xmlFileService, IDataProtectionService dataProtectionService, IEnvironmentService environmentService)
     : base(xmlFileService, dataProtectionService, environmentService)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="RepositoryStorageService"/> class.
 /// </summary>
 public RepositoryStorageService(Context appContext, IXmlFileService xmlFileService, ILanguageService languageService)
     : base(xmlFileService, languageService)
 {
     _appContext = appContext;
 }
Example #16
0
 public void SetUp()
 {
     _xmlFileRepository = new Mock <IXmlFileRepository>();
     _xmlFileService    = new XmlFileService(_xmlFileRepository.Object);
 }
Example #17
0
        public void SaveToDatabase(IXmlFileService xmlFileService,
                                   IZipFileService zipFileService, IConFileService conFileService, IDocTypeService docTypeService, IManCoService manCoService, ApplicationInfo appInfo)
        {
            try
            {
                NexdoxMessaging.SendMessage("    Adding Data to SQL Database", true, this);
                foreach (ZipPackage zp in Statics.zipPackage)
                {
                    switch (Path.GetExtension(zp.FileName).ToLower())
                    {
                    case ".xml":

                        DocType docType = docTypeService.GetDocType(zp.DocumentType);
                        if (docType == null)
                        {
                            throw new Exception(string.Format("Document type {0} not found in unity database", zp.DocumentType));
                        }

                        ManCo manCo = manCoService.GetManCo(zp.ManCoID);
                        if (manCo == null)
                        {
                            throw new Exception(string.Format("Man Co {0} not found in unity database", zp.ManCoID));
                        }

                        xmlFileService.CreateXmlFile(
                            Statics.zipPackage.DocumentSetID.ToString(),
                            zp.FileName,
                            zp.ParentZipFileName,
                            zp.Offshore,
                            docType.Id,
                            manCo.Id,
                            0,
                            string.Empty,
                            zp.FileName,
                            DateTime.Now,
                            appInfo.NexdoxGlobalRunID.ToString(),
                            File.GetLastWriteTime(appInfo.InputPath));
                        break;

                    case ".zip":
                        if (zp.IsBigZip)
                        {
                            zipFileService.CreateBigZipFile(Statics.zipPackage.DocumentSetID.ToString(), zp.FileName, File.GetLastWriteTime(appInfo.InputPath));
                        }
                        else
                        {
                            zipFileService.CreateLittleZipFile(Statics.zipPackage.DocumentSetID.ToString(), zp.FileName, zp.ParentZipFileName, File.GetLastWriteTime(appInfo.InputPath));
                        }
                        break;

                    case ".con":
                        conFileService.CreateConFile(Statics.zipPackage.DocumentSetID.ToString(), zp.FileName, zp.ParentZipFileName, File.GetLastWriteTime(appInfo.InputPath));
                        break;
                    }

                    /*SqlCommand sqlComm = new SqlCommand("sp_InsertInputFile", sqlConn);
                     * sqlComm.CommandType = CommandType.StoredProcedure;
                     *
                     * SqlParameter InputFileName = sqlComm.Parameters.Add("@INPUTFILENAME", SqlDbType.VarChar);
                     * InputFileName.Direction = ParameterDirection.Input;
                     * InputFileName.Value = zp.FileName;
                     *
                     * SqlParameter DocType = sqlComm.Parameters.Add("@DOCTYPE", SqlDbType.VarChar);
                     * DocType.Direction = ParameterDirection.Input;
                     * DocType.Value = zp.DocumentType;
                     *
                     * SqlParameter ParentDocFileName = sqlComm.Parameters.Add("@PARENTDOCFILENAME", SqlDbType.VarChar);
                     * ParentDocFileName.Direction = ParameterDirection.Input;
                     * ParentDocFileName.Value = zp.ParentZipFileName;
                     *
                     * SqlParameter BigZip = sqlComm.Parameters.Add("@BIGZIP", SqlDbType.Bit);
                     * BigZip.Direction = ParameterDirection.Input;
                     * BigZip.Value = zp.IsBigZip;
                     *
                     * SqlParameter LittleZip = sqlComm.Parameters.Add("@LITTLEZIP", SqlDbType.Bit);
                     * LittleZip.Direction = ParameterDirection.Input;
                     * LittleZip.Value = zp.IsLittleZip;
                     *
                     * SqlParameter DocumentSetID = sqlComm.Parameters.Add("@DOCUMENTSET_ID", SqlDbType.UniqueIdentifier);
                     * DocumentSetID.Direction = ParameterDirection.Input;
                     * DocumentSetID.Value = Statics.zipPackage.DocumentSetID;
                     *
                     * SqlParameter OffShore = sqlComm.Parameters.Add("@OFFSHORE", SqlDbType.Bit);
                     * OffShore.Direction = ParameterDirection.Input;
                     * OffShore.Value = zp.Offshore;
                     *
                     * SqlParameter ManCo = sqlComm.Parameters.Add("@MANCO", SqlDbType.VarChar);
                     * ManCo.Direction = ParameterDirection.Input;
                     * ManCo.Value = zp.ManCoID.ToString();
                     *
                     * SqlParameter Domicile = sqlComm.Parameters.Add("@DOMICILE", SqlDbType.VarChar);
                     * Domicile.Direction = ParameterDirection.Input;
                     * Domicile.Value = zp.Domicile;
                     *
                     * SqlParameter StatusID = sqlComm.Parameters.Add("@STATUS_ID", SqlDbType.Int);
                     * StatusID.Direction = ParameterDirection.Input;
                     * StatusID.Value = zp.StatusID;
                     *
                     * SqlParameter InputDateCreation = sqlComm.Parameters.Add("@INPUTCREATIONDATE", SqlDbType.DateTime);
                     * InputDateCreation.Direction = ParameterDirection.Input;
                     * InputDateCreation.Value = zp.InputCreationDate;
                     *
                     * SqlDataReader myReader = sqlComm.ExecuteReader();
                     * myReader.Close();*/
                }
            }
            catch (Exception e)
            {
                throw NexdoxMessaging.Exception(e.Message, this);
            }
        }
Example #18
0
 public RepositoryStorageService(IXmlFileService xmlFileService, ILanguageService languageService)
     : base(xmlFileService, languageService)
 {
 }
Example #19
0
 public TestableService(IXmlFileService xmlFileService, IDataProtectionService dataProtectionService)
     : base(xmlFileService, dataProtectionService)
 {
 }
Example #20
0
 public SettingsServiceBase(IXmlFileService xmlFileService, IDataProtectionService dataProtectionService)
 {
     _xmlFileService        = xmlFileService;
     _dataProtectionService = dataProtectionService;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="SettingsService"/> class.
 /// </summary>
 public SettingsService(Context appContext, IXmlFileService xmlFileService, IDataProtectionService dataProtectionService)
     : base(xmlFileService, dataProtectionService)
 {
     _appContext = appContext;
 }
 public MaturityDataController(IMaturityDataService serv, IXmlFileService xmlServ)
 {
     _serv    = serv;
     _xmlServ = xmlServ;
 }
Example #23
0
 public TestableService(IXmlFileService xmlFileService)
     : base(xmlFileService, new Mock <ILanguageService>().Object)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="SettingsService"/> class.
 /// </summary>
 public SettingsService(IXmlFileService xmlFileService, IDataProtectionService dataProtectionService)
     : base(xmlFileService, dataProtectionService)
 {
 }
Example #25
0
 public ScrobbleCacher(IDataLocations userSettings, IXmlFileService xmlFileService)
 {
     _userSettings   = userSettings;
     _xmlFileService = xmlFileService;
 }
Example #26
0
 public SettingsServiceBase(IXmlFileService xmlFileService, IDataProtectionService dataProtectionService, IEnvironmentService environmentService)
 {
     _xmlFileService        = xmlFileService;
     _dataProtectionService = dataProtectionService;
     _environmentSettings   = environmentService;
 }