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


C# IPackageLog.MarkFailure方法代码示例

本文整理汇总了C#中IPackageLog.MarkFailure方法的典型用法代码示例。如果您正苦于以下问题:C# IPackageLog.MarkFailure方法的具体用法?C# IPackageLog.MarkFailure怎么用?C# IPackageLog.MarkFailure使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IPackageLog的用法示例。


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

示例1: Activate

        public void Activate(IEnumerable<IPackageInfo> packages, IPackageLog log)
        {
            log.Trace("Trying to resolve chains to the navigation graph");
            _graph.Navigation.AllNodes().OfType<MenuNode>().Each(x =>
            {
                try
                {
                    x.Resolve(_resolver);
                }
                catch (Exception ex)
                {
                    log.MarkFailure("Failed to resolve a BehaviorChain for navigation element " + x.Key);
                    log.MarkFailure(ex);
                }

            });
        }
开发者ID:ketiko,项目名称:fubumvc,代码行数:17,代码来源:NavigationActivator.cs

示例2: Check

 public void Check(IPackageLog log)
 {
     if (Directory.Exists(_folder))
     {
         log.Trace(SuccessMessage, _folder);
     }
     else
     {
         log.MarkFailure(FailureMessage, _folder);
     }
 }
开发者ID:DarthFubuMVC,项目名称:bottles,代码行数:11,代码来源:FolderExists.cs

示例3: checkCertificates

        private void checkCertificates(ISamlCertificateRepository repository, IPackageLog log)
        {
            var loader = _services.GetInstance<ICertificateLoader>();

            repository.AllKnownCertificates().Each(samlCertificate => {
                try
                {
                    var certificate = loader.Load(samlCertificate.Thumbprint);
                    if (certificate == null)
                    {
                        log.MarkFailure("Could not load Certificate for Issuer " + samlCertificate.Issuer);
                    }
                }
                catch (Exception ex)
                {
                    log.MarkFailure("Could not load Certificate for Issuer " + samlCertificate.Issuer);
                    log.MarkFailure(ex);
                }
            });
        }
开发者ID:sbartlett,项目名称:FubuMVC.Saml2,代码行数:20,代码来源:Saml2VerificationActivator.cs

示例4: Check

 public void Check(IPackageLog log)
 {
     if (File.Exists(_file))
     {
         log.Trace(SuccessMessage, _file);
     }
     else
     {
         log.MarkFailure(FailureMessage, _file);
     }
 }
开发者ID:DarthFubuMVC,项目名称:bottles,代码行数:11,代码来源:FileExists.cs

示例5: Check

        public void Check(IPackageLog log)
        {
            WasCalled = true;

            if (!_success)
            {
                log.MarkFailure(_message);
            }
            else
            {
                log.Trace(_message);
            }
        }
开发者ID:DarthFubuMVC,项目名称:bottles,代码行数:13,代码来源:PackageRegistryTester.cs

示例6: Activate

 public void Activate(IEnumerable<IPackageInfo> packages, IPackageLog log)
 {
     _jobs.Where(x => x.ScheduledExecution != ScheduledExecution.Disabled).Each(x => {
         try
         {
             log.Trace("Starting " + x.JobType.GetFullName());
             x.Start();
         }
         catch (Exception ex)
         {
             log.MarkFailure(ex);
         }
     });
 }
开发者ID:RyanHauert,项目名称:FubuTransportation,代码行数:14,代码来源:PollingJobActivator.cs

示例7: Activate

 public void Activate(IEnumerable<IPackageInfo> packages, IPackageLog log)
 {
     _jobs.Each(x => {
         try
         {
             log.Trace("Starting " + Description.For(x).Title);
             x.Start();
         }
         catch (Exception ex)
         {
             log.MarkFailure(ex);
         }
     });
 }
开发者ID:JackGilliam1,项目名称:FubuTransportation,代码行数:14,代码来源:PollingJobActivator.cs

示例8: Check

        public void Check(IPackageLog log)
        {
            var file = _folder.AppendPath(TracerFile);
            try
            {
                var system = new FileSystem();
                system.WriteStringToFile(file, "just a test of whether or not a process can write to a folder");
                system.DeleteFile(file);

                log.Trace(SuccessMessage.ToFormat(_folder));
            }
            catch (Exception)
            {
                log.MarkFailure(FailureMessage.ToFormat(_folder));
            }
        }
开发者ID:DarthFubuMVC,项目名称:bottles,代码行数:16,代码来源:CanWriteToFolder.cs

示例9: WithLog

 public static void WithLog(IPackageLog log, Action action)
 {
     _status.PushLog(log);
     try
     {
         log.Execute(action);
     }
     catch (Exception ex)
     {
         log.MarkFailure(ex);
     }
     finally
     {
         _status.PopLog();
     }
 }
开发者ID:nieve,项目名称:FubuRESTInnovation,代码行数:16,代码来源:LogWriter.cs

示例10: Deactivate

        public void Deactivate(IPackageLog log)
        {
            _latch.Latched = true;

            _jobs.Each(x => {
                try
                {
                    x.Stop();
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex);
                    log.MarkFailure(ex);
                }
            });
        }
开发者ID:JackGilliam1,项目名称:FubuTransportation,代码行数:16,代码来源:PollingJobDeactivator.cs

示例11: startTheEnvironment

        private static void startTheEnvironment(IList<LogEntry> list, IEnvironment environment, IPackageLog log, params Action<IInstaller, IPackageLog>[] actions)
        {          
            try
            {
                var installers = environment.StartUp(log);

                // This needs to happen regardless, but we want these logs put in before
                // logs for the installers, so we don't do it in the finally{}
                addPackagingLogEntries(list);

                executeInstallers(list, installers, actions);
            }
            catch (Exception ex)
            {
                addPackagingLogEntries(list);
                log.MarkFailure(ex.ToString());
            }
            finally
            {
                list.Add(LogEntry.FromPackageLog(environment, log));
                environment.SafeDispose();
            }
        }
开发者ID:NTCoding,项目名称:FubuRaven.NTCoding.com,代码行数:23,代码来源:EnvironmentRunner.cs

示例12: StartUp

 public IEnumerable<IInstaller> StartUp(IPackageLog log)
 {
     log.MarkFailure("I found a problem in StartUp");
     return new IInstaller[0];
 }
开发者ID:jemacom,项目名称:fubumvc,代码行数:5,代码来源:Environments.cs

示例13: Install

 public override void Install(IPackageLog log)
 {
     log.MarkFailure("I detected a problem during Install");
 }
开发者ID:jemacom,项目名称:fubumvc,代码行数:4,代码来源:Environments.cs

示例14: CheckEnvironment

 public override void CheckEnvironment(IPackageLog log)
 {
     log.MarkFailure("I detected a problem during CheckEnvironment");
 }
开发者ID:jemacom,项目名称:fubumvc,代码行数:4,代码来源:Environments.cs


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