• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IFileSystemProvider类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: JsonLocalizerManager

 public JsonLocalizerManager(string paths, IFileSystemProvider fileProvider, IJsonSerializer serializer)
 {
     this.fileProvider = fileProvider;
     this.serializer = serializer;
     jsonResources = new List<JsonResource>();
     LoadResources(paths.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries));
 }
开发者ID:Caiqb-kooboo,项目名称:CBlog,代码行数:7,代码来源:JsonLocalizerManager.cs


示例2: VsSettings

        public VsSettings(ISolutionManager solutionManager, ISettings defaultSettings, IFileSystemProvider fileSystemProvider)
        {
            if (solutionManager == null)
            {
                throw new ArgumentNullException("solutionManager");
            }
            if (defaultSettings == null)
            {
                throw new ArgumentNullException("defaultSettings");
            }
            if (fileSystemProvider == null)
            {
                throw new ArgumentNullException("fileSystemProvider");
            }

            _solutionManager = solutionManager;
            _defaultSettings = defaultSettings;
            _fileSystemProvider = fileSystemProvider;

            EventHandler eventHandler = (src, eventArgs) =>
            {
                _solutionSettings = null;
            };
            _solutionManager.SolutionOpened += eventHandler;
            _solutionManager.SolutionClosed += eventHandler;
        }
开发者ID:monoman,项目名称:NugetCracker,代码行数:26,代码来源:VsSettings.cs


示例3: CreateProjectSystem

        public static IProjectSystem CreateProjectSystem(Project project, IFileSystemProvider fileSystemProvider)
        {
            if (project == null)
            {
                throw new ArgumentNullException("project");
            }

            if (String.IsNullOrEmpty(project.FullName))
            {
                throw new InvalidOperationException(
                    String.Format(CultureInfo.CurrentCulture, VsResources.DTE_ProjectUnsupported, project.Name));
            }

            // Try to get a factory for the project type guid            
            foreach (var guid in project.GetProjectTypeGuids())
            {
                ProjectThunk factory;
                if (_factories.TryGetValue(guid, out factory))
                {
                    return factory(project, fileSystemProvider);
                }
            }

            // Fall back to the default if we have no special project types
            return new VsProjectSystem(project, fileSystemProvider);
        }
开发者ID:atheken,项目名称:nuget,代码行数:26,代码来源:VsProjectSystemFactory.cs


示例4: RepositorySettings

        public RepositorySettings(ISolutionManager solutionManager, IFileSystemProvider fileSystemProvider, IVsSourceControlTracker sourceControlTracker)
        {
            if (solutionManager == null)
            {
                throw new ArgumentNullException("solutionManager");
            }

            if (fileSystemProvider == null)
            {
                throw new ArgumentNullException("fileSystemProvider");
            }

            if (sourceControlTracker == null)
            {
                throw new ArgumentNullException("sourceControlTracker");
            }

            _solutionManager = solutionManager;
            _fileSystemProvider = fileSystemProvider;

            EventHandler resetConfiguration = (sender, e) =>
            {
                // Kill our configuration cache when someone closes the solution
                _configurationPath = null;
                _fileSystem = null;
            };

            _solutionManager.SolutionClosing += resetConfiguration;
            sourceControlTracker.SolutionBoundToSourceControl += resetConfiguration;
        }
开发者ID:xero-github,项目名称:Nuget,代码行数:30,代码来源:RepositorySettings.cs


示例5: RepositorySettings

 internal RepositorySettings(
     ISolutionManager solutionManager, 
     IFileSystemProvider fileSystemProvider, 
     IVsSourceControlTracker sourceControlTracker) : 
     this(solutionManager, fileSystemProvider, sourceControlTracker, machineWideSettings: null)
 {
 }
开发者ID:Newtopian,项目名称:nuget,代码行数:7,代码来源:RepositorySettings.cs


示例6: VsPackageManagerFactory

        public VsPackageManagerFactory(ISolutionManager solutionManager,
            IPackageRepositoryFactory repositoryFactory,
            IFileSystemProvider fileSystemProvider,
            IRepositorySettings repositorySettings,
            IRecentPackageRepository recentPackagesRepository)
        {
            if (solutionManager == null) {
                throw new ArgumentNullException("solutionManager");
            }
            if (repositoryFactory == null) {
                throw new ArgumentNullException("repositoryFactory");
            }
            if (fileSystemProvider == null) {
                throw new ArgumentNullException("fileSystemProvider");
            }
            if (repositorySettings == null) {
                throw new ArgumentNullException("repositorySettings");
            }

            _fileSystemProvider = fileSystemProvider;
            _repositorySettings = repositorySettings;
            _solutionManager = solutionManager;
            _repositoryFactory = repositoryFactory;
            _recentPackageRepository = recentPackagesRepository;

            _solutionManager.SolutionClosing += (sender, e) => {
                _repositoryInfo = null;
            };
        }
