当前位置: 首页>>代码示例>>C#>>正文


C# IDirectoryService类代码示例

本文整理汇总了C#中IDirectoryService的典型用法代码示例。如果您正苦于以下问题:C# IDirectoryService类的具体用法?C# IDirectoryService怎么用?C# IDirectoryService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IDirectoryService类属于命名空间,在下文中一共展示了IDirectoryService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: LoginViewModel

		public LoginViewModel (IDirectoryService service)
		{
			this.service = service;

			Username = "";
			Password = "";
		}
开发者ID:JeffHarms,项目名称:xamarin-forms-samples-1,代码行数:7,代码来源:LoginViewModel.cs

示例2: GetImages

        public List<LocalImageInfo> GetImages(IHasImages item, IDirectoryService directoryService)
        {
            var parentPath = Path.GetDirectoryName(item.Path);

            var parentPathFiles = directoryService.GetFileSystemEntries(parentPath)
                .ToList();

            var nameWithoutExtension = _fileSystem.GetFileNameWithoutExtension(item.Path);

            var files = GetFilesFromParentFolder(nameWithoutExtension, parentPathFiles);

            if (files.Count > 0)
            {
                return files;
            }

            var metadataPath = Path.Combine(parentPath, "metadata");

            if (parentPathFiles.Any(i => string.Equals(i.FullName, metadataPath, StringComparison.OrdinalIgnoreCase)))
            {
                return GetFilesFromParentFolder(nameWithoutExtension, directoryService.GetFiles(metadataPath));
            }

            return new List<LocalImageInfo>();
        }
开发者ID:NickBolles,项目名称:Emby,代码行数:25,代码来源:EpisodeLocalImageProvider.cs

示例3: ImageRefreshOptions

        public ImageRefreshOptions(IDirectoryService directoryService)
        {
            ImageRefreshMode = ImageRefreshMode.Default;
            DirectoryService = directoryService;

            ReplaceImages = new List<ImageType>();
        }
开发者ID:Ceten,项目名称:MediaBrowser,代码行数:7,代码来源:MetadataRefreshOptions.cs

示例4: LoginViewModel

        public LoginViewModel(IDirectoryService service)
        {
            this.service = service;

            Username = string.Empty;
            Password = string.Empty;
        }
开发者ID:tranuydu,项目名称:prebuilt-apps,代码行数:7,代码来源:LoginViewModel.cs

示例5: SetInitialItemValues

        /// <summary>
        /// Sets the initial item values.
        /// </summary>
        /// <param name="item">The item.</param>
        /// <param name="parent">The parent.</param>
        /// <param name="fileSystem">The file system.</param>
        /// <param name="libraryManager">The library manager.</param>
        /// <param name="directoryService">The directory service.</param>
        /// <exception cref="System.ArgumentException">Item must have a path</exception>
        public static void SetInitialItemValues(BaseItem item, Folder parent, IFileSystem fileSystem, ILibraryManager libraryManager, IDirectoryService directoryService)
        {
            // This version of the below method has no ItemResolveArgs, so we have to require the path already being set
            if (string.IsNullOrWhiteSpace(item.Path))
            {
                throw new ArgumentException("Item must have a Path");
            }

            // If the resolver didn't specify this
            if (parent != null)
            {
                item.Parent = parent;
            }

            item.Id = libraryManager.GetNewItemId(item.Path, item.GetType());

            item.IsLocked = item.Path.IndexOf("[dontfetchmeta]", StringComparison.OrdinalIgnoreCase) != -1 ||
                item.Parents.Any(i => i.IsLocked);

            // Make sure DateCreated and DateModified have values
            var fileInfo = directoryService.GetFile(item.Path);
            item.DateModified = fileSystem.GetLastWriteTimeUtc(fileInfo);
            SetDateCreated(item, fileSystem, fileInfo);

            EnsureName(item, fileInfo);
        }
开发者ID:jrags56,项目名称:MediaBrowser,代码行数:35,代码来源:ResolverHelper.cs

示例6: AppDataService

        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;
        }
开发者ID:WildGums,项目名称:Orchestra,代码行数:27,代码来源:AppDataService.cs

