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

C# ITraceFactory类代码示例

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

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



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


示例16: SSHKeyManager

 protected SSHKeyManager(IFileSystem fileSystem, ITraceFactory traceFactory, string sshPath)
 {
     _fileSystem = fileSystem;
     _traceFactory = traceFactory;
     _sshPath = sshPath;
     _id_rsa = Path.Combine(sshPath, PrivateKeyFile);
     _config = Path.Combine(sshPath, ConfigFile);
 }
开发者ID:JamesTryand,项目名称:kudu,代码行数:8,代码来源:SSHKeyManager.cs


示例17: GitExeServer

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


示例18: ContinuousJobRunner

        public ContinuousJobRunner(ContinuousJob continuousJob, IEnvironment environment, IDeploymentSettingsManager settings, ITraceFactory traceFactory, IAnalytics analytics)
            : base(continuousJob.Name, Constants.ContinuousPath, environment, settings, traceFactory, analytics)
        {
            _continuousJobLogger = new ContinuousJobLogger(continuousJob.Name, Environment, TraceFactory);

            _disableFilePath = Path.Combine(continuousJob.JobBinariesRootPath, "disable.job");

            _singletonLock = new LockFile(Path.Combine(JobDataPath, "singleton.job.lock"), TraceFactory);
        }
开发者ID:jeddawson,项目名称:kudu,代码行数:9,代码来源:ContinuousJobRunner.cs


示例19: SiteExtensionManager

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

            var remoteSource = new Uri(settings.GetSiteExtensionRemoteUrl());
            _remoteRepository = new DataServicePackageRepository(remoteSource);

            _baseUrl = context.Request.Url == null ? "" : context.Request.Url.GetLeftPart(UriPartial.Authority).TrimEnd('/');
        }
开发者ID:kleberimeusp,项目名称:kudu,代码行数:10,代码来源:SiteExtensionManager.cs


示例20: ContinuousJobLogger

        public ContinuousJobLogger(string jobName, IEnvironment environment, IFileSystem fileSystem, ITraceFactory traceFactory)
            : base(GetStatusFileName(), environment, fileSystem, traceFactory)
        {
            _historyPath = Path.Combine(Environment.JobsDataPath, Constants.ContinuousPath, jobName);
            FileSystemHelpers.EnsureDirectory(_historyPath);

            // Lock status file (allowing read and write but not delete) as a way to notify that this status file is valid (shows status of a current working instance)
            _logFilePath = GetLogFilePath(JobLogFileName);
            _lockedStatusFile = File.Open(GetStatusFilePath(), FileMode.OpenOrCreate, FileAccess.Read, FileShare.ReadWrite);
        }
开发者ID:pauledrupt,项目名称:kudu,代码行数:10,代码来源:ContinuousJobLogger.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# ITraceManager类代码示例发布时间:2022-05-24
下一篇:
C# ITopicService类代码示例发布时间: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