开发者ID:jacksonh,项目名称:nuget,代码行数:29,代码来源:VsPackageManagerFactory.cs


示例7: VsSourceControlTracker

        public VsSourceControlTracker(
            ISolutionManager solutionManager, 
            IFileSystemProvider fileSystemProvider,
            IVsTrackProjectDocuments2 projectTracker,
            ISettings solutionSettings)
        {
            if (projectTracker == null)
            {
                throw new ArgumentNullException("projectTracker");
            }

            _solutionManager = solutionManager;
            _projectTracker = projectTracker;
            _fileSystemProvider = fileSystemProvider;
            _solutionSettings = solutionSettings;
            _projectDocumentListener = new TrackProjectDocumentEventListener(this);

            _solutionManager.SolutionOpened += OnSolutionOpened;
            _solutionManager.SolutionClosed += OnSolutionClosed;

            if (_solutionManager.IsSolutionOpen)
            {
                StartTracking();
            }
        }
开发者ID:xero-github,项目名称:Nuget,代码行数:25,代码来源:VsSourceControlTracker.cs


示例8: before_each_spec

        public override void before_each_spec()
        {
            var dependencyResolver = MockRepository.GenerateStub<IDependencyResolver>();
            metaDataSynchroniser = MockRepository.GenerateStub<IMetaDataSynchroniser>();
            fileSystemProvider = MockRepository.GenerateStub<IFileSystemProvider>();
            packageBuilder = MockRepository.GenerateStub<IPackageCommand>();

            var configReader = new BooBuildConfigReader();

            dependencyResolver.Stub(x => x.Resolve<IBuildConfigReader>()).Return(configReader);

            dependencyResolver.Stub(x => x.Resolve<SVNSourceControl>()).Return(
                new SourceControlDouble("http://someurl.com/"));

            dependencyResolver.Stub(x => x.Resolve<IPackageCommand>("install")).Return(packageBuilder);

            fileSystemProvider.Stub(x => x.GetTemporaryBuildDirectory(Arg<DirectoryInfo>.Is.TypeOf)).Return(
                new DirectoryInfo(@"C:\temp\build"));

            IoC.InitializeWith(dependencyResolver);

            fileSystemProvider.Stub(x => x.GetHornRootDirectory(Arg<string>.Is.TypeOf)).Return(FileSystemHelper.GetFakeDummyHornDirectory());

            fileSystemProvider.Stub(x => x.CreateTemporaryHornDirectory(Arg<string>.Is.TypeOf)).Return(new DirectoryInfo(HornConfig.Settings.HornTempDirectory));

            fileSystemProvider.Stub(x => x.ZipFolder(Arg<DirectoryInfo>.Is.TypeOf, Arg<DirectoryInfo>.Is.TypeOf, Arg<string>.Is.TypeOf)).Return(
                new FileInfo(@"C:\zip"));

            siteStructureBuilder = GetSiteBuilder();

            siteStructureBuilder.Initialise();

            siteStructureBuilder.Build();
        }
开发者ID:kkozmic,项目名称:horn_src,代码行数:34,代码来源:BuilderIniitialiseBase.cs


示例9: AddBindingRedirects

        private static IEnumerable<AssemblyBinding> AddBindingRedirects(
            Project project, 
            IFileSystemProvider fileSystemProvider, 
            AppDomain domain, 
            IDictionary<string, HashSet<string>> projectAssembliesCache, 
            IVsFrameworkMultiTargeting frameworkMultiTargeting)
        {
            var redirects = Enumerable.Empty<AssemblyBinding>();

            // Create a project system
            IFileSystem fileSystem = VsProjectSystemFactory.CreateProjectSystem(project, fileSystemProvider);

            // Run this on the UI thread since it enumerates all references
            IEnumerable<string> assemblies = ThreadHelper.Generic.Invoke(() => project.GetAssemblyClosure(fileSystemProvider, projectAssembliesCache));

            redirects = BindingRedirectResolver.GetBindingRedirects(assemblies, domain);

            if (frameworkMultiTargeting != null)
            {
                // filter out assemblies that already exist in the target framework (CodePlex issue #3072)
                FrameworkName targetFrameworkName = project.GetTargetFrameworkName();
                redirects = redirects.Where(p => !FrameworkAssemblyResolver.IsHigherAssemblyVersionInFramework(p.Name, p.AssemblyNewVersion, targetFrameworkName, fileSystemProvider));
            }

            // Create a binding redirect manager over the configuration
            var manager = new BindingRedirectManager(fileSystem, project.GetConfigurationFile());

            // Add the redirects
            manager.AddBindingRedirects(redirects);

            return redirects;
        }
