public ImageTagRenderingService(ISession session, IImageProcessor imageProcessor, IFileService fileService, MediaSettings mediaSettings)
 {
     _session = session;
     _imageProcessor = imageProcessor;
     _fileService = fileService;
     _mediaSettings = mediaSettings;
 }
Exemple #2
0
        public AppDataService(IMessageService messageService, ISaveFileService saveFileService, 
            IProcessService processService, IDirectoryService directoryService, IFileService fileService)
        {
            Argument.IsNotNull(() => messageService);
            Argument.IsNotNull(() => saveFileService);
            Argument.IsNotNull(() => processService);
            Argument.IsNotNull(() => directoryService);
            Argument.IsNotNull(() => fileService);

            _messageService = messageService;
            _saveFileService = saveFileService;
            _processService = processService;
            _directoryService = directoryService;
            _fileService = fileService;

            ExclusionFilters = new List<string>(new []
            {
                "licenseinfo.xml",
                "*.log"
            });

            var applicationDataDirectory = Catel.IO.Path.GetApplicationDataDirectory();

            _directoryService.Create(applicationDataDirectory);

            ApplicationDataDirectory = applicationDataDirectory;
        }
Exemple #3
0
 public NetkanTransformer(
     IHttpService http,
     IFileService fileService,
     IModuleService moduleService,
     string githubToken,
     bool prerelease
 )
 {
     _transformers = new List<ITransformer>
     {
         new MetaNetkanTransformer(http),
         new KerbalstuffTransformer(new KerbalstuffApi(http)),
         new GithubTransformer(new GithubApi(githubToken), prerelease),
         new HttpTransformer(),
         new JenkinsTransformer(),
         new InternalCkanTransformer(http, moduleService),
         new AvcTransformer(http, moduleService),
         new VersionEditTransformer(),
         new ForcedVTransformer(),
         new EpochTransformer(),
         new VersionedOverrideTransformer(),
         new DownloadSizeTransformer(http, fileService),
         new GeneratedByTransformer(),
         new OptimusPrimeTransformer(),
         new StripNetkanMetadataTransformer(),
         new PropertySortTransformer()
     };
 }
 public TestCollectionService(IConfigurationService configurationService, IFileService fileService, ICommandService commandService, IManifestService manifestService)
 {
     _configurationService = configurationService;
     _fileService = fileService;
     _commandService = commandService;
     _manifestService = manifestService;
 }
        /// <summary>
        /// Get the canonical volume root (e.g. the \\?\VolumeGuid format) for the given path. The path must not be relative.
        /// </summary>
        /// <exception cref="ArgumentException">Thrown if the path is relative or indeterminate.</exception>
        /// <exception cref="System.IO.IOException">Thrown if unable to get the root from the OS.</exception>
        public static string GetCanonicalRoot(this IExtendedFileService extendedFileService, IFileService fileService, string path)
        {
            if (Paths.IsRelative(path)) throw new ArgumentException();

            path = fileService.GetFullPath(path);
            int rootLength;
            var format = Paths.GetPathFormat(path, out rootLength);
            if (format == PathFormat.UnknownFormat) throw new ArgumentException();

            string root = path.Substring(0, rootLength);
            string simpleRoot = root;
            string canonicalRoot = root;

            switch (format)
            {
                case PathFormat.UniformNamingConventionExtended:
                    simpleRoot = @"\\" + root.Substring(Paths.ExtendedUncPrefix.Length);
                    goto case PathFormat.UniformNamingConvention;
                case PathFormat.UniformNamingConvention:
                    canonicalRoot = simpleRoot;
                    break;
                case PathFormat.VolumeAbsoluteExtended:
                case PathFormat.DriveAbsolute:
                    canonicalRoot = extendedFileService.GetVolumeName(root);
                    simpleRoot = extendedFileService.GetMountPoint(root);
                    break;
            }

            return canonicalRoot;
        }
 public CoopStaffTab(CooperationStaff cooperationStaff, CooperationProjectWrapper cooperationProjectWrapper)
 {
     if (cooperationStaff != null)
     {
         this.InitializeComponent();
         this.imageService = ServiceUtil.Instance.ImageService;
         this.fileService = ServiceUtil.Instance.FileService;
         this.TabHeader.Label = cooperationStaff.Name;
         this.TabHeader.imgIcon.Source = cooperationStaff.HeaderImage;
         base.Tag = new MenuItem
         {
             Icon = new Image
             {
                 Width = 16.0,
                 Height = 16.0,
                 Source = cooperationStaff.HeaderImage
             },
             Header = cooperationStaff.Name
         };
         this.TabContent = new CoopStaffChatTabControl(cooperationStaff, cooperationProjectWrapper);
         this.Staff = cooperationStaff;
         this.CooperationProjectWrapper = cooperationProjectWrapper;
         base.SetFocus2DesktopButton();
         this.AddEventListenerHandler();
     }
 }
