本文整理汇总了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();
}
示例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));
}
示例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;
}
示例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);
}
示例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");
}
示例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();
}
示例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();
}
示例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));
}
示例9: ReadPackage
public void ReadPackage(IPackageInfo package, IPackageLog log)
{
_currentPackage = package;
//double dispatch - hard to follow - at the moment
package.LoadAssemblies(this);
}
示例10: Activate
public void Activate(IEnumerable<IPackageInfo> packages, IPackageLog log)
{
log.Trace("Running {0}".ToFormat(GetType().Name));
configureSparkSettings(log);
setEngineDependencies(log);
}
示例11: Deactivate
public void Deactivate(IPackageLog log)
{
if(_settings.Disabled) return;
log.Trace("Shutting down the scheduled jobs");
_scheduledJobs.Deactivate();
}
示例12: Bootstrap
public IEnumerable<IActivator> Bootstrap(IPackageLog log)
{
_services.Clear();
_services.AddRange(BottleServiceFinder.Find(PackageRegistry.PackageAssemblies, log));
return new IActivator[0];
}
示例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);
}
示例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];
}
示例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);
}