开发者ID:Newtopian,项目名称:nuget,代码行数:32,代码来源:RuntimeHelpers.cs


示例10: PackageRestoreManager

 internal PackageRestoreManager(
     DTE dte,
     ISolutionManager solutionManager,
     IFileSystemProvider fileSystemProvider,
     IPackageRepositoryFactory packageRepositoryFactory,
     IVsPackageSourceProvider packageSourceProvider,
     IVsPackageManagerFactory packageManagerFactory,
     IVsPackageInstallerEvents packageInstallerEvents,
     IPackageRepository localCacheRepository,
     IVsThreadedWaitDialogFactory waitDialogFactory,
     ISettings settings)
 {
     Debug.Assert(solutionManager != null);
     _dte = dte;
     _fileSystemProvider = fileSystemProvider;
     _solutionManager = solutionManager;
     _packageRepositoryFactory = packageRepositoryFactory;
     _packageSourceProvider = packageSourceProvider;
     _waitDialogFactory = waitDialogFactory;
     _packageManagerFactory = packageManagerFactory;
     _localCacheRepository = localCacheRepository;
     _settings = settings;
     _solutionManager.ProjectAdded += OnProjectAdded;
     _solutionManager.SolutionOpened += OnSolutionOpenedOrClosed;
     _solutionManager.SolutionClosed += OnSolutionOpenedOrClosed;
     packageInstallerEvents.PackageReferenceAdded += OnPackageReferenceAdded;
 }
开发者ID:Mailaender,项目名称:xamarin-nuget,代码行数:27,代码来源:PackageRestoreManager.cs


示例11: AddBindingRedirectCommand

 public AddBindingRedirectCommand(
     IFileSystemProvider fileSystemProvider,
     IVsFrameworkMultiTargeting frameworkMultiTargeting)
     : this()
 {
     _fileSystemProvider = fileSystemProvider;
     _frameworkMultiTargeting = frameworkMultiTargeting;
 }
开发者ID:sistoimenov,项目名称:NuGet2,代码行数:8,代码来源:AddBindingRedirectCommand.cs


示例12: JsonLocalizer

 public JsonLocalizer(string paths, IFileSystemProvider fileProvider, IJsonSerializer jsonSerializer)
 {
     jsonResources = new List<JsonResource>();
     this.fileProvider = fileProvider;
     this.fileProvider.SetRootPath("~/".GetPhysicalPath());
     this.jsonSerializer = jsonSerializer;
     LoadResources(paths.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries));
 }
开发者ID:cairabbit,项目名称:daf,代码行数:8,代码来源:JsonLocalizer.cs


示例13: SetupFileSystemProvider

 private void SetupFileSystemProvider()
 {
     var mockFileSystemProvider = new Mock<IFileSystemProvider>();
     mockFileSystemProvider
         .Setup(x => x.EnumerateFiles(It.IsAny<SearchParameters>()))
         .Returns<IEnumerable<string>>(r => configurations.Keys);
     fileSystemProvider = mockFileSystemProvider.Object;
 }
开发者ID:patrickhuber,项目名称:BootstrapConfig,代码行数:8,代码来源:CrawlerTests.cs


示例14: SiteStructureBuilder

        public SiteStructureBuilder(IMetaDataSynchroniser metaDataSynchroniser, IFileSystemProvider fileSystemProvider, string dropDirectoryPath)
        {
            this.metaDataSynchroniser = metaDataSynchroniser;
            this.fileSystemProvider = fileSystemProvider;
            dropDirectory = new DirectoryInfo(dropDirectoryPath);
            Categories = new List<Category>();

            frequency = new TimeSpan(0, 0, HornConfig.Settings.BuildFrequency, 0);
        }
开发者ID:emmekappa,项目名称:horn_src,代码行数:9,代码来源:SiteStructureBuilder.cs


示例15: VsPackageManagerFactory

 public VsPackageManagerFactory(ISolutionManager solutionManager,
                                IPackageRepositoryFactory repositoryFactory,
                                IVsPackageSourceProvider packageSourceProvider,
                                IFileSystemProvider fileSystemProvider,
                                IRepositorySettings repositorySettings,
                                IRecentPackageRepository recentPackagesRepository,
                                VsPackageInstallerEvents packageEvents) :
     this(solutionManager, repositoryFactory, packageSourceProvider, fileSystemProvider, repositorySettings, recentPackagesRepository, packageEvents, MachineCache.Default)
 {
 }
