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


C# ITraceFactory类代码示例

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


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

示例1: RazorApplication

        // Consumers should use IoC or the Default UseRazor extension method to initialize this.
        public RazorApplication(
            AppFunc nextApp,
            IFileSystem fileSystem,
            string virtualRoot,
            IRouter router,
            ICompilationManager compiler,
            IPageActivator activator,
            IPageExecutor executor,
            ITraceFactory tracer)
            : this(nextApp)
        {
            Requires.NotNull(fileSystem, "fileSystem");
            Requires.NotNullOrEmpty(virtualRoot, "virtualRoot");
            Requires.NotNull(router, "router");
            Requires.NotNull(compiler, "compiler");
            Requires.NotNull(activator, "activator");
            Requires.NotNull(executor, "executor");
            Requires.NotNull(tracer, "tracer");

            FileSystem = fileSystem;
            VirtualRoot = virtualRoot;
            Router = router;
            CompilationManager = compiler;
            Executor = executor;
            Activator = activator;
            Tracer = tracer;

            ITrace global = Tracer.ForApplication();
            global.WriteLine("Started at '{0}'", VirtualRoot);
        }
开发者ID:Kstal,项目名称:Microsoft.Owin,代码行数:31,代码来源:RazorApplication.cs

示例2: EdgeApplication

        // Consumers should use IoC or the Default UseEdge extension method to initialize this.
        public EdgeApplication(
            IFileSystem fileSystem,
            string virtualRoot,
            IRouter router,
            ICompilationManager compiler,
            IPageActivator activator,
            IPageExecutor executor,
            ITraceFactory tracer)
            : this()
        {
            Requires.NotNull(fileSystem, "fileSystem");
            Requires.NotNullOrEmpty(virtualRoot, "virtualRoot");
            Requires.NotNull(router, "router");
            Requires.NotNull(compiler, "compiler");
            Requires.NotNull(activator, "activator");
            Requires.NotNull(executor, "executor");
            Requires.NotNull(tracer, "tracer");

            FileSystem = fileSystem;
            VirtualRoot = virtualRoot;
            Router = router;
            CompilationManager = compiler;
            Executor = executor;
            Activator = activator;
            Tracer = tracer;
        }
开发者ID:anurse,项目名称:Edge,代码行数:27,代码来源:EdgeApplication.cs

示例3: SparseConditionalConstantPropagation

        public SparseConditionalConstantPropagation(BasicBlocks basicBlocks, ITraceFactory traceFactory)
        {
            this.TraceFactory = traceFactory;
            this.BasicBlocks = basicBlocks;

            MainTrace = CreateTrace("SparseConditionalConstantPropagation");

            // Method is empty - must be a plugged method
            if (BasicBlocks.HeadBlocks.Count == 0)
                return;

            blockStates = new bool[BasicBlocks.Count];

            for (int i = 0; i < BasicBlocks.Count; i++)
            {
                blockStates[i] = false;
            }

            // Initialize
            foreach (var block in BasicBlocks.HeadBlocks)
            {
                AddExecutionBlock(block);
            }

            while (blockWorklist.Count > 0 || instructionWorkList.Count > 0)
            {
                ProcessBlocks();
                ProcessInstructions();
            }

            DumpTrace();

            // Release
            phiStatements = null;
        }
开发者ID:pacificIT,项目名称:MOSA-Project,代码行数:35,代码来源:SparseConditionalConstantPropagation.cs

示例4: RepositoryFactory

 public RepositoryFactory(IEnvironment environment, IDeploymentSettingsManager settings, ITraceFactory traceFactory, HttpContextBase httpContext)
 {
     _environment = environment;
     _settings = settings;
     _traceFactory = traceFactory;
     _httpContext = httpContext;
 }
开发者ID:sr457,项目名称:kudu,代码行数:7,代码来源:RepositoryFactory.cs

示例5: OldRunsCleanup

        private static void OldRunsCleanup(string jobName, IFileSystem fileSystem, IEnvironment environment, ITraceFactory traceFactory, IDeploymentSettingsManager settings)
        {
            // if max is 5 and we have 5 we still want to remove one to make room for the next
            // that's why we decrement max value by 1
            int maxRuns = settings.GetMaxJobRunsHistoryCount() - 1;

            string historyPath = Path.Combine(environment.JobsDataPath, Constants.TriggeredPath, jobName);
            DirectoryInfoBase historyDirectory = fileSystem.DirectoryInfo.FromDirectoryName(historyPath);
            if (!historyDirectory.Exists)
            {
                return;
            }

            DirectoryInfoBase[] historyRunsDirectories = historyDirectory.GetDirectories();
            if (historyRunsDirectories.Length <= maxRuns)
            {
                return;
            }

            var directoriesToRemove = historyRunsDirectories.OrderByDescending(d => d.Name).Skip(maxRuns);
            foreach (DirectoryInfoBase directory in directoriesToRemove)
            {
                try
                {
                    directory.Delete(true);
                }
                catch (Exception ex)
                {
                    traceFactory.GetTracer().TraceError(ex);
                }
            }
        }
开发者ID:hackmp,项目名称:kudu,代码行数:32,代码来源:TriggeredJobRunLogger.cs

示例6: LibGit2SharpRepository

 public LibGit2SharpRepository(IEnvironment environment, IDeploymentSettingsManager settings, ITraceFactory tracerFactory)
 {
     _tracerFactory = tracerFactory;
     _settings = settings;
     RepositoryPath = environment.RepositoryPath;
     _legacyGitExeRepository = new GitExeRepository(environment, settings, tracerFactory);
 }
