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


C# IAnalytics类代码示例

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


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

示例1: Open

        public static DeploymentStatusFile Open(string id, IEnvironment environment, IAnalytics analytics, IOperationLock statusLock)
        {
            return statusLock.LockOperation(() =>
            {
                string path = Path.Combine(environment.DeploymentsPath, id, StatusFile);

                if (!FileSystemHelpers.FileExists(path))
                {
                    return null;
                }

                try
                {
                    XDocument document = null;
                    using (var stream = FileSystemHelpers.OpenRead(path))
                    {
                        document = XDocument.Load(stream);
                    }

                    return new DeploymentStatusFile(id, environment, statusLock, document);
                }
                catch (Exception ex)
                {
                    // in the scenario where w3wp is abruptly terminated while xml is being written,
                    // we may end up with corrupted xml.  we will handle the error and remove the problematic directory.
                    analytics.UnexpectedException(ex);

                    FileSystemHelpers.DeleteDirectorySafe(Path.GetDirectoryName(path), ignoreErrors: true);

                    // it is ok to return null as callers already handle null.
                    return null;
                }
            }, DeploymentStatusManager.LockTimeout);
        }
开发者ID:Walk4Muscle,项目名称:kudu,代码行数:34,代码来源:DeploymentStatusFile.cs

示例2: StructuredTextLogger

 public StructuredTextLogger(string path, IAnalytics analytics)
 {
     _depth = 0;
     _path = path;
     _analytics = analytics;
     _structuredTextDocument = new StructuredTextDocument<LogEntry>(path,
         // DateTime.ToString("o") => "2015-08-04T00:08:38.5489308Z"
         e => string.Join(LogEntrySeparator, e.LogTime.ToString("o"), e.Message, e.Id, (int)e.Type),
         str =>
         {
             var splitted = str.Split(new[] { LogEntrySeparator }, StringSplitOptions.None);
             if (splitted.Length == 4)
             {
                 var time = DateTime.Parse(splitted[0]).ToUniversalTime();
                 var message = UnsanitizeValue(splitted[1]);
                 var id = splitted[2];
                 var type = (LogEntryType)Int32.Parse(splitted[3]);
                 return new LogEntry(time, id, message, type);
             }
             else
             {
                 throw new FormatException(string.Format("the log line \"{0}\" is in an invalid format", str));
             }
         });
 }
开发者ID:MavenRain,项目名称:kudu,代码行数:25,代码来源:StructuredTextLogger.cs

示例3: 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

示例4: 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

示例5: DynamicsCrmConnector

        public DynamicsCrmConnector(ICrmServiceWrapper crmService, ILogger logger, IAnalytics analytics)
        {
            _crmService = crmService;
             _logger = logger;
             _analytics = analytics;

             DynamicsMapper.Configure();
        }
开发者ID:LonghornTaco,项目名称:CrmConnector,代码行数:8,代码来源:DynamicsCrmConnector.cs

示例6: 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

示例7: TriggeredJobsScheduler

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

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

示例8: TriggeredJobSchedule

        public TriggeredJobSchedule(TriggeredJob triggeredJob, Action<TriggeredJobSchedule> onSchedule, TriggeredJobSchedulerLogger logger, IAnalytics analytics)
        {
            TriggeredJob = triggeredJob;
            _onSchedule = onSchedule;
            Logger = logger;
            _analytics = analytics;

            _timer = new Timer(OnTimer, triggeredJob, Timeout.Infinite, Timeout.Infinite);
        }
开发者ID:projectkudu,项目名称:kudu,代码行数:9,代码来源:TriggeredJobSchedule.cs

示例9: 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

示例10: DeploymentStatusManager

 public DeploymentStatusManager(IEnvironment environment,
                                IAnalytics analytics,
                                IOperationLock statusLock)
 {
     _environment = environment;
     _analytics = analytics;
     _statusLock = statusLock;
     _activeFile = Path.Combine(environment.DeploymentsPath, Constants.ActiveDeploymentFile);
 }
开发者ID:niknoxe,项目名称:kudu,代码行数:9,代码来源:DeploymentStatusManager.cs

