本文整理汇总了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);
}
示例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;
}
示例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;
}
示例4: RepositoryFactory
public RepositoryFactory(IEnvironment environment, IDeploymentSettingsManager settings, ITraceFactory traceFactory, HttpContextBase httpContext)
{
_environment = environment;
_settings = settings;
_traceFactory = traceFactory;
_httpContext = httpContext;
}
示例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);
}
}
}
示例6: LibGit2SharpRepository
public LibGit2SharpRepository(IEnvironment environment, IDeploymentSettingsManager settings, ITraceFactory tracerFactory)
{
_tracerFactory = tracerFactory;
_settings = settings;
RepositoryPath = environment.RepositoryPath;
_legacyGitExeRepository = new GitExeRepository(environment, settings, tracerFactory);
}
示例7: NullRepository
public NullRepository(IEnvironment environment, ITraceFactory traceFactory, HttpContextBase httpContext)
{
_environment = environment;
_traceFactory = traceFactory;
_httpContext = httpContext;
_changeSetKey = Path.Combine(_environment.RepositoryPath, "changeset");
}
示例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);
}
示例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);
}
示例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");
}
示例11: TriggeredJobsScheduler
public TriggeredJobsScheduler(ITriggeredJobsManager triggeredJobsManager, ITraceFactory traceFactory, IEnvironment environment)
{
_triggeredJobsManager = triggeredJobsManager;
_traceFactory = traceFactory;
_environment = environment;
_triggeredJobsManager.RegisterExtraEventHandlerForFileChange(OnJobChanged);
}
示例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);
}
示例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");
}
示例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);
}
示例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);
}