Example #1
0
 public XpsDocumentReader(FileMetadata metaData, IFilesProvider filesProvider)
 {
     this.metadata = metaData;
     this.filesProvider = filesProvider;
     this.loaded = false;
     this.removeCommand = new RelayCommand(this.Remove);
 }
        public TestContainerDiscoverer([Import(typeof(SVsServiceProvider))] IServiceProvider serviceProvider)
        {
            _logger = LoggerFactory.Create(serviceProvider);

            var dte = (DTE)serviceProvider.GetService(typeof(DTE));
            _testContainerProvider = new FilesProvider(dte);
        }
Example #3
0
 public DocumentLibraryVM(IFilesProvider filesProvider, ISynchronizationModule synchronizationModule)
 {
     this.documentLibrary = new DocumentLibrary(filesProvider);
     this.openDocumentCommand = new RelayCommand(this.OpenDocument);
     this.openLibraryCommand = new RelayCommand(this.OpenLibrary);
     this.LibraryVisibility = Visibility.Visible;
     this.MenuVisibility = false;
     synchronizationModule.LibraryUpdated += SynchronizationModule_LibraryUpdated;
 }
        public SynchronizationModule(IFilesProvider filesProvider, IDocumentApiProvider documentApiProvider, IClientAuthorizationProvider authorizationProvider)
        {
            this.filesProvider = filesProvider;
            this.documentApiProvider = documentApiProvider;
            this.authorizationProvider = authorizationProvider;

            authorizationProvider.LoggedIn += AuthorizationProvider_LoggedIn;
            authorizationProvider.LoggedOut += AuthorizationProvider_LoggedOut;
            filesProvider.FileAdded += FilesProvider_FileAdded;
            filesProvider.FileRemoved += FilesProvider_FileRemoved;

            this.metadata = filesProvider.Metadata;
        }
Example #5
0
 public FileController()
 {
     //registroService = registroService ?? new RegistroControlService();
     partService          = partService ?? new PartidasService();
     centService          = centService ?? new CentroCostoService();
     empService           = empService ?? new EmpresaService();
     ctaService           = ctaService ?? new CuentaContableService();
     cncService           = cncService ?? new ConceptoCostoService();
     registroService      = registroService ?? new RegistroControlService();
     monedaSrv            = monedaSrv ?? new MonedaService();
     areaOperativaService = areaOperativaService ?? new AreaOperativaService();
     paramService         = paramService ?? new ParametroService();
     paramEmpresaAreaCentroCostoService = paramEmpresaAreaCentroCostoService ?? new EmpresaAreasCentroCostoService();
     paramEmpresaCentro = paramEmpresaCentro ?? new EmpresaCentroService();
     fileService        = fileService ?? new FilesProvider(partService, centService, empService, cncService, ctaService, monedaSrv, areaOperativaService, paramService, paramEmpresaAreaCentroCostoService, paramEmpresaCentro);
 }
Example #6
0
 public RegistroControlService(RegistroControl ao)
     : base(ao)
 {
     registroControl           = ao;
     fileProvider              = fileProvider ?? new FilesProvider();
     partidaService            = partidaService ?? new PartidasService();
     ctaService                = ctaService ?? new CuentaContableService();
     centroCostoService        = centroCostoService ?? new CentroCostoService();
     empresaService            = empresaService ?? new EmpresaService();
     conceptoCostoService      = conceptoCostoService ?? new ConceptoCostoService();
     monedaService             = monedaService ?? new MonedaService();
     paramService              = paramService ?? new ParametroService();
     areaOperativaService      = areaOperativaService ?? new AreaOperativaService();
     empresaAreaCentroCostoSrv = empresaAreaCentroCostoSrv ?? new EmpresaAreasCentroCostoService();
     empresaCentroSrv          = empresaCentroSrv ?? new EmpresaCentroService();
     empresaUsuarioService     = empresaUsuarioService ?? new UsuarioEmpresaService();
 }
Example #7
0
        public LoggerFactory(IFilesProvider configFileSource, ISettingStore settings)
        {
            ConfigSource = configFileSource;
            Settings     = settings;

            DefaultLoggerName = settings.Get("default-logger-name");
            if (DefaultLoggerName == null)
            {
                DefaultLoggerName = "default";
            }

            ConfigFileName = settings.Get("logger-config-file-name");
            if (ConfigFileName == null)
            {
                ConfigFileName = "App.config";
            }
        }
