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


C# IPackageLog.Trace方法代码示例

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


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

示例1: Activate

        public void Activate(IEnumerable<IPackageInfo> packages, IPackageLog log)
        {
            log.Trace("Determining subscriptions for node " + _cache.NodeName);

            _repository.SaveTransportNode();

            var requirements = determineStaticRequirements(log);

            if (requirements.Any())
            {
                log.Trace("Found static subscription requirements:");
                requirements.Each(x => log.Trace(x.ToString()));
            }
            else
            {
                log.Trace("No static subscriptions found from registry");
            }

            _repository.PersistSubscriptions(requirements);

            var subscriptions = _repository.LoadSubscriptions(SubscriptionRole.Publishes);
            _cache.LoadSubscriptions(subscriptions);

            sendSubscriptions();
        }
开发者ID:JackGilliam1,项目名称:FubuTransportation,代码行数:25,代码来源:SubscriptionActivator.cs

示例2: Load

        public IEnumerable<IPackageInfo> Load(IPackageLog log)
        {
            var packages = new List<IPackageInfo>();

            var manifestFile = _applicationDirectory.AppendPath(LinkManifest.FILE);
            var manifest = _fileSystem.LoadFromFile<LinkManifest>(manifestFile);
            if (manifest == null)
            {
                log.Trace("No package manifest found at {0}", manifestFile);
                return packages;
            }

            if (manifest.LinkedFolders.Any())
            {
                log.Trace("Loading linked folders via the package manifest at " + _applicationDirectory);
                manifest.LinkedFolders.Each(folder =>
                {
                    if (Platform.IsUnix()) {
                        folder = folder.Replace('\\', Path.DirectorySeparatorChar);
                    }

                    var linkedFolder = FileSystem.Combine(_applicationDirectory, folder).ToFullPath();
                    log.Trace("  - linking folder " + linkedFolder);

                    var package = _reader.LoadFromFolder(linkedFolder);
                    packages.Add(package);
                });
            }
            else
            {
                log.Trace("No linked folders found in the package manifest file at " + _applicationDirectory);
            }

            return packages;
        }
开发者ID:DarthFubuMVC,项目名称:bottles,代码行数:35,代码来源:LinkedFolderPackageLoader.cs

示例3: Activate

        public void Activate(IEnumerable<IPackageInfo> packages, IPackageLog log)
        {
            log.Trace("Determining subscriptions for node " + _cache.NodeName);

            // assuming that there are no automaticly persistent tasks
            // upon startup
            _repository.Persist(new TransportNode(_graph));

            var requirements = determineStaticRequirements(log);

            if (requirements.Any())
            {
                log.Trace("Found static subscription requirements:");
                requirements.Each(x => log.Trace(x.ToString()));
            }
            else
            {
                log.Trace("No static subscriptions found from registry");
            }

            _repository.PersistSubscriptions(requirements);

            var subscriptions = _repository.LoadSubscriptions(SubscriptionRole.Publishes);
            _cache.LoadSubscriptions(subscriptions);

            sendSubscriptions();
        }
开发者ID:kharlamov,项目名称:FubuTransportation,代码行数:27,代码来源:SubscriptionActivator.cs

示例4: configureRazorSettings

        private void configureRazorSettings(IPackageLog log)
        {
            _engine.Namespaces.Add(typeof(VirtualPathUtility).Namespace); // System.Web
            _engine.Namespaces.Add(typeof(RazorViewFacility).Namespace); // FubuMVC.Razor
            _engine.Namespaces.Add(typeof(FubuPageExtensions).Namespace); // FubuMVC.Core.UI
            _engine.Namespaces.Add(typeof(HtmlTag).Namespace); // HtmlTags

            log.Trace("Adding namespaces to RazorSettings:");
            _engine.Namespaces.Each(x => log.Trace("  - {0}".ToFormat(x)));
        }
