本文整理汇总了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();
}
示例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;
}
示例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();
}
示例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)));
}
示例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)));
}
示例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);
}
示例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);
}
示例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: Activate
public void Activate(IEnumerable<IPackageInfo> packages, IPackageLog log)
{
log.Trace("Running {0}".ToFormat(GetType().Name));
configureSparkSettings(log);
setEngineDependencies(log);
}
示例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);
}
示例11: Deactivate
public void Deactivate(IPackageLog log)
{
if(_settings.Disabled) return;
log.Trace("Shutting down the scheduled jobs");
_scheduledJobs.Deactivate();
}
示例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));
}
示例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);
}
示例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);
}
示例15: Activate
public void Activate(IEnumerable<IPackageInfo> packages, IPackageLog log)
{
_policies.Each(p =>
{
log.Trace("Running " + p);
p.Apply(log, _fileGraph, _graph);
});
}