示例11: SiteExtensionManager

        public SiteExtensionManager(IContinuousJobsManager continuousJobManager, ITriggeredJobsManager triggeredJobManager, IEnvironment environment, IDeploymentSettingsManager settings, ITraceFactory traceFactory, HttpContextBase context, IAnalytics analytics)
        {
            _rootPath = Path.Combine(environment.RootPath, "SiteExtensions");
            _baseUrl = context.Request.Url == null ? String.Empty : context.Request.Url.GetLeftPart(UriPartial.Authority).TrimEnd('/');

            _localRepository = GetSourceRepository(_rootPath);
            _continuousJobManager = continuousJobManager;
            _triggeredJobManager = triggeredJobManager;
            _environment = environment;
            _settings = settings;
            _traceFactory = traceFactory;
            _analytics = analytics;
        }
开发者ID:projectkudu,项目名称:kudu,代码行数:13,代码来源:SiteExtensionManager.cs

示例12: BaseJobRunner

        protected BaseJobRunner(string jobName, string jobsTypePath, IEnvironment environment,
            IDeploymentSettingsManager settings, ITraceFactory traceFactory, IAnalytics analytics)
        {
            TraceFactory = traceFactory;
            Environment = environment;
            Settings = settings;
            JobName = jobName;
            _analytics = analytics;

            JobBinariesPath = Path.Combine(Environment.JobsBinariesPath, jobsTypePath, jobName);
            JobTempPath = Path.Combine(Environment.TempPath, Constants.JobsPath, jobsTypePath, jobName);
            JobDataPath = Path.Combine(Environment.DataPath, Constants.JobsPath, jobsTypePath, jobName);

            _externalCommandFactory = new ExternalCommandFactory(Environment, Settings, Environment.RepositoryPath);
        }
开发者ID:uQr,项目名称:kudu,代码行数:15,代码来源:BaseJobRunner.cs

示例13: GetInstance

        /// <summary>
        /// Get Analytics Instance
        /// </summary>
        /// <param name="accountId">accountId, when you setup your app this would be generated for you.</param>
        /// <param name="applicationId">applicationId, when you setup your app this would be generated for you</param>
        /// <param name="applicationVersion"> applicationVersion, specify version of your app here, make sure you don't forget to update this</param>
        /// <param name="uploadType">uploadType how data is going to be uploaded, UploadType.WhileUsingAsync | UploadType.Manual</param>
        /// <returns>iAnalytics new or cached instance</returns>
        /// <see cref="Integration Guidelines SDK Document"/>
        public static IAnalytics GetInstance()
        {
            lock (objectToLock)
            {
                if (iAnalytics == null)
                {
                    #if DEBUG
                    System.Diagnostics.Debug.WriteLine("created new analytics instance");
                    #endif

                    iAnalytics = new Analytics();
                }
            }

            return iAnalytics;
        }
开发者ID:Appacts,项目名称:appacts-sdk-wp7,代码行数:25,代码来源:AnalyticsSingleton.cs

示例14: DeploymentController

 public DeploymentController(ITracer tracer,
                             IEnvironment environment,
                             IAnalytics analytics,
                             IDeploymentManager deploymentManager,
                             IDeploymentStatusManager status,
                             IOperationLock deploymentLock,
                             IRepositoryFactory repositoryFactory,
                             IAutoSwapHandler autoSwapHandler)
 {
     _tracer = tracer;
     _environment = environment;
     _analytics = analytics;
     _deploymentManager = deploymentManager;
     _status = status;
     _deploymentLock = deploymentLock;
     _repositoryFactory = repositoryFactory;
     _autoSwapHandler = autoSwapHandler;
 }
开发者ID:Walk4Muscle,项目名称:kudu,代码行数:18,代码来源:DeploymentController.cs

示例15: DeploymentManager

 public DeploymentManager(ISiteBuilderFactory builderFactory,
                          IEnvironment environment,
                          ITraceFactory traceFactory,
                          IAnalytics analytics,
                          IDeploymentSettingsManager settings,
                          IDeploymentStatusManager status,
                          IOperationLock deploymentLock,
                          ILogger globalLogger,
                          IWebHooksManager hooksManager)
 {
     _builderFactory = builderFactory;
     _environment = environment;
     _traceFactory = traceFactory;
     _analytics = analytics;
     _deploymentLock = deploymentLock;
     _globalLogger = globalLogger ?? NullLogger.Instance;
     _settings = settings;
     _status = status;
     _hooksManager = hooksManager;
 }
开发者ID:nul800sebastiaan,项目名称:kudu,代码行数:20,代码来源:DeploymentManager.cs


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