开发者ID:chadmyers,项目名称:fubumvc,代码行数:10,代码来源:RazorActivator.cs

示例5: configureRazorSettings

        private void configureRazorSettings(IPackageLog log)
        {
            _namespaces.Add(typeof(VirtualPathUtility).Namespace); // System.Web)
            _namespaces.AddForType<RazorViewFacility>(); // FubuMVC.Razor
            _namespaces.AddForType<IPartialInvoker>(); // FubuMVC.Core.UI
            _namespaces.AddForType<HtmlTag>(); // HtmlTags
            _namespaces.AddForType<string>();

            log.Trace("Adding namespaces to RazorSettings:");
            _namespaces.Namespaces.Each(x => log.Trace("  - {0}".ToFormat(x)));
        }
开发者ID:src75,项目名称:ToDoSample,代码行数:11,代码来源:RazorActivator.cs

示例6: Activate

        public void Activate(IEnumerable<IPackageInfo> packages, IPackageLog log)
        {
            if (!_settings.AutoHostingEnabled)
            {
                log.Trace("Embedded Katana hosting is not enabled");
                return;
            }

            Console.WriteLine("Starting Katana hosting at port " + _settings.Port);
            log.Trace("Starting Katana hosting at port " + _settings.Port);

            _settings.EmbeddedServer = new EmbeddedFubuMvcServer(_settings, _urls, _services, _routes);
        }
开发者ID:mtscout6,项目名称:fubumvc,代码行数:13,代码来源:KatanaHostingActivator.cs

示例7: setEngineDependencies

        private void setEngineDependencies(IPackageLog log)
        {
            var engine = (SparkViewEngine) _engine;

            engine.ViewFolder = new TemplateViewFolder(_templateRegistry);
            log.Trace("Setting viewfolder [{0}] for view engine", _engine.ViewFolder.GetType().FullName);
            
            engine.DefaultPageBaseType = typeof(FubuSparkView).FullName;
            log.Trace("Setting page base type [{0}] for views", _engine.DefaultPageBaseType);

            engine.BindingProvider = new FubuBindingProvider(_templateRegistry);
            log.Trace("Setting binding provider [{0}] for view engine", engine.BindingProvider.GetType().FullName);
        }
开发者ID:bobpace,项目名称:FubuMVC.ViewEngines,代码行数:13,代码来源:SparkActivator.cs

示例8: Load

        public IEnumerable<IPackageInfo> Load(IPackageLog log)
        {
            var list = new List<string> { AppDomain.CurrentDomain.SetupInformation.ApplicationBase };

            string binPath = AppDomain.CurrentDomain.SetupInformation.PrivateBinPath;
            if (binPath.IsNotEmpty())
            {
                if (Path.IsPathRooted(binPath))
                {
                    list.Add(binPath);
                }
                else
                {
                    list.Add(AppDomain.CurrentDomain.SetupInformation.ApplicationBase.AppendPath(binPath));
                }
            }

            list.Each(x =>
            {
                log.Trace("Looking for assemblies marked with the [FubuModule] attribute in " + x);
            });

            return list.SelectMany(
                x =>
                AssembliesFromPath(x, assem => assem.GetCustomAttributes(typeof (FubuModuleAttribute), false).Any()))
                .Select(assem => new AssemblyPackageInfo(assem));
        }
开发者ID:ahjohannessen,项目名称:fubumvc,代码行数:27,代码来源:FubuModuleAttributePackageLoader.cs

示例9: Activate

        public void Activate(IEnumerable<IPackageInfo> packages, IPackageLog log)
        {
            log.Trace("Running {0}".ToFormat(GetType().Name));

            configureSparkSettings(log);
            setEngineDependencies(log);
        }
开发者ID:src75,项目名称:ToDoSample,代码行数:7,代码来源:SparkActivator.cs