Exemple #7
0
 public GroupPresenter()
 {
     _redirector = new Redirector();
     _webContext = new WebContext();
     _groupRepository = new GroupRepository();
     _fileService = new FileService();
 }
Exemple #8
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DefaultFileHandler"/> class.
        /// </summary>
        /// <param name="fileService">IFileService instance.</param>
        /// <param name="userId">Id of the user.</param>
        public ZipFileHandler(IFileService fileService, int userId)
            : base(fileService)
        {
            Check.IsNotNull(fileService, "fileService");

            this.userId = userId;
        }
 protected ClientSettingsView(string settingsSection, SettingsLocation settingsLocation, IConfigurationManager configurationManager, IFileService fileService)
 {
     ConfigurationManager = configurationManager;
     FileService = fileService;
     SettingsSection = settingsSection;
     SettingsLocation = settingsLocation;
 }
 public OTAUIController(IOTAUIService otaUIService, IOTARedisService redisService, IFileService fileService, IUserAccessDataControlService userAccessDataControlService, IMembershipService membershipService, IFullTextSearchService fullTextSearchService)
     : base(otaUIService, redisService, fileService, fullTextSearchService)
 {
     this.UserAccessDataControlService = userAccessDataControlService;
     this.MembershipService = membershipService;
     StatusOTAService = StructureMap.ObjectFactory.GetInstance<IStatusOTAService>();
 }
        /// <inheritdoc />
        protected override ProjectTemplateResult CreateProjectCore(IFileService fileService, FilePath filePath)
        {
            var project = (NetProject)ProjectDescriptor.GetDescriptorByExtension(filePath.Extension).CreateProject(filePath.FileName);

            project.ApplicationType = ApplicationType;
            project.FilePath = filePath;

            var results = new List<TemplateResult>();

            foreach (var file in Files)
            {
                var result = file.CreateFile(
                    fileService,
                    project,
                    new FilePath(project.ProjectDirectory, file.Name + Language.StandardFileExtension));

                foreach (var createdFile in result.CreatedFiles)
                {
                    project.ProjectFiles.Add(new ProjectFileEntry(createdFile.File as OpenedFile));
                }

                results.Add(result);
            }

            foreach (var reference in References)
                project.References.Add(reference);

            return new ProjectTemplateResult(project, results.ToArray());
        }
        internal static IEnumerable<IFileSystemInformation> EnumerateChildrenInternal(
            string directory,
            ChildType childType,
            string searchPattern,
            System.IO.SearchOption searchOption,
            FileAttributes excludeAttributes,
            IFileService fileService)
        {
            // We want to be able to see all files as we recurse and open new find handles (that might be over MAX_PATH).
            // We've already normalized our base directory.
            string extendedDirectory = Paths.AddExtendedPrefix(directory);

            // The assertion here is that we want to find files that match the desired pattern in all subdirectories, even if the
            // subdirectories themselves don't match the pattern. That requires two passes to avoid overallocating for directories
            // with a large number of files.

            // First look for items that match the given search pattern in the current directory
            using (FindOperation findOperation = new FindOperation(Paths.Combine(extendedDirectory, searchPattern)))
            {
                FindResult findResult;
                while ((findResult = findOperation.GetNextResult()) != null)
                {
                    bool isDirectory = (findResult.Attributes & FileAttributes.FILE_ATTRIBUTE_DIRECTORY) == FileAttributes.FILE_ATTRIBUTE_DIRECTORY;

                    if ((findResult.Attributes & excludeAttributes) == 0
                        && findResult.FileName != "."
                        && findResult.FileName != ".."
                        && ((isDirectory && childType == ChildType.Directory)
                            || (!isDirectory && childType == ChildType.File)))
                    {
                        yield return FileSystemInformation.Create(findResult, directory, fileService);
                    }
                }
            }

            if (searchOption != System.IO.SearchOption.AllDirectories) yield break;

            // Now recurse into each subdirectory
            using (FindOperation findOperation = new FindOperation(Paths.Combine(extendedDirectory, "*"), directoriesOnly: true))
            {
                FindResult findResult;
                while ((findResult = findOperation.GetNextResult()) != null)
                {
                    // Unfortunately there is no guarantee that the API will return only directories even if we ask for it
                    bool isDirectory = (findResult.Attributes & FileAttributes.FILE_ATTRIBUTE_DIRECTORY) == FileAttributes.FILE_ATTRIBUTE_DIRECTORY;

                    if ((findResult.Attributes & excludeAttributes) == 0
                        && isDirectory
                        && findResult.FileName != "."
                        && findResult.FileName != "..")
                    {
                        foreach (var child in EnumerateChildrenInternal(Paths.Combine(directory, findResult.FileName), childType, searchPattern,
                            searchOption, excludeAttributes, fileService))
                        {
                            yield return child;
                        }
                    }
                }
            }
        }