示例7: RibbonViewModel

        public RibbonViewModel(INavigationService navigationService, IUIVisualizerService uiVisualizerService,
            ICommandManager commandManager, IRecentlyUsedItemsService recentlyUsedItemsService, IProcessService processService,
            IMessageService messageService, ISelectDirectoryService selectDirectoryService, IDirectoryService directoryService)
        {
            Argument.IsNotNull(() => navigationService);
            Argument.IsNotNull(() => uiVisualizerService);
            Argument.IsNotNull(() => commandManager);
            Argument.IsNotNull(() => recentlyUsedItemsService);
            Argument.IsNotNull(() => processService);
            Argument.IsNotNull(() => messageService);
            Argument.IsNotNull(() => selectDirectoryService);
            Argument.IsNotNull(() => directoryService);

            _navigationService = navigationService;
            _uiVisualizerService = uiVisualizerService;
            _recentlyUsedItemsService = recentlyUsedItemsService;
            _processService = processService;
            _messageService = messageService;
            _selectDirectoryService = selectDirectoryService;
            _directoryService = directoryService;

            OpenProject = new Command(OnOpenProjectExecute);
            OpenRecentlyUsedItem = new Command<string>(OnOpenRecentlyUsedItemExecute);
            OpenInExplorer = new Command<string>(OnOpenInExplorerExecute);
            UnpinItem = new Command<string>(OnUnpinItemExecute);
            PinItem = new Command<string>(OnPinItemExecute);

            ShowKeyboardMappings = new Command(OnShowKeyboardMappingsExecute);

            commandManager.RegisterCommand("File.Open", OpenProject, this);

            var assembly = AssemblyHelper.GetEntryAssembly();
            Title = assembly.Title();
        }
开发者ID:WildGums,项目名称:Orchestra,代码行数:34,代码来源:RibbonViewModel.cs

示例8: EndpointResolverService

 public EndpointResolverService(IDirectoryService directoryService, IDefaultEndpointConfiguration defaultEndpointConfiguration, IUrlBuilder urlBuilder, IDirectoryRepository directoryRepository, ILogger logger)
 {
     _directoryService = directoryService;
     _defaultEndpointConfiguration = defaultEndpointConfiguration;
     _urlBuilder = urlBuilder;
     _directoryRepository = directoryRepository;
     _logger = logger;
 }
开发者ID:letmeproperty,项目名称:callcentre,代码行数:8,代码来源:EndpointResolverService.cs

示例9: DirectoryController

 public DirectoryController(IEndpointResolverService endpointResolverService, IAccountSettings accountSettings, ICallService callService, ILogger logger, IDirectoryService directoryService)
 {
     _endpointResolverService = endpointResolverService;
     _accountSettings = accountSettings;
     _callService = callService;
     _logger = logger;
     _directoryService = directoryService;
 }
开发者ID:letmeproperty,项目名称:callcentre,代码行数:8,代码来源:DirectoryController.cs

示例10: GetImages

        public List<LocalImageInfo> GetImages(IHasImages item, IDirectoryService directoryService)
        {
            var files = GetFiles(item, true, directoryService).ToList();

            var list = new List<LocalImageInfo>();

            PopulateImages(item, list, files, true, directoryService);

            return list;
        }
开发者ID:bigjohn322,项目名称:MediaBrowser,代码行数:10,代码来源:LocalImageProvider.cs

示例11: SearchViewModel

		public SearchViewModel (IDirectoryService service, Search search)
		{
			if (service == null) throw new ArgumentNullException ("service");
			this.service = service;

			if (search == null) throw new ArgumentNullException ("search");
			this.search = search;

			SetGroupedPeople ();
		}
开发者ID:JeffHarms,项目名称:xamarin-forms-samples-1,代码行数:10,代码来源:SearchViewModel.cs

示例12: HasChanged

        public bool HasChanged(IHasMetadata item, IDirectoryService directoryService)
        {
            var liveTvItem = item as ILiveTvRecording;

            if (liveTvItem != null)
            {
                return !liveTvItem.HasImage(ImageType.Primary);
            }
            return false;
        }
开发者ID:paul-777,项目名称:Emby,代码行数:10,代码来源:RecordingImageProvider.cs

示例13: CodeGenerationService

        public CodeGenerationService(IEntityPluralService entityPluralService, IFileService fileService, IDirectoryService directoryService)
        {
            Argument.IsNotNull(() => entityPluralService);
            Argument.IsNotNull(() => fileService);
            Argument.IsNotNull(() => directoryService);

            _entityPluralService = entityPluralService;
            _fileService = fileService;
            _directoryService = directoryService;
        }
开发者ID:WildGums,项目名称:Orc.CsvHelper,代码行数:10,代码来源:CodeGenerationService.cs

示例14: HasChanged

        public bool HasChanged(IHasMetadata item, MetadataStatus status, IDirectoryService directoryService)
        {
            var liveTvItem = item as LiveTvProgram;

            if (liveTvItem != null)
            {
                return !liveTvItem.HasImage(ImageType.Primary);
            }
            return false;
        }
开发者ID:rezafouladian,项目名称:Emby,代码行数:10,代码来源:ProgramImageProvider.cs

示例15: HasChanged

        public bool HasChanged(IHasMetadata item, IDirectoryService directoryService, DateTime date)
        {
            var channelItem = item as IChannelItem;

            if (channelItem != null)
            {
                return !channelItem.HasImage(ImageType.Primary) && !string.IsNullOrWhiteSpace(channelItem.OriginalImageUrl);
            }
            return false;
        }
开发者ID:Sile626,项目名称:MediaBrowser,代码行数:10,代码来源:ChannelItemImageProvider.cs


注:本文中的IDirectoryService类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。