开发者ID:monoman,项目名称:NugetCracker,代码行数:10,代码来源:VsPackageManagerFactory.cs


示例16: AddBindingRedirects

        public static IEnumerable<AssemblyBinding> AddBindingRedirects(Project project, IFileSystemProvider fileSystemProvider, AppDomain domain)
        {
            if (project.SupportsBindingRedirects())
            {
                // When we're adding binding redirects explicitly, don't check the project type
                return AddBindingRedirects(project, fileSystemProvider, domain, new Dictionary<string, HashSet<string>>(StringComparer.OrdinalIgnoreCase), checkProjectType: false);
            }

            return Enumerable.Empty<AssemblyBinding>();
        }
开发者ID:shrknt35,项目名称:sonarlint-vs,代码行数:10,代码来源:RuntimeHelpers.cs


示例17: FileController

 public FileController(IFileSystemProvider fileProvider)
 {
     this.fileProvider = fileProvider;
     rootPath = ConfigurationManager.AppSettings["UploadPath"] ?? "/Uploads/";
     if (!rootPath.StartsWith("/"))
         rootPath = "/" + rootPath;
     if (!rootPath.EndsWith("/"))
         rootPath += "/";
     this.fileProvider.SetRootPath(("~" + rootPath).GetPhysicalPath());
 }
开发者ID:cairabbit,项目名称:daf,代码行数:10,代码来源:FileController.cs


示例18: Before_each_spec

        protected override void Before_each_spec()
        {
            base.Before_each_spec();

            sourceControl = new SourceControlDouble("http://localhost/horn");

            packageTree = new PackageTree(rootDirectory, null);

            fileSystemProvider = CreateStub<IFileSystemProvider>();
        }
开发者ID:kkozmic,项目名称:horn_src,代码行数:10,代码来源:GetSpecificationBase.cs


示例19: AddBindingRedirectCommand

 public AddBindingRedirectCommand(
     ISolutionManager solutionManager, 
     IHttpClientEvents httpClientEvents, 
     IFileSystemProvider fileSystemProvider,
     IVsFrameworkMultiTargeting frameworkMultiTargeting)
     : base(solutionManager, null, httpClientEvents)
 {
     _solutionManager = solutionManager;
     _fileSystemProvider = fileSystemProvider;
     _frameworkMultiTargeting = frameworkMultiTargeting;
 }
开发者ID:Newtopian,项目名称:nuget,代码行数:11,代码来源:AddBindingRedirectCommand.cs


示例20: VsPackageManagerFactory

        public VsPackageManagerFactory(ISolutionManager solutionManager,
                                       IPackageRepositoryFactory repositoryFactory,
                                       IVsPackageSourceProvider packageSourceProvider,
                                       IFileSystemProvider fileSystemProvider,
                                       IRepositorySettings repositorySettings,
                                       VsPackageInstallerEvents packageEvents,
                                       IPackageRepository activePackageSourceRepository,
                                       IVsFrameworkMultiTargeting frameworkMultiTargeting,
									   IMachineWideSettings machineWideSettings)
        {
            if (solutionManager == null)
            {
                throw new ArgumentNullException("solutionManager");
            }
            if (repositoryFactory == null)
            {
                throw new ArgumentNullException("repositoryFactory");
            }
            if (packageSourceProvider == null)
            {
                throw new ArgumentNullException("packageSourceProvider");
            }
            if (fileSystemProvider == null)
            {
                throw new ArgumentNullException("fileSystemProvider");
            }
            if (repositorySettings == null)
            {
                throw new ArgumentNullException("repositorySettings");
            }
            if (packageEvents == null)
            {
                throw new ArgumentNullException("packageEvents");
            }
            if (activePackageSourceRepository == null)
            {
                throw new ArgumentNullException("activePackageSourceRepository");
            }

            _fileSystemProvider = fileSystemProvider;
            _repositorySettings = repositorySettings;
            _solutionManager = solutionManager;
            _repositoryFactory = repositoryFactory;
            _packageSourceProvider = packageSourceProvider;
            _packageEvents = packageEvents;
            _activePackageSourceRepository = activePackageSourceRepository;
            _frameworkMultiTargeting = frameworkMultiTargeting;
			_machineWideSettings = machineWideSettings;

            _solutionManager.SolutionClosing += (sender, e) =>
            {
                _repositoryInfo = null;
            };
        }
开发者ID:riteshparekh,项目名称:NuGet,代码行数:54,代码来源:VsPackageManagerFactory.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IFileSystemResourceAccessor类代码示例发布时间:2022-05-24
下一篇:
C# IFileSystem类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap