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

C# ITracer类代码示例

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

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



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

示例1: InfoRefsService

 public InfoRefsService(ITracer tracer, IGitServer gitServer, IEnvironment environment, RepositoryConfiguration configuration)
 {
     _gitServer = gitServer;
     _tracer = tracer;
     _deploymentTargetPath = environment.DeploymentTargetPath;
     _configuration = configuration;
 }
开发者ID:loudej,项目名称:kudu,代码行数:7,代码来源:InfoRefsService.cs


示例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;
     }
 }
开发者ID:chrisdias,项目名称:kudu,代码行数:8,代码来源:MsBuildSiteBuilder.cs


示例3: PropertiesView

        public PropertiesView(ITracer tracer)
        {
            Contract.Requires(tracer != null);
            _tracer = tracer;

            InitializeComponent();
        }
开发者ID:trzombie,项目名称:ProjectConfigurationManager,代码行数:7,代码来源:PropertiesView.xaml.cs


示例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;
 }
开发者ID:MobileEssentials,项目名称:clide,代码行数:11,代码来源:Settings.cs


示例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;
         }
     }
 }
开发者ID:NuPattern,项目名称:NuPattern,代码行数:33,代码来源:GuidanceDocumentHelper.cs


示例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);
 }
开发者ID:projectkudu,项目名称:kudu,代码行数:7,代码来源:DropboxHandler.cs


示例7: SSHKeyController

 public SSHKeyController(ITracer tracer, ISSHKeyManager sshKeyManager, IFileSystem fileSystem, IOperationLock sshKeyLock)
 {
     _tracer = tracer;
     _sshKeyManager = sshKeyManager;
     _fileSystem = fileSystem;
     _sshKeyLock = sshKeyLock;
 }
开发者ID:remcoros,项目名称:kudu,代码行数:7,代码来源:SSHKeyController.cs


示例8: SiteExtensionLogManager

        public SiteExtensionLogManager(ITracer tracer, string directoryPath)
        {
            _tracer = tracer;
            _directoryPath = directoryPath;

            UpdateCurrentPath();
        }
开发者ID:40a,项目名称:kudu,代码行数:7,代码来源:SiteExtensionLogManager.cs


示例9: UploadPackHandler

 public UploadPackHandler(ITracer tracer,
                           IGitServer gitServer,
                           IOperationLock deploymentLock,
                           IDeploymentManager deploymentManager)
     : base(tracer, gitServer, deploymentLock, deploymentManager)
 {
 }
开发者ID:40a,项目名称:kudu,代码行数:7,代码来源:UploadPackHandler.cs


示例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");
        }
开发者ID:goldnarms,项目名称:FitnessRecipes,代码行数:31,代码来源:DietCalculator.cs


示例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;
        }
开发者ID:adrobyazko-softheme,项目名称:PQL,代码行数:31,代码来源:DataEngine.cs


示例12: ValidateCommandSettings

 public void ValidateCommandSettings(ITracer tracer)
 {
     this.tracer = tracer;
     this.ValidateAssociatedArtifactConfiguration();
     this.ValidateAuthoringUriIsValidAndTemplateIsConfiguredCorrectly(false);
     this.ValidateTemplateUriIsNotEmpty();
 }
开发者ID:NuPattern,项目名称:NuPattern,代码行数:7,代码来源:TemplateValidator.cs


示例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();
        }
开发者ID:trzombie,项目名称:ProjectConfigurationManager,代码行数:27,代码来源:Solution.cs


示例14: DropboxHandler

 public DropboxHandler(ITracer tracer,
                       IDeploymentStatusManager status,
                       IDeploymentSettingsManager settings,
                       IEnvironment environment)
 {
     _dropBoxHelper = new DropboxHelper(tracer, status, settings, environment);
 }
开发者ID:richardprice,项目名称:kudu,代码行数:7,代码来源:DropboxHandler.cs


示例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()
                };
        }
开发者ID:adrobyazko-softheme,项目名称:PQL,代码行数:33,代码来源:RequestExecutionContext.cs


示例16: GetTriggerInputs

        public JArray GetTriggerInputs(ITracer tracer)
        {
            JArray inputs = new JArray();
            foreach (var functionJson in EnumerateFunctionFiles())
            {
                try
                {
                    var json = JObject.Parse(FileSystemHelpers.ReadAllText(functionJson));
                    var binding = json.Value<JObject>("bindings");
                    foreach (JObject input in binding.Value<JArray>("input"))
                    {
                        var type = input.Value<string>("type");
                        if (type.EndsWith("Trigger", StringComparison.OrdinalIgnoreCase))
                        {
                            tracer.Trace(String.Format("Sync {0} of {1}", type, functionJson));
                            inputs.Add(input);
                        }
                        else
                        {
                            tracer.Trace(String.Format("Skip {0} of {1}", type, functionJson));
                        }
                    }
                }
                catch (Exception ex)
                {
                    tracer.Trace(String.Format("{0} is invalid. {1}", functionJson, ex.Message));
                }
            }

            return inputs;
        }
