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

C# IPackageLog类代码示例

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

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



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

示例1: Activate

 public void Activate(IEnumerable<IPackageInfo> packages, IPackageLog log)
 {
     _graph.ReadSettings(_services);
     OpenChannels();
     _graph.StartReceiving(_pipeline);
     ExecuteActivators();
 }
开发者ID:RyanHauert,项目名称:FubuTransportation,代码行数:7,代码来源:TransportActivator.cs


示例2: Activate

        public void Activate(IEnumerable<IPackageInfo> packages, IPackageLog log)
        {
            var provider = new FileSystemVirtualPathProvider();
            HostingEnvironment.RegisterVirtualPathProvider(provider);

            packages.Each(x => x.ForFolder(FubuMvcPackages.WebContentFolder, provider.RegisterContentDirectory));
        }
开发者ID:sbartlett,项目名称:fubumvc,代码行数:7,代码来源:VirtualPathProviderPackageActivator.cs


示例3: findEnvironment

        private IEnvironment findEnvironment(List<LogEntry> list, IPackageLog log)
        {
            var environmentType = _run.FindEnvironmentType(log);
            if (environmentType == null)
            {
                throw new EnvironmentRunnerException("Unable to find an IEnvironment type");
            }

            IEnvironment environment = null;
            try
            {
                environment = (IEnvironment) Activator.CreateInstance(environmentType);

            }
            catch (Exception e)
            {
                list.Add(new LogEntry
                         {
                             Description = environmentType.FullName,
                             Success = false,
                             TraceText = e.ToString()
                         });
            }

            return environment;
        }
开发者ID:NTCoding,项目名称:FubuRaven.NTCoding.com,代码行数:26,代码来源:EnvironmentRunner.cs


示例4: Load

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

            var binPath = FubuMvcPackageFacility.FindBinPath();
            if (binPath.IsNotEmpty())
            {
                list.Add(binPath);
            }

            // This is a workaround for Self Hosted apps where the physical path is different than the AppDomain's original
            // path
            if (FubuMvcPackageFacility.PhysicalRootPath.IsNotEmpty())
            {

                var path = FubuMvcPackageFacility.PhysicalRootPath.ToFullPath().AppendPath("bin");
                if (Directory.Exists(path) && !list.Select(x => x.ToLower()).Contains(path.ToLower()))
                {
                    list.Add(path);
                }
            }

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

            return LoadPackages(list);
        }
开发者ID:joemcbride,项目名称:fubumvc,代码行数:29,代码来源:FubuModuleAttributePackageLoader.cs


示例5: Activate

 public void Activate(IEnumerable<IPackageInfo> packages, IPackageLog log)
 {
     var cache = _localeCacheFactory.GetDefault();
     cache.Append(ValidationKeys.REQUIRED, "Campo requerido");
     cache.Append<EditProductModel>(p => p.Description, "Descripción");
     //cache.Append<AddProductModel>(p => p.Description, "Descripción");
 }
开发者ID:emiaj,项目名称:ProductsManagement,代码行数:7,代码来源:LocalizationActivator.cs


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


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


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

        public void ReadPackage(IPackageInfo package, IPackageLog log)
        {
            _currentPackage = package;

            //double dispatch - hard to follow - at the moment
            package.LoadAssemblies(this);
        }
开发者ID:NTCoding,项目名称:FubuRaven.NTCoding.com,代码行数:7,代码来源:AssemblyLoader.cs


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


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

        public IEnumerable<IActivator> Bootstrap(IPackageLog log)
        {
            _services.Clear();
            _services.AddRange(BottleServiceFinder.Find(PackageRegistry.PackageAssemblies, log));

            return new IActivator[0];
        }
开发者ID:DarthFubuMVC,项目名称:bottles,代码行数:7,代码来源:BottleServiceBootstrapper.cs


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


示例14: Bootstrap

        public IEnumerable<IActivator> Bootstrap(IPackageLog log)
        {
            _services = _inner.Bootstrap(log).Select(x => new BottleService(x, log));
            _services.Each(x => x.Start());

            return new IActivator[0];
        }
开发者ID:DarthFubuMVC,项目名称:bottles,代码行数:7,代码来源:WrappedBootstrapper.cs


示例15: Activate

        public void Activate(IEnumerable<IPackageInfo> packages, IPackageLog log)
        {
            ReadScriptConfig(FubuMvcPackageFacility.GetApplicationPath(), log);
            packages.Each(p => p.ForFolder(BottleFiles.WebContentFolder, folder => ReadScriptConfig(folder, log)));

            _assets.CompileDependencies(log);
        }
开发者ID:hartez,项目名称:fubumvc,代码行数:7,代码来源:AssetGraphConfigurationActivator.cs


示例16: Activate

        public void Activate(IEnumerable<IPackageInfo> packages, IPackageLog log)
        {
            Console.WriteLine("hi, poopy pants");

            packages.Select(p => p.Name)
                .Each(s => Console.WriteLine(s));
        }
开发者ID:jemacom,项目名称:fubumvc,代码行数:7,代码来源:TestActivator.cs


示例17: addPackageLog

 /// <summary>
 /// Fuegt ein neues Log hinzu.
 /// </summary>
 /// <param name="log">Das hinzuzufuegende Log.</param>
 public void addPackageLog(IPackageLog log)
 {
     if (log == null) throw new ArgumentNullException("log");
     if (clientLogs.ContainsKey(log.Client))
         clientLogs.Remove(log.Client);
     clientLogs.Add(log.Client, log);
 }
开发者ID:Zakant,项目名称:SimpleNetworkCSharp,代码行数:11,代码来源:ServerPackageLog.cs


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


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


示例20: Activate

        public void Activate(IEnumerable<IPackageInfo> packages, IPackageLog log)
        {
            var library = _graph.Settings.Get<HtmlConventionLibrary>();
            library.Import(new DefaultHtmlConventions().Library);


            _facility.Register(typeof(HtmlConventionLibrary), ObjectDef.ForValue(library));
        }
开发者ID:mtscout6,项目名称:FubuMVC.Core.UI,代码行数:8,代码来源:HtmlConventionsActivator.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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