Пример #1
0
 public static ICoreServices CreateSubstitute(ILoggingPermissions loggingPermissions = null, IFileSystem fs = null, IRegistry registry = null, IProcessServices ps = null) {
     return new CoreServices(
         Substitute.For<IApplicationConstants>(),
         Substitute.For<ITelemetryService>(),
         loggingPermissions,
         Substitute.For<ISecurityService>(),
         Substitute.For<ITaskService>(),
         UIThreadHelper.Instance,
         Substitute.For<IActionLog>(),
         fs ?? Substitute.For<IFileSystem>(),
         registry ?? Substitute.For<IRegistry>(),
         ps ?? Substitute.For<IProcessServices>());
 }
Пример #2
0
        public CoreServices(IApplicationConstants appConstants
            , ITelemetryService telemetry
            , ILoggingPermissions permissions
            , ISecurityService security
            , ITaskService tasks
            , IMainThread mainThread
            , IActionLog log
            , IFileSystem fs
            , IRegistry registry
            , IProcessServices ps) {

            LoggingServices = new LoggingServices(permissions, appConstants);
            Log = log;

            Telemetry = telemetry;
            Security = security;
            Tasks = tasks;

            ProcessServices = ps;
            Registry = registry;
            FileSystem = fs;
            MainThread = mainThread;
        }
Пример #3
0
 internal Logger(string appName, ILoggingPermissions permissions, IActionLogWriter writer) {
     _appName = appName;
     _permissions = permissions;
     _writer = writer;
 }
Пример #4
0
 public FeedbackCommandTest() {
     _lp = Substitute.For<ILoggingPermissions>();
     _services = TestCoreServices.CreateSubstitute(_lp);
 }
 public RToolsSettingsImplementation(ISettingsStorage settings, ICoreShell coreShell) {
     _settings = settings;
     _loggingPermissions = coreShell.Services.LoggingServices.Permissions;
     _workingDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
 }
Пример #6
0
 public ReportIssueCommand(ICoreServices services)
     : base(RGuidList.RCmdSetGuid, RPackageCommandId.icmdReportIssue) {
     _permissions = services.LoggingServices.Permissions;
     _pss = services.ProcessServices;
 }
Пример #7
0
 public LoggingServices(ILoggingPermissions permissions, IApplicationConstants appConstants) {
     Permissions = permissions;
     _appConstants = appConstants;
 }