本文整理汇总了C#中ITracer类的典型用法代码示例。如果您正苦于以下问题:C# ITracer类的具体用法?C# ITracer怎么用?C# ITracer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ITracer类属于命名空间,在下文中一共展示了ITracer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InfoRefsService
public InfoRefsService(ITracer tracer, IGitServer gitServer, IEnvironment environment, RepositoryConfiguration configuration)
{
_gitServer = gitServer;
_tracer = tracer;
_deploymentTargetPath = environment.DeploymentTargetPath;
_configuration = configuration;
}
示例2: ExecuteMSBuild
public string ExecuteMSBuild(ITracer tracer, string arguments, params object[] args)
{
using (var writer = new ProgressWriter())
{
writer.Start();
return _msbuildExe.Execute(tracer, arguments, args).Item1;
}
}
示例3: PropertiesView
public PropertiesView(ITracer tracer)
{
Contract.Requires(tracer != null);
_tracer = tracer;
InitializeComponent();
}
示例4: Settings
/// <summary>
/// Initializes a new instance of the <see cref="Settings"/> class.
/// </summary>
/// <param name="manager">The settings manager that will read and save data for this instance.</param>
public Settings(ISettingsManager manager)
{
this.tracer = Tracer.Get(this.GetType());
this.manager = manager;
this.manager.Read(this);
this.IsInitialized = false;
}
示例5: GetDocumentPath
/// <summary>
/// Gets the path to the guidance document from the current element.
/// </summary>
/// <remarks>
/// Returns the first artifact link with a *.doc extension of the current element.
/// </remarks>
public static string GetDocumentPath(ITracer tracer, IProductElement element, IUriReferenceService uriService)
{
// Return path of first reference
var references = SolutionArtifactLinkReference.GetResolvedReferences(element, uriService);
if (!references.Any())
{
tracer.Warn(String.Format(CultureInfo.CurrentCulture,
Resources.GuidanceDocumentPathProvider_NoLinksFound, element.InstanceName));
return string.Empty;
}
else
{
var reference = references.FirstOrDefault(r => r.PhysicalPath.EndsWith(GuidanceDocumentExtension));
if (reference == null)
{
tracer.Warn(String.Format(CultureInfo.CurrentCulture,
Resources.GuidanceDocumentPathProvider_NoDocumentLinkFound, element.InstanceName));
return string.Empty;
}
else
{
tracer.Info(String.Format(CultureInfo.CurrentCulture,
Resources.GuidanceDocumentPathProvider_LinkFound, element.InstanceName, reference.PhysicalPath));
return reference.PhysicalPath;
}
}
}
示例6: Fetch
public virtual async Task Fetch(IRepository repository, DeploymentInfo deploymentInfo, string targetBranch, ILogger logger, ITracer tracer)
{
// (A)sync with dropbox
var dropboxInfo = (DropboxInfo)deploymentInfo;
_dropBoxHelper.Logger = logger;
deploymentInfo.TargetChangeset = await _dropBoxHelper.Sync(dropboxInfo, targetBranch, repository, tracer);
}
示例7: SSHKeyController
public SSHKeyController(ITracer tracer, ISSHKeyManager sshKeyManager, IFileSystem fileSystem, IOperationLock sshKeyLock)
{
_tracer = tracer;
_sshKeyManager = sshKeyManager;
_fileSystem = fileSystem;
_sshKeyLock = sshKeyLock;
}
示例8: SiteExtensionLogManager
public SiteExtensionLogManager(ITracer tracer, string directoryPath)
{
_tracer = tracer;
_directoryPath = directoryPath;
UpdateCurrentPath();
}
示例9: UploadPackHandler
public UploadPackHandler(ITracer tracer,
IGitServer gitServer,
IOperationLock deploymentLock,
IDeploymentManager deploymentManager)
: base(tracer, gitServer, deploymentLock, deploymentManager)
{
}
示例10: DietCalculator
public DietCalculator(Diet diet, IIngredientQuantityRepository ingredientQuantityRepository, ITracer tracer)
{
_diet = diet;
_ingredientQuantityRepository = ingredientQuantityRepository;
_tracer = tracer;
tracer.WriteTrace("Henter ut ingredienser og måltid");
var ingredients = _diet.DietIngredients.ToList();
var meals = _diet.DietMeals.ToList();
foreach (var di in ingredients)
{
var quantityConversion = di.Quantity / QuantityConverter.ConvertTo100Grams(di.QuantityTypeId, _ingredientQuantityRepository.GetConvertFactor(di.IngredientId, di.QuantityTypeId)) * di.Day.ToIntArray().Count();
_totalIngredientCarbsGrams += di.Ingredient.Carb * quantityConversion;
_totalIngredientFatGrams += di.Ingredient.Fat * quantityConversion;
_totalIngredientProteinGrams += di.Ingredient.Protein * quantityConversion;
_totalIngredientKcals += di.Ingredient.Kcal * quantityConversion;
}
foreach (var dm in meals)
{
var mealDays = dm.Day.ToIntArray().Count();
var mealCalulator = new MealCalculator(dm.Meal, _ingredientQuantityRepository);
_totalMealCarbGrams += mealCalulator.CalculateTotalCarb() * mealDays;
_totalMealFatGrams += mealCalulator.CalculateTotalFat() * mealDays;
_totalMealProteinGrams += mealCalulator.CalculateTotalProtein() * mealDays;
_totalMealKcals += mealCalulator.CalculateTotalKcal() * mealDays;
}
_totalGrams = _totalIngredientCarbsGrams + _totalIngredientFatGrams + _totalIngredientProteinGrams +
_totalMealCarbGrams + _totalMealFatGrams + _totalMealProteinGrams;
_tracer.WriteTrace("Ferdig med constructor");
}
示例11: DataEngine
public DataEngine(ITracer tracer, string instanceName, int maxConcurrency, IStorageDriver storageDriver, DataContainerDescriptor containerDescriptor)
{
if (tracer == null)
{
throw new ArgumentNullException("tracer");
}
if (maxConcurrency <= 0 || maxConcurrency > 10000)
{
throw new ArgumentOutOfRangeException("maxConcurrency");
}
if (storageDriver == null)
{
throw new ArgumentNullException("storageDriver");
}
if (containerDescriptor == null)
{
throw new ArgumentNullException("containerDescriptor");
}
m_tracer = tracer;
m_containerDescriptor = containerDescriptor;
m_maxConcurrency = maxConcurrency;
m_parsedRequestCache = new ParsedRequestCache(instanceName);
m_storageDriver = storageDriver;
m_parser = new QueryParser(containerDescriptor, maxConcurrency);
m_activeProcessors = new ConcurrentDictionary<RequestExecutionContext, Task>(m_maxConcurrency, m_maxConcurrency);
m_utcLastUsedAt = DateTime.UtcNow;
}
示例12: ValidateCommandSettings
public void ValidateCommandSettings(ITracer tracer)
{
this.tracer = tracer;
this.ValidateAssociatedArtifactConfiguration();
this.ValidateAuthoringUriIsValidAndTemplateIsConfiguredCorrectly(false);
this.ValidateTemplateUriIsNotEmpty();
}
示例13: Solution
public Solution(ITracer tracer, IVsServiceProvider serviceProvider)
{
Contract.Requires(tracer != null);
Contract.Requires(serviceProvider != null);
_deferredUpdateThrottle = new DispatcherThrottle(DispatcherPriority.ContextIdle, Update);
_tracer = tracer;
_serviceProvider = serviceProvider;
_specificProjectConfigurations = Projects.ObservableSelectMany(prj => prj.SpecificProjectConfigurations);
_solutionContexts = SolutionConfigurations.ObservableSelectMany(cfg => cfg.Contexts);
_defaultProjectConfigurations = Projects.ObservableSelect(prj => prj.DefaultProjectConfiguration);
_projectConfigurations = new ObservableCompositeCollection<ProjectConfiguration>(_defaultProjectConfigurations, _specificProjectConfigurations);
_solutionEvents = Dte?.Events?.SolutionEvents;
if (_solutionEvents != null)
{
_solutionEvents.Opened += Solution_Changed;
_solutionEvents.AfterClosing += Solution_Changed;
_solutionEvents.ProjectAdded += _ => Solution_Changed();
_solutionEvents.ProjectRemoved += _ => Solution_Changed();
_solutionEvents.ProjectRenamed += (_, __) => Solution_Changed();
}
Update();
}
示例14: DropboxHandler
public DropboxHandler(ITracer tracer,
IDeploymentStatusManager status,
IDeploymentSettingsManager settings,
IEnvironment environment)
{
_dropBoxHelper = new DropboxHelper(tracer, status, settings, environment);
}
示例15: RequestExecutionContext
/// <summary>
/// Ctr.
/// </summary>
/// <param name="process">Parent process, receives crash notifications</param>
/// <param name="tracer">Tracer object</param>
public RequestExecutionContext(IPqlEngineHostProcess process, ITracer tracer)
{
if (process == null)
{
throw new ArgumentNullException("process");
}
if (tracer == null)
{
throw new ArgumentNullException("tracer");
}
m_tracer = tracer;
m_process = process;
ParsedRequest = new ParsedRequest(false);
Request = new DataRequest();
RequestBulk = new DataRequestBulk();
RequestParameters = new DataRequestParams();
m_buffersRingItems = new []
{
new RequestExecutionBuffer(),
new RequestExecutionBuffer(),
new RequestExecutionBuffer()
};
}