本文整理汇总了C#中IFileSystemService类的典型用法代码示例。如果您正苦于以下问题:C# IFileSystemService类的具体用法?C# IFileSystemService怎么用?C# IFileSystemService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IFileSystemService类属于命名空间,在下文中一共展示了IFileSystemService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FilesController
public FilesController(IFileSystemService fileSystemService, IUnitOfWorkFactory unitOfWorkFactory, ILogService logService, ICacheWrapper cacheWrapper)
{
_fileSystemService = fileSystemService;
_unitOfWorkFactory = unitOfWorkFactory;
_logService = logService;
_cacheWrapper = cacheWrapper;
}
示例2: Setup
public void Setup()
{
this.mr = new MockRepository();
this.fsSvc = mr.StrictMock<IFileSystemService>();
this.tllSvc = mr.Stub<ITypeLibraryLoaderService>();
this.services = mr.StrictMock<IServiceProvider>();
var cfgSvc = mr.Stub<IConfigurationService>();
var env = mr.Stub<OperatingEnvironment>();
this.arch = new M68kArchitecture();
this.rtls = new List<RtlInstruction>();
this.m = new RtlEmitter(rtls);
cfgSvc.Stub(c => c.GetEnvironment("amigaOS")).Return(env);
env.Stub(e => e.TypeLibraries).Return(new List<ITypeLibraryElement>());
env.Stub(e => e.CharacteristicsLibraries).Return(new List<ITypeLibraryElement>());
env.Stub(e => e.Options).Return(new Dictionary<string, object>
{
{ "versionDependentLibraries", new Dictionary<string,object>
{
{ "33", new List<object> { "exec_v33", "dos_v33" } },
{ "34", new List<object> { "exec_v34", "dos_v34" } },
}
}
});
this.services.Stub(s => s.GetService(typeof(IConfigurationService))).Return(cfgSvc);
this.services.Stub(s => s.GetService(typeof(IFileSystemService))).Return(fsSvc);
this.services.Stub(s => s.GetService(typeof(ITypeLibraryLoaderService))).Return(tllSvc);
this.frame = new Frame(arch.FramePointerType);
}
示例3: XUnitTestRunner
public XUnitTestRunner(IMessageBus bus, IConfiguration configuration, IAssemblyPropertyReader referenceResolver, IFileSystemService fsService)
{
_bus = bus;
_configuration = configuration;
_assemblyReader = referenceResolver;
_fsService = fsService;
}
示例4: SetUp
public void SetUp()
{
_project = new Project(Path.GetFullPath("someProject.csproj"), new ProjectDocument(ProjectType.CSharp));
_project.Value.SetOutputPath("");
_project.Value.SetAssemblyName("someAssembly.dll");
_bus = MockRepository.GenerateMock<IMessageBus>();
_listGenerator = MockRepository.GenerateMock<IGenerateBuildList>();
_configuration = MockRepository.GenerateMock<IConfiguration>();
_buildRunner = MockRepository.GenerateMock<IBuildRunner>();
_testRunner = MockRepository.GenerateMock<ITestRunner>();
_testAssemblyValidator = MockRepository.GenerateMock<IDetermineIfAssemblyShouldBeTested>();
_optimizer = MockRepository.GenerateMock<IOptimizeBuildConfiguration>();
_fs = MockRepository.GenerateMock<IFileSystemService>();
_cache = MockRepository.GenerateMock<ICache>();
_runCache = MockRepository.GenerateMock<IRunResultCache>();
_runInfo = new RunInfo(_project);
_runInfo.ShouldBuild();
_runInfo.SetAssembly(_project.Value.AssemblyName);
_optimizer.Stub(o => o.AssembleBuildConfiguration(new string[] {})).IgnoreArguments().Return(new RunInfo[] { _runInfo });
_preProcessor = MockRepository.GenerateMock<IPreProcessTestruns>();
_preProcessor.Stub(x => x.PreProcess(null)).IgnoreArguments().Return(new PreProcessedTesRuns(null, new RunInfo[] { _runInfo }));
var preProcessors = new IPreProcessTestruns[] { _preProcessor };
var buildPreProcessor = MockRepository.GenerateMock<IPreProcessBuildruns>();
buildPreProcessor.Stub(x => x.PreProcess(null)).IgnoreArguments().Return(new RunInfo[] { _runInfo });
var buildPreProcessors = new IPreProcessBuildruns[] { buildPreProcessor };
_removedTestLocator = MockRepository.GenerateMock<ILocateRemovedTests>();
_buildSessionRunner = new BuildSessionRunner(new BuildConfiguration(null), _cache, _bus, _configuration, _buildRunner, buildPreProcessors, _fs, _runCache);
_consumer = new ProjectChangeConsumer(_bus, _listGenerator, _configuration, _buildSessionRunner, new ITestRunner[] { _testRunner }, _testAssemblyValidator, _optimizer, preProcessors, _removedTestLocator);
}
示例5: ImageViewModel
public ImageViewModel(IFileSystemService fileSystemService, IBusyProvider busyProvider, bool horizontalAlignement, IImageStrategy imageStrategy)
{
_fileSystemService = fileSystemService;
_busyProvider = busyProvider;
_imageStrategy = imageStrategy;
_horizontalAlignement = horizontalAlignement;
}
示例6: ImportService
/// <summary>
/// Initializes a new instance of the <see cref="ImportService"/> class.
/// </summary>
/// <param name="settingsService">
/// Провайдер настроек
/// </param>
/// <param name="fileSystemService">
/// Сервис файловой системы
/// </param>
/// <param name="logService">
/// Сервис логирования
/// </param>
/// <param name="dateTimeService">
/// Сервис даты/времени
/// </param>
public ImportService(IAlbumeSettingsService settingsService, IFileSystemService fileSystemService, ILogService logService, IDateTimeService dateTimeService)
{
this.settingsService = settingsService;
this.fileSystemService = fileSystemService;
this.logService = logService;
this.dateTimeService = dateTimeService;
}
示例7: SetUp
public void SetUp()
{
_configuration = MockRepository.GenerateMock<IConfiguration>();
_assemblyReader = MockRepository.GenerateMock<IAssemblyPropertyReader>();
_fsService = MockRepository.GenerateMock<IFileSystemService>();
_runner = new MSTestRunner(_configuration, _assemblyReader, _fsService);
}
示例8: SourceManagerViewModelTests
public SourceManagerViewModelTests()
{
_sourceService = Substitute.For<ISourceService>();
_fileSystemService = Substitute.For<IFileSystemService>();
_busyProvider = Substitute.For<IBusyProvider>();
_viewModel = new SourceManagerViewModel(_sourceService, _fileSystemService, _busyProvider, SourceType.Music);
}
示例9: FileSystemFileStorageService
public FileSystemFileStorageService(
IConfiguration configuration,
IFileSystemService fileSystemSvc)
{
_configuration = configuration;
_fileSystemSvc = fileSystemSvc;
}
示例10: TvShowMetadataService
public TvShowMetadataService(IFileSystemService fileSystemService, ITvShowImagesService imagesService, ITvShowMetadataRepository metadataRepository, ITvShowMetadataUpdater metadataUpdater)
{
_fileSystemService = fileSystemService;
_imagesService = imagesService;
_metadataRepository = metadataRepository;
_metadataUpdater = metadataUpdater;
}
示例11: TvShowImagesServiceTests
public TvShowImagesServiceTests()
{
_fileSystemService = Substitute.For<IFileSystemService>();
_path = @"C:\Folder\TV Shows\Game of Thrones";
_tvShowFileService = Substitute.For<ITvShowFileService>();
TvShowImages images = new TvShowImages
{
Fanart = @"C:\Folder\TV Shows\Game of Thrones\fanart.jpg",
Poster = @"C:\Folder\TV Shows\Game of Thrones\poster.jpg",
Banner = @"C:\Folder\TV Shows\Game of Thrones\banner.jpg",
Seasons = new List<Season>
{
new Season
{
SeasonNumber = 0,
Path = @"C:\Folder\TV Shows\Game of Thrones\Specials",
PosterUrl = @"C:\Folder\TV Shows\Game of Thrones\season-specials-poster.jpg",
BannerUrl = @"C:\Folder\TV Shows\Game of Thrones\season-specials-banner.jpg"
},
new Season
{
SeasonNumber = 1,
Path = @"C:\Folder\TV Shows\Game of Thrones\Season 1",
PosterUrl = @"C:\Folder\TV Shows\Game of Thrones\season01-poster.jpg",
BannerUrl = @"C:\Folder\TV Shows\Game of Thrones\season01-banner.jpg"
}
}
};
_tvShowFileService.GetShowImages(_path)
.Returns(images.ToTask());
_service = new TvShowImagesService(_fileSystemService, _tvShowFileService);
}
示例12: NUnitTestRunner
public NUnitTestRunner(IMessageBus bus, IConfiguration configuration, IAssemblyReader assemblyReader, IFileSystemService fsService)
{
_bus = bus;
_configuration = configuration;
_assemblyReader = assemblyReader;
_fsService = fsService;
}
示例13: VTSViewModel
public VTSViewModel (IFileSystemService fileSystem, ILocalizer localazer, ISQLitePlatform sqlitePlatform)
{
_vacationList = new VacationInfoMockModel ().Vacations;
_fileSystem = fileSystem;
this.Localaizer = localazer;
_sqlitePlatform = sqlitePlatform;
}
示例14: BackupFileSystemService
public BackupFileSystemService(IPackageOperationContextService operationContextService, IFileSystemService fileSystemService)
{
Argument.IsNotNull(() => operationContextService);
Argument.IsNotNull(() => fileSystemService);
_operationContextService = operationContextService;
_fileSystemService = fileSystemService;
}
示例15: MainWindowViewModel
public MainWindowViewModel(IFileSystemService fileSystemService, IFileWatcherService fileWatcherService, IMessenger messenger)
{
_fileSystemService = fileSystemService;
_fileWatcherService = fileWatcherService;
_logger.Info("register on directoryChangedMessage");
messenger.Register<DirectoryChangedMessage>(this, OnDirectoryChangedMessageReceive);
}