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


C# IPackageLog类代码示例

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


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


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