Exemple #13
0
        public ChatController(IUserService userservice, IChatRoomService chatService, IMessageService messageService, IFileService fileService)
        {
            UserService = userservice;
            ChatService = chatService;
            MessageService = messageService;
            FileService = fileService;
            config = new MapperConfiguration(cfg =>
            {
                cfg.CreateMap<User, UserChatViewModel>()
                .ForMember(dest => dest.UserFoto,
                            opt => opt.MapFrom(src => src.UserFoto.
                                                       Insert(src.UserFoto.LastIndexOf('/') + 1,
                                                       "mini/")));
                cfg.CreateMap<ChatRoom, ChatRoomPartialViewModel>();

                cfg.CreateMap<Message, MessageViewModels>()
                .ForMember(dest => dest.UserName, opt => opt.MapFrom(src => src.User.UserName))
                .ForMember(dest => dest.PathFotoUser,
                            opt => opt.MapFrom(src => src.User.UserFoto.
                                                       Insert(src.User.UserFoto.LastIndexOf('/') + 1,
                                                       "mini/")))
                .ForMember(dest => dest.FileId,
                            opt => opt.MapFrom(src => src.File.Id))
                .ForMember(dest => dest.FileName,
                            opt => opt.MapFrom(src => src.File.NameFile));
                cfg.CreateMap<ChatRoom, ChatRoomViewModels>()
                .ForMember(dest => dest.UserName, opt => opt.MapFrom(src => src.User.UserName))
                .ForMember(dest => dest.Users, opt => opt.MapFrom(src => src.Users))
                .ForMember(dest => dest.Messages, opt => opt.MapFrom(src => src.Messages));
            });
        }
        public PackageServiceTestBase()
        {
            _releaseStore = A.Fake<IReleaseStore>(opts => opts.Strict());
            _fileService = A.Fake<IFileService>(opts => opts.Strict());

            _SUT = new PackageService(_releaseStore, _fileService);
        }