Example #8
0
 public RegistroControlService(RegistroControl ao, IFilesProvider provider, IPartidasService partSvc, ICuentaContableService ctaSvc, ICentroCostoService centroCosSvc, IEmpresaService empSvc,
                               IConceptoCostoService cocosSvc)
     : base(ao)
 {
     registroControl           = ao ?? new RegistroControl();
     fileProvider              = provider ?? new FilesProvider();
     partidaService            = partSvc ?? new PartidasService();
     ctaService                = ctaSvc ?? new CuentaContableService();
     centroCostoService        = centroCosSvc ?? new CentroCostoService();
     empresaService            = empSvc ?? new EmpresaService();
     conceptoCostoService      = cocosSvc ?? new ConceptoCostoService();
     monedaService             = monedaService ?? new MonedaService();
     paramService              = paramService ?? new ParametroService();
     areaOperativaService      = areaOperativaService ?? new AreaOperativaService();
     empresaAreaCentroCostoSrv = empresaAreaCentroCostoSrv ?? new EmpresaAreasCentroCostoService();
     empresaCentroSrv          = empresaCentroSrv ?? new EmpresaCentroService();
     empresaUsuarioService     = empresaUsuarioService ?? new UsuarioEmpresaService();
 }
Example #9
0
 public DocumentLibrary(IFilesProvider filesProvider)
 {
     this.filesProvider = filesProvider;
 }
Example #10
0
 public XmlFileSettingStore(IFilesProvider storage, string settingsFilename)
 {
     SettingsStorage  = storage;
     SettingsFilename = settingsFilename;
 }
Example #11
0
        static void Main(string[] args)
        {
            var test = Result.Result <object, Exception> .FromTest(() => { return(new object()); }, new Exception("asdasd"));

            return;

            Func <int> testFunc = () =>
            {
                System.Threading.Thread.Sleep(25000);

                return(4);
            };

            var ret = new Retry.Retry <int>(testFunc, 1000, 10000).Start();

            ret.Wait();

            Console.ReadLine();

            return;

            TestCase bisTest = new TestCase();

            bisTest.RunTests();

            return;

            // Service creation
            IKernel        cont     = InjectionHelper.CreateDebugContainer();
            IFilesProvider myfiles  = cont.Get <IFilesProvider>();
            ISettingStore  settings = cont.Get <ISettingStore>();
            LoggerFactory  logFac   = cont.Get <LoggerFactory>();

            logFac.Configure();
            ILog logger = logFac.GetLogger();

            File.Delete("fs/data.txt");
            myfiles.Create("data.txt", File.ReadAllBytes("data.txt"));

            logger.Debug("TEST HELLO ?!?!?!");

            Console.ReadLine();

            return;

            // Cloud config
            CloudStorageAccount account   = CloudStorageAccount.Parse(CloudConfigurationManager.GetSetting("StorageConnectionString"));
            CloudBlobClient     client    = account.CreateCloudBlobClient();
            CloudBlobContainer  Container = client.GetContainerReference("mycontainer");

            Container.CreateIfNotExists();
            Container.SetPermissions(new BlobContainerPermissions {
                PublicAccess = BlobContainerPublicAccessType.Blob
            });

            //IFilesCache cache = new AzureBlobFileCache(Container);
            IFilesCache cache = new InMemoryCache();

            if (Directory.Exists("depot"))
            {
                Directory.Delete("depot");
            }

            //IFilesProvider files = new LocalFilesProvider("depot");
            IFilesProvider files = new AzureBlobFilesProvider(Container);

            files.SetCache(cache);

            byte[] data = File.ReadAllBytes("data.txt");

            files.Create("data.txt", data);

            byte[] dataGet = files.GetFile("data.txt");

            files.Write("data2.txt", data);

            return;
        }
 public CoreGenerator(IGeneratorOptions options, IFilesProvider filesProvider)
 {
     _options = options;
     _filesProvider = filesProvider;
 }
 public ViewAViewModel(IRegionManager regionManager, IFilesProvider fileProvider)
     : base(regionManager)
 {
 }
Example #14
0
 public PeopleCreator(ILogger <PeopleCreator> logger, IPeopleService peopleService, IFilesProvider filesProvider)
 {
     this.logger        = logger;
     this.peopleService = peopleService;
     this.filesProvider = filesProvider;
 }