开发者ID:wonderxboy,项目名称:kudu,代码行数:31,代码来源:FunctionManager.cs


示例17: ExecuteMSBuild

        public string ExecuteMSBuild(ITracer tracer, string arguments, params object[] args)
        {
            using (var writer = new ProgressWriter())
            {
                writer.Start();

                // The line with the MSB3644 warnings since it's not important
                return _msbuildExe.Execute(tracer,
                                           output =>
                                           {
                                               if (output.Contains("MSB3644:") || output.Contains("MSB3270:"))
                                               {
                                                   return false;
                                               }

                                               writer.WriteOutLine(output);
                                               return true;
                                           },
                                           error =>
                                           {
                                               writer.WriteErrorLine(error);
                                               return true;
                                           },
                                           Console.OutputEncoding,
                                           arguments,
                                           args).Item1;
            }
        }
开发者ID:kristofferahl,项目名称:kudu,代码行数:28,代码来源:MsBuildSiteBuilder.cs


示例18: FetchHandler

        public FetchHandler(ITracer tracer,
                            IDeploymentManager deploymentManager,
                            IDeploymentSettingsManager settings,
                            IDeploymentStatusManager status,
                            IOperationLock deploymentLock,
                            IEnvironment environment,
                            IEnumerable<IServiceHookHandler> serviceHookHandlers,
                            IRepositoryFactory repositoryFactory,
                            IAutoSwapHandler autoSwapHandler)
        {
            _tracer = tracer;
            _deploymentLock = deploymentLock;
            _environment = environment;
            _deploymentManager = deploymentManager;
            _settings = settings;
            _status = status;
            _serviceHookHandlers = serviceHookHandlers;
            _repositoryFactory = repositoryFactory;
            _autoSwapHandler = autoSwapHandler;
            _markerFilePath = Path.Combine(environment.DeploymentsPath, "pending");

            // Prefer marker creation in ctor to delay create when needed.
            // This is to keep the code simple and avoid creation synchronization.
            if (!FileSystemHelpers.FileExists(_markerFilePath))
            {
                try
                {
                    FileSystemHelpers.WriteAllText(_markerFilePath, String.Empty);
                }
                catch (Exception ex)
                {
                    tracer.TraceError(ex);
                }
            }
        }
开发者ID:WCOMAB,项目名称:kudu,代码行数:35,代码来源:FetchHandler.cs


示例19: TraceActivity

            public TraceActivity(ITracer tracer, string format, params object[] args)
            {
                this.displayName = format;
                if (args != null && args.Length > 0)
                    this.args = args;

                this.tracer = tracer;
                this.newId = Guid.NewGuid();
                this.oldId = Trace.CorrelationManager.ActivityId;

                if (this.oldId != Guid.Empty)
                    tracer.Trace(TraceEventType.Transfer, this.newId);

                Trace.CorrelationManager.ActivityId = newId;

                if (this.args == null)
                {
                    this.tracer.Trace(TraceEventType.Start, this.displayName);
                    //Trace.CorrelationManager.StartLogicalOperation(this.displayName);
                }
                else
                {
                    this.tracer.Trace(TraceEventType.Start, this.displayName, args);
                    //Trace.CorrelationManager.StartLogicalOperation(string.Format(displayName, args));
                }
            }
开发者ID:kzu,项目名称:Sensorium,代码行数:26,代码来源:StartActivityExtension.cs


示例20: DataContainer

        public DataContainer(ITracer tracer, DataContainerDescriptor dataContainerDescriptor, string storageRoot)
        {
            if (tracer == null)
            {
                throw new ArgumentNullException("tracer");
            }

            if (dataContainerDescriptor == null)
            {
                throw new ArgumentNullException("dataContainerDescriptor");
            }

            // intentionally allowed to be null - in case if we don't want to use any persistence
            m_storageRoot = storageRoot;
            m_tracer = tracer;
            m_memoryPool = new DynamicMemoryPool();

            m_dataContainerDescriptor = dataContainerDescriptor;
            m_documentDataContainers = new Dictionary<int, DocumentDataContainer>(50);
            m_documentDataContainerLocks = new Dictionary<int, object>(50);

            foreach (var item in dataContainerDescriptor.EnumerateDocumentTypes())
            {
                m_documentDataContainerLocks.Add(item.DocumentType, new object());
            }
        }
开发者ID:adrobyazko-softheme,项目名称:PQL,代码行数:26,代码来源:DataContainer.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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