Exemple #15
0
        public static JadeCore.Project.IProject Read(string path, IFileService fileService)
        {
            ProjectType xml;
            XmlSerializer serializer = new XmlSerializer(typeof(ProjectType));
            TextReader tr = new StreamReader(path);
            try
            {
                xml = (ProjectType)serializer.Deserialize(tr);
            }
            finally
            {
                tr.Close();
                tr.Dispose();
            }

            JadeCore.Project.IProject result = new JadeCore.Project.Project(xml.Name, FilePath.Make(path));

            foreach (FolderType f in xml.Folders)
            {
                result.AddFolder(MakeFolder(result, result.Directory, f, fileService));
            }
            foreach (FileType f in xml.Files)
            {
                result.AddItem(null, MakeFile(result.Directory, f, fileService));
            }
            return result;
        }
 /// <summary>
 /// public ctor - will generally just be used for unit testing
 /// </summary>
 /// <param name="contentService"></param>
 /// <param name="mediaService"></param>
 /// <param name="contentTypeService"></param>
 /// <param name="dataTypeService"></param>
 /// <param name="fileService"></param>
 /// <param name="localizationService"></param>
 /// <param name="packagingService"></param>
 /// <param name="entityService"></param>
 /// <param name="relationService"></param>
 /// <param name="sectionService"></param>
 /// <param name="treeService"></param>
 /// <param name="tagService"></param>
 public ServiceContext(
     IContentService contentService, 
     IMediaService mediaService, 
     IContentTypeService contentTypeService, 
     IDataTypeService dataTypeService, 
     IFileService fileService, 
     ILocalizationService localizationService, 
     PackagingService packagingService, 
     IEntityService entityService,
     IRelationService relationService,
     ISectionService sectionService,
     IApplicationTreeService treeService,
     ITagService tagService)
 {
     _tagService = new Lazy<ITagService>(() => tagService);     
     _contentService = new Lazy<IContentService>(() => contentService);        
     _mediaService = new Lazy<IMediaService>(() => mediaService);
     _contentTypeService = new Lazy<IContentTypeService>(() => contentTypeService);
     _dataTypeService = new Lazy<IDataTypeService>(() => dataTypeService);
     _fileService = new Lazy<IFileService>(() => fileService);
     _localizationService = new Lazy<ILocalizationService>(() => localizationService);
     _packagingService = new Lazy<PackagingService>(() => packagingService);
     _entityService = new Lazy<IEntityService>(() => entityService);
     _relationService = new Lazy<IRelationService>(() => relationService);
     _sectionService = new Lazy<ISectionService>(() => sectionService);
     _treeService = new Lazy<IApplicationTreeService>(() => treeService);
 }
Exemple #17
0
        /// <summary>
        /// Initializes a new instance of the <see cref="FileModule" /> class.
        /// </summary>
        /// <param name="fileService">The file service.</param>
        public FileModule(IFileService fileService)
        {
            if (fileService == null) throw new ArgumentNullException("fileService");
            _fileService = fileService;

            ListingHtml = ListingTemplate;
        }
Exemple #18
0
 public FormPostingHandler(IDocumentService documentService, IFileService fileService, MailSettings mailSettings, ISession session)
 {
     _documentService = documentService;
     _session = session;
     _fileService = fileService;
     _mailSettings = mailSettings;
 }
Exemple #19
0
        public ManifestService(IConfigurationService configurationService, IFileService fileService)
        {
            _configurationService = configurationService;
            _fileService = fileService;

            _manifestCollection = new Lazy<ManifestCollection>(LoadManifestCollection);
        }