开发者ID:sr457,项目名称:kudu,代码行数:7,代码来源:LibGit2SharpRepository.cs

示例7: NullRepository

 public NullRepository(IEnvironment environment, ITraceFactory traceFactory, HttpContextBase httpContext)
 {
     _environment = environment;
     _traceFactory = traceFactory;
     _httpContext = httpContext;
     _changeSetKey = Path.Combine(_environment.RepositoryPath, "changeset");
 }
开发者ID:sr457,项目名称:kudu,代码行数:7,代码来源:NullRepository.cs

示例8: AutoSwapHandler

 public AutoSwapHandler(IDeploymentStatusManager deploymentStatusManager, IEnvironment environment, IDeploymentSettingsManager settings, ITraceFactory traceFactory)
 {
     _deploymentStatusManager = deploymentStatusManager;
     _traceFactory = traceFactory;
     _autoSwapSlotName = settings.GetValue("WEBSITE_SWAP_SLOTNAME");
     _autoSwapLockFilePath = Path.Combine(environment.LocksPath, AutoSwapLockFile);
 }
开发者ID:Walk4Muscle,项目名称:kudu,代码行数:7,代码来源:AutoSwapHandler.cs

示例9: SiteExtensionManager

        public SiteExtensionManager(IEnvironment environment, IDeploymentSettingsManager settings, ITraceFactory traceFactory)
        {
            _localRepository = new LocalPackageRepository(environment.RootPath + "\\SiteExtensions");
            _traceFactory = traceFactory;

            var remoteSource = new Uri(settings.GetSiteExtensionRemoteUrl());
            _remoteRepository = new DataServicePackageRepository(remoteSource);
        }
开发者ID:jeddawson,项目名称:kudu,代码行数:8,代码来源:SiteExtensionManager.cs

示例10: SiteExtensionController

 public SiteExtensionController(ISiteExtensionManager manager, IEnvironment environment, ITraceFactory traceFactory, IAnalytics analytics)
 {
     _manager = manager;
     _environment = environment;
     _traceFactory = traceFactory;
     _analytics = analytics;
     _siteExtensionRoot = Path.Combine(_environment.RootPath, "SiteExtensions");
 }
开发者ID:sr457,项目名称:kudu,代码行数:8,代码来源:SiteExtensionController.cs

示例11: TriggeredJobsScheduler

        public TriggeredJobsScheduler(ITriggeredJobsManager triggeredJobsManager, ITraceFactory traceFactory, IEnvironment environment)
        {
            _triggeredJobsManager = triggeredJobsManager;
            _traceFactory = traceFactory;
            _environment = environment;

            _triggeredJobsManager.RegisterExtraEventHandlerForFileChange(OnJobChanged);
        }
开发者ID:stackia,项目名称:kudu,代码行数:8,代码来源:TriggeredJobsScheduler.cs

示例12: GitDeploymentRepository

 public GitDeploymentRepository(string path, ITraceFactory traceFactory)
 {
     _gitExe = new GitExecutable(path);
     _gitExe.SetTraceLevel(2);
     _traceFactory = traceFactory;
     _repository = new GitExeRepository(path, traceFactory);
     _repository.SetTraceLevel(2);
 }
开发者ID:randome,项目名称:kudu,代码行数:8,代码来源:GitDeploymentRepository.cs

示例13: ContinuousJobRunner

        public ContinuousJobRunner(string jobName, IEnvironment environment, IFileSystem fileSystem, IDeploymentSettingsManager settings, ITraceFactory traceFactory, IAnalytics analytics)
            : base(jobName, Constants.ContinuousPath, environment, fileSystem, settings, traceFactory, analytics)
        {
            _continuousJobLogger = new ContinuousJobLogger(jobName, Environment, FileSystem, TraceFactory);

            _disableFilePath = Path.Combine(JobBinariesPath, "disable.job");
            _singletonFilePath = Path.Combine(JobBinariesPath, "singleton.job");
        }
开发者ID:pqthompson,项目名称:kudu,代码行数:8,代码来源:ContinuousJobRunner.cs

示例14: TriggeredJobsScheduler

        public TriggeredJobsScheduler(ITriggeredJobsManager triggeredJobsManager, ITraceFactory traceFactory, IAnalytics analytics, IEnvironment environment)
        {
            _triggeredJobsManager = triggeredJobsManager;
            _traceFactory = traceFactory;
            _environment = environment;

            _jobsFileWatcher = new JobsFileWatcher(triggeredJobsManager.JobsBinariesPath, OnJobChanged, JobSettings.JobSettingsFileName, ListJobNames, traceFactory, analytics);
        }
开发者ID:mschray,项目名称:kudu,代码行数:8,代码来源:TriggeredJobsScheduler.cs

示例15: FilePerJobLogger

        protected FilePerJobLogger(string jobName, string jobType, string statusFileName, string jobLogFileName, IEnvironment environment, ITraceFactory traceFactory)
            : base(statusFileName, environment, traceFactory)
        {
            _historyPath = Path.Combine(environment.JobsDataPath, jobType, jobName);
            FileSystemHelpers.EnsureDirectory(_historyPath);

            _logFilePath = GetLogFilePath(jobLogFileName);
        }
开发者ID:NorimaConsulting,项目名称:kudu,代码行数:8,代码来源:FilePerJobLogger.cs


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