示例10: Activate

        public void Activate(IEnumerable<IPackageInfo> packages, IPackageLog log)
        {
            var postActionsFinder = new BehaviorVisitor(_graph.Observer, "Looking for valid POST actions.");
            postActionsFinder.Filters.Add(x => x.Route != null);
            postActionsFinder.Filters.Add(x => x.Route.AllowedHttpMethods.Contains("POST"));
            postActionsFinder.Filters.Add(x => x.FirstCall() != null);
            postActionsFinder.Filters.Add(x => x.FirstCall().HasOutput);
            postActionsFinder.Filters.Add(x => x.FirstCall().HasInput);
            postActionsFinder.Actions += x =>
            {
                var postAction = x.FirstCall();
                var handlerActions = _graph.ActionsForHandler(postAction.HandlerType);
                var getAction = handlerActions
                    .Where(h => h.ParentChain().Route != null)
                    .Where(h => h.ParentChain().Route.AllowedHttpMethods.Contains("GET"))
                    .Where(h => h.HasInput).Where(h => h.HasOutput)
                    .FirstOrDefault(h => x.InputType().IsAssignableFrom(h.OutputType()));

                if (getAction == null)
                {
                    return;
                }
                log.Trace("Linking validation descriptor for {0} against {1}.", postAction, getAction);
                _provider.Register(postAction, getAction.InputType());
            };
            _graph.VisitBehaviors(postActionsFinder);
        }
开发者ID:emiaj,项目名称:ProductsManagement,代码行数:27,代码来源:ValidationDescriptorProviderFiller.cs

示例11: Deactivate

        public void Deactivate(IPackageLog log)
        {
            if(_settings.Disabled) return;

            log.Trace("Shutting down the scheduled jobs");
            _scheduledJobs.Deactivate();
        }
开发者ID:joemcbride,项目名称:fubumvc,代码行数:7,代码来源:FubuTransportationActivator.cs

示例12: ReadScriptConfig

        public void ReadScriptConfig(string folder, IPackageLog log)
        {
            log.Trace("Trying to read *script.config / *asset.config files from {0}", folder);
            var files = _fileSystem.FindFiles(folder, new FileSet(){
                Include = "*.script.config;*.asset.config",
                DeepSearch = false
            });

            if (!files.Any())
            {
                log.Trace("  No *.script.config or *.asset.config files found");
                return;
            }

            files.Each(file => ReadFile(file, log));
        }
开发者ID:hartez,项目名称:fubumvc,代码行数:16,代码来源:AssetGraphConfigurationActivator.cs

示例13: RegisterAppGlobal

        // I would rather have this as a ISharingPolicy, but don't know how to ensure it is applied last.
        public void RegisterAppGlobal(IPackageLog log)
        {
            log.Trace("Registering application as global sharing.");

            Diagnostics.SetCurrentProvenance(TemplateConstants.HostOrigin);
            Diagnostics.Global(TemplateConstants.HostOrigin);
        }
开发者ID:KevM,项目名称:fubumvc,代码行数:8,代码来源:SharingPolicyActivator.cs

示例14: CompileDependencies

        public void CompileDependencies(IEnumerable<IPackageInfo> packages, IPackageLog log)
        {
            var provenances = packages.Select(p => p.Name).Union(new[] { TemplateConstants.HostOrigin }).ToArray();

            log.Trace("Compiling dependencies for [{0}]", provenances.Join(", "));

            _graph.CompileDependencies(provenances);
        }
开发者ID:KevM,项目名称:fubumvc,代码行数:8,代码来源:SharingPolicyActivator.cs

示例15: Activate

 public void Activate(IEnumerable<IPackageInfo> packages, IPackageLog log)
 {
     _policies.Each(p =>
     {
         log.Trace("Running " + p);
         p.Apply(log, _fileGraph, _graph);
     });
 }
开发者ID:bobpace,项目名称:FubuMVC.Core.Assets,代码行数:8,代码来源:AssetPolicyActivator.cs


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