Exemple #20
0
 public MediaSelectorService(ISession session, IFileService fileService, IImageProcessor imageProcessor, Site site)
 {
     _session = session;
     _fileService = fileService;
     _imageProcessor = imageProcessor;
     _site = site;
 }
 public SetupEcommerceWidgets(IWidgetService widgetService, IDocumentService documentService, IFormAdminService formAdminService, IFileService fileService)
 {
     _widgetService = widgetService;
     _documentService = documentService;
     _formAdminService = formAdminService;
     _fileService = fileService;
 }
		public void Setup()
		{
			_container = new MocksAndStubsContainer();
			_applicationSettings = _container.ApplicationSettings;
			_settingsService = _container.SettingsService;
			_fileService = new LocalFileService(_applicationSettings, _settingsService);

			try
			{
				// Delete any existing attachments folder
				DirectoryInfo directoryInfo = new DirectoryInfo(_applicationSettings.AttachmentsFolder);
				if (directoryInfo.Exists)
				{
					directoryInfo.Attributes = FileAttributes.Normal;
					directoryInfo.Delete(true);
				}

				Directory.CreateDirectory(_applicationSettings.AttachmentsFolder);
			}
			catch (IOException e)
			{
				Assert.Fail("Unable to delete the attachments folder " + _applicationSettings.AttachmentsFolder + ", does it have a lock/explorer window open, or Mercurial open?" + e.ToString());
			}
			catch (ArgumentException e)
			{
				Assert.Fail("Unable to delete the attachments folder " + _applicationSettings.AttachmentsFolder + ", is EasyMercurial open?" + e.ToString());
			}
		}
 /// <summary>
 /// DownloadsModule constructor.
 /// </summary>
 /// <param name="fileService">FileService dependency.</param>
 /// <param name="sessionManager">NHibernate session manager dependency.</param>
 public DownloadsModule(IFileService fileService,IFileResourceService fileResourceService, ISessionManager sessionManager, IContentItemService<FileResource> contentItemService)
 {
     this._sessionManager = sessionManager;
     this._fileService = fileService;
     this._contentItemService = contentItemService;
     this._fileResourceService = fileResourceService;
 }
 /// <summary>
 /// Constructor.
 /// </summary>
 public Install()
 {
     this._commonDao = IoC.Resolve<ICommonDao>();
     this._siteService = IoC.Resolve<ISiteService>();
     this._moduleLoader = IoC.Resolve<ModuleLoader>();
     this._fileService = IoC.Resolve<IFileService>();
 }
 public NetkanTransformer(
     IHttpService http,
     IFileService fileService,
     IModuleService moduleService,
     string githubToken,
     bool prerelease
 )
 {
     _transformers = InjectVersionedOverrideTransformers(new List<ITransformer>
     {
         new MetaNetkanTransformer(http),
         new SpacedockTransformer(new SpacedockApi(http)),
         new GithubTransformer(new GithubApi(githubToken), prerelease),
         new HttpTransformer(),
         new JenkinsTransformer(http),
         new InternalCkanTransformer(http, moduleService),
         new AvcTransformer(http, moduleService),
         new VersionEditTransformer(),
         new ForcedVTransformer(),
         new EpochTransformer(),
         // This is the "default" VersionedOverrideTransformer for compatability with overrides that don't
         // specify a before or after property.
         new VersionedOverrideTransformer(before: new string[] { null }, after: new string[] { null }),
         new DownloadAttributeTransformer(http, fileService),
         new GeneratedByTransformer(),
         new OptimusPrimeTransformer(),
         new StripNetkanMetadataTransformer(),
         new PropertySortTransformer()
     });
 }
 /// <summary>
 /// Initializes a new instance of the MainViewModel class.
 /// </summary>
 public AddPluginViewModel(IZipService zipService, IFileService fileService, ILiveWriterService liveWriterService)
 {
     _zipService = zipService;
     _fileService = fileService;
     _liveWriterService = liveWriterService;
     CanAdd = AppHelper.LiveWriterInstalled;
 }
 public DataManagementController(ICategoryService categoryService, IDataItemService dataItemService, IMemberService memberService, IFileService fileService)
 {
     this.categoryService = categoryService;
     this.dataItemService = dataItemService;
     this.memberService = memberService;
     this.fileService = fileService;
 }
Exemple #28
0
        public BuildArgumentParser(string taskName, string[] targets, string options, IFileService fileService)
            : base (fileService)
        {
            this.AddTarget(taskName);
            if (targets != null)
            {
                foreach (string target in targets)
                    this.AddTarget(target);
            }

            if (String.IsNullOrWhiteSpace(options)) { return; }

            // Options are in xml format <Option>value</Option> or <Option/> for default
            XmlReaderSettings settings = new XmlReaderSettings
            {
                ConformanceLevel = ConformanceLevel.Fragment
            };

            using (XmlReader reader = XmlReader.Create(new StringReader(options), settings))
            {
                while (reader.Read())
                {
                    if (reader.NodeType == XmlNodeType.Element)
                    {
                        this.AddOrUpdateOption(
                            optionName: reader.Name,
                            optionValue: reader.ReadString());
                    }
                }
            }
        }
Exemple #29
0
        static private JadeCore.Project.IProject Read(string name, StreamReader reader, FilePath projectPath, IFileService fileService)
        {
            IProject project = new JadeCore.Project.Project(name, projectPath);

            while (!reader.EndOfStream)
            {
                string line = reader.ReadLine();
                Match match = Regex.Match(line, _compileLineRegex);
                if (match.Success)
                {
                    string itemPath = match.Groups[1].Value;
                    itemPath = JadeUtils.IO.PathUtils.CombinePaths(projectPath.Directory, itemPath);
                    project.AddItem(null, new JadeCore.Project.FileItem(fileService.MakeFileHandle(itemPath)));
                    continue;
                }
                match = Regex.Match(line, _includeLineRegex);
                if (match.Success)
                {
                    string itemPath = match.Groups[1].Value;
                    itemPath = JadeUtils.IO.PathUtils.CombinePaths(projectPath.Directory, itemPath);
                    project.AddItem(null, new JadeCore.Project.FileItem(fileService.MakeFileHandle(itemPath)));
                    continue;
                }
            }            
            return project;
        }
Exemple #30
0
        static public JadeCore.Workspace.IWorkspace Read(FilePath path, IFileService fileService)
        {
            WorkspaceType xml;
            XmlSerializer serializer = new XmlSerializer(typeof(WorkspaceType));
            TextReader tr = new StreamReader(path.Str);
            try
            {                
                xml = (WorkspaceType)serializer.Deserialize(tr);                
            }
            finally
            {
                tr.Close();
                tr.Dispose();
            }

            JadeCore.Workspace.IWorkspace result = new JadeCore.Workspace.Workspace(xml.Name, path);
            foreach (FolderType f in xml.Folders)
            {
                result.AddFolder(MakeFolder(result, result.Directory, f, fileService));
            }
            foreach (ProjectType p in xml.Projects)
            {
                result.AddProject(MakeProject(result.Directory, p, fileService));
            }

            return result;
        }
Exemple #31
0
 /// <summary>
 /// Create an instance of <see cref="AssetsMovieService"/>
 /// </summary>
 public AssetsMovieService(ILoggingService loggingService, IFileService fileService)
 {
     _loggingService = loggingService;
     _fileService    = fileService;
 }
Exemple #32
0
 private void FileService_SavedStylesheet(IFileService sender, SaveEventArgs <Stylesheet> e)
 {
 }
Exemple #33
0
 // TODO: our weird events handling wants this for now
 private void FileService_DeletedStylesheet(IFileService sender, DeleteEventArgs <Stylesheet> e)
 {
 }
Exemple #34
0
 public PersistAndRestoreService(IFileService fileService, AppConfig config)
 {
     _fileService = fileService;
     _config      = config;
 }
 public ModuleController(Lazy <ShellService> shellService, IEnvironmentService environmentService, ISettingsService settingsService,
                         FileController fileController, WorkspaceController workspaceController, IFileService fileService,
                         Lazy <ShellViewModel> shellViewModel, ExportFactory <CodeEditorViewModel> codeEditorViewModelFactory, ExportFactory <InfoViewModel> infoViewModelFactory)
 {
     this.shellService               = shellService;
     this.environmentService         = environmentService;
     this.settingsService            = settingsService;
     this.fileController             = fileController;
     this.workspaceController        = workspaceController;
     this.shellViewModel             = shellViewModel;
     this.codeEditorViewModelFactory = codeEditorViewModelFactory;
     this.infoViewModelFactory       = infoViewModelFactory;
     this.infoCommand        = new DelegateCommand(ShowInfo);
     this.documentDataModels = new SynchronizingCollection <DocumentDataModel, DocumentFile>(fileService.DocumentFiles, CreateDocumentDataModel);
 }
 public CloudLibraryService(IApplicationLogger logger, IApplicationSettings settings, IFileService fileService)
 {
     _logger      = logger;
     _settings    = settings;
     _fileService = fileService;
 }
Exemple #37
0
 public NagServiceHelper(IDialogService dialogService, IFileService fileService)
 {
     _dialogService = dialogService ?? throw new ArgumentNullException("dialogService");
     _fileService   = fileService ?? throw new ArgumentNullException("fileService");
 }
 public LoginPage()
 {
     this.InitializeComponent();
     this._memberService = new MemberService();
     this._fileService   = new LocalFileService();
 }
 /// <summary>
 /// Core service
 /// </summary>
 /// <param name="exportService">Export service</param>
 /// <param name="loggingService">Logging service</param>
 /// <param name="fileService">The file service</param>
 /// <param name="cachingService">The caching service</param>
 public CoreService(IExportService exportService, ILoggingService loggingService, IFileService fileService,
                    ICachingService cachingService)
 {
     _exportService  = exportService;
     _loggingService = loggingService;
     _fileService    = fileService;
     _cachingService = cachingService;
 }
        public VideoPlayerViewModel(MediaPlayerBuilder playerService,
                                    IVideoLibrary videoLibrary, IVolumeService volumeController, IBrightnessService brightnessController,
                                    IOrientationService orientationService, IStatusBarService statusBarService, IFileService fileService)
        {
            App.DebugLog("");
            this.videoLibrary       = videoLibrary;
            this.orientationService = orientationService;
            this.statusBarService   = statusBarService;
            FilePickerVM            = new FilePickerViewModel(fileService);
            FilePickerVM.SubtitleFileTappedCommand = new Command <object>(o => SubtitleFileTapped(o));
            ToggleFavoriteCommand           = new Command(ToggleFavorite);
            ToggleControlsVisibilityCommand = new Command(ToggleControlsVisibility);
            ToggleAudioTracksCommand        = new Command(ToggleAudioTracks);
            ToggleSubtitlesCommand          = new Command(ToggleSubtitles);
            ToggleMediaInfoCommand          = new Command(ToggleMediaInfo);
            SelectSubtitlesCommand          = new Command <object>(SelectSubtitles, (e) => canChangeSubtitles);
            SelectAudioTrackCommand         = new Command <object>(SelectAudioTrack, (e) => canChangeAudioTrack);
            OpenSubtitlesFromFileCommand    = new Command(OpenSubtitlesFilePicker);

            volumeViewModel     = new VolumeViewModel(volumeController);
            brightnessViewModel = new BrightnessViewModel(brightnessController);

            favoriteScenes = new FavoritesCollection(favoriteSceneDuration);

            VlcPlayerHelper = new VlcPlayerHelper(playerService);
        }
Exemple #41
0
 public ProductController(EcommerceDbContext context, IFileService fileService) //, IFileService fileService
 {
     _context         = context;
     this.fileService = fileService;
 }
Exemple #42
0
 public TreeNodeController(IFileService fileService)
 {
     _fileService = fileService;
 }
Exemple #43
0
        public ProjectWriter(IFileService fileService)
        {
            Argument.IsNotNull(() => fileService);

            _fileService = fileService;
        }
Exemple #44
0
 /// <summary>
 /// Constructs a new instance of your type.
 /// </summary>
 /// <param name="rootResolver">Instance used to resolve the root folder of your app.</param>
 /// <param name="service">Underlaying file service implementation.</param>
 public MoveFile(IRootResolver rootResolver, IFileService service)
 {
     _rootResolver = rootResolver;
     _service      = service;
 }
 public MarsRoverService(IMapper mapper, IOptions <WepApiAppSettings> appSettings, IFileService fileWrapper, IWebService webApiService)
 {
     this._mapper       = mapper;
     this._appSettings  = appSettings.Value;
     this.webApiService = webApiService;
     this._fileWrapper  = fileWrapper;
 }
 /// <summary>
 /// コンストラクタ。
 /// </summary>
 /// <param name="serviceLocator">サービスロケーター</param>
 public FileController(IServiceLocator serviceLocator)
     : base(serviceLocator)
 {
     businessService = serviceLocator.GetInstance <IBusinessService>();
     fileService     = serviceLocator.GetInstance <IFileService>();
 }
 public UploadController(IFileService fileService)
 {
     this.fileService = fileService;
 }
Exemple #48
0
 public IlrValidationErrorsProvider(IFileService fileService, IJsonSerializationService jsonSerializationService)
     : base(fileService, jsonSerializationService)
 {
 }
Exemple #49
0
 public UserService(IAppContext context, IMapper mapper, IFileService fileHelper)
 {
     _context    = context ?? throw new ArgumentNullException(nameof(context));
     _mapper     = mapper ?? throw new ArgumentNullException(nameof(mapper));
     _fileHelper = fileHelper ?? throw new ArgumentNullException(nameof(fileHelper));
 }
 public CatsController(ICatService catService, IFileService fileService, IOptions <ApplicationOptions> settings)
 {
     _catService         = catService;
     _fileService        = fileService;
     ApplicationSettings = settings.Value;
 }
Exemple #51
0
 public FileCommandParser(IFileService fileService)
 {
     _fileService = fileService;
 }
 public FileController()
 {
     service = new FileService();
 }
 public FileController(IFileService fileService)
 {
     _fileService = fileService;
 }
Exemple #54
0
 public FileController(IFileService fileService, IMapper mapper)
 {
     this.fileService = fileService;
     this.mapper      = mapper;
 }
Exemple #55
0
 public MainViewModel(IFileService fileService)
 {
     _FileService = fileService;
 }
Exemple #56
0
 public GalleryController(IUnitOfWork unitOfWork, IGalleryService galleryService, IFileService fileService)
 {
     _fileService    = fileService;
     _galleryService = galleryService;
     _unitOfWork     = unitOfWork;
 }
Exemple #57
0
 protected FileSystemInformation(IFileService fileService)
 {
     this.FileService = fileService;
 }
 public DocumentsController(ModelDataContext modelDB, IConfiguration config, IServiceProvider serviceProvider)
 {
     _modelDB     = modelDB;
     _config      = config;
     _fileService = (IFileService)serviceProvider.GetRequiredService(Type.GetType(config["Files:Type"]));
 }
Exemple #59
0
 internal static IFileSystemInformation Create(string path, System.IO.FileAttributes attributes, IFileService fileService)
 {
     if (attributes.HasFlag(System.IO.FileAttributes.Directory))
     {
         return(DirectoryInformation.Create(path, attributes, fileService));
     }
     else
     {
         // Should only be using attributes for root directories
         throw new InvalidOperationException();
     }
 }
Exemple #60
0
 internal static IFileSystemInformation Create(NativeMethods.FileManagement.FindResult findResult, IFileService fileService)
 {
     if ((findResult.Attributes & System.IO.FileAttributes.Directory) != 0)
     {
         return(DirectoryInformation.Create(findResult, fileService));
     }
     else
     {
         return(FileInformation.Create(findResult, fileService));
     }
 }