本文整理汇总了C#中BehaviorGraph类的典型用法代码示例。如果您正苦于以下问题:C# BehaviorGraph类的具体用法?C# BehaviorGraph怎么用?C# BehaviorGraph使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BehaviorGraph类属于命名空间,在下文中一共展示了BehaviorGraph类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: BehaviorGraphWriter
public BehaviorGraphWriter(BehaviorGraph graph, IUrlRegistry urls, IServiceLocator services)
{
_graph = graph;
_urls = urls;
_services = services;
_diagnosticsNamespace = GetType().Namespace;
}
开发者ID:sbartlett,项目名称:fubumvc,代码行数:7,代码来源:BehaviorGraphWriter.cs
示例2: SetUp
public void SetUp()
{
var registry = new FubuRegistry();
registry.Import<ApplyWindowsAuthentication>();
theGraph = BehaviorGraph.BuildFrom(registry);
}
开发者ID:RobertTheGrey,项目名称:FubuMVC.Authentication,代码行数:7,代码来源:setup_with_windows_authentication.cs
示例3: Configure
public void Configure(BehaviorGraph graph)
{
graph.Behaviors
.Where(x => !x.IsPartialOnly)
.Where(x => x.ResourceType().CanBeCastTo<JsonMessage>() || x.InputType().CanBeCastTo<JsonMessage>())
.Each(x => x.MakeAsymmetricJson());
}
开发者ID:roend83,项目名称:fubumvc,代码行数:7,代码来源:JsonMessageInputConvention.cs
示例4: SetUp
public void SetUp()
{
var registry = new FubuRegistry();
registry.Import<ServerSentEventsExtension>();
theGraph = BehaviorGraph.BuildFrom(registry);
}
开发者ID:DarthFubuMVC,项目名称:FubuMVC.ServerSentEvents,代码行数:7,代码来源:ServerSentEventExtensionIntegratedTester.cs
示例5: PartialFactory
public PartialFactory(BehaviorGraph graph, IBehaviorFactory factory, ServiceArguments arguments, ICurrentChain currentChain)
{
_graph = graph;
_factory = factory;
_arguments = arguments;
_currentChain = currentChain;
}
开发者ID:ketiko,项目名称:fubumvc,代码行数:7,代码来源:IPartialFactory.cs
示例6: SetUp
public void SetUp()
{
theGraph = BehaviorGraph.BuildFrom(x =>
{
x.Actions.IncludeClassesSuffixedWithController();
});
}
开发者ID:aluetjen,项目名称:fubumvc,代码行数:7,代码来源:BehaviorGraph_Logging_IntegratedTester.cs
示例7: SetUp
public void SetUp()
{
var registry = new FubuRegistry();
registry.Actions.IncludeType<RouteAliasController>();
theGraph = BehaviorGraph.BuildFrom(registry);
}
开发者ID:kingreatwill,项目名称:fubumvc,代码行数:7,代码来源:UrlAliasAttributeTester.cs
示例8: Configure
public void Configure(BehaviorGraph graph)
{
graph.Behaviors
.Where(x => !x.IsPartialOnly)
.Where(x => x.HasResourceType() && !x.HasOutput())
.Each(x => x.ApplyConneg());
}
开发者ID:roend83,项目名称:fubumvc,代码行数:7,代码来源:DefaultOutputPolicy.cs
示例9: beforeAll
public void beforeAll()
{
var registry = new FubuRegistry();
registry.Actions.IncludeType<Controller1>();
_graph = BehaviorGraph.BuildFrom(registry);
}
开发者ID:bobpace,项目名称:fubumvc,代码行数:7,代码来源:RouteRankingIntegratedTester.cs
示例10: SetUp
public void SetUp()
{
graph = new BehaviorGraph(null);
matcher = new ActionSourceMatcher();
pool = new TypePool();
}
开发者ID:bbehrens,项目名称:fubumvc,代码行数:7,代码来源:ActionSourceMatcherTester.cs
示例11: Configure
public void Configure(BehaviorGraph graph)
{
graph.Behaviors
.Where(x => x.ResourceType().CanBeCastTo<AjaxContinuation>())
.ToList()
.Each(Modify);
}
开发者ID:NeilSorensen,项目名称:fubumvc,代码行数:7,代码来源:OutputBeforeAjaxContinuationPolicy.cs
示例12: Configure
public void Configure(BehaviorGraph graph)
{
graph
.Actions()
.Where(c => !c.HandlerType.Namespace.Contains("Login") && !c.HandlerType.Namespace.Contains("Home"))
.Each(c => c.WrapWith<AuthenticationRequiredBehavior>());
}
开发者ID:henninga,项目名称:FubuDate,代码行数:7,代码来源:AuthenticationConvention.cs
示例13: Configure
public void Configure(BehaviorGraph graph)
{
graph
.Actions()
.Where(c => c.HasAttribute<SecureAttribute>())
.Each(c => c.WrapWith<AuthenticationRequiredBehaviour>());
}
开发者ID:chester89,项目名称:FubuSamples,代码行数:7,代码来源:AuthenticationConvention.cs
示例14: Configure
public void Configure(BehaviorGraph graph)
{
var jobs = graph.Settings.Get<PollingJobSettings>().Jobs;
jobs.Select(x => x.ToObjectDef())
.Each(x => graph.Services.AddService(typeof(IPollingJob), x));
}
开发者ID:RyanHauert,项目名称:FubuTransportation,代码行数:7,代码来源:RegisterPollingJobs.cs
示例15:
void IConfigurationAction.Configure(BehaviorGraph graph)
{
var chain = graph.BehaviorFor(_route);
_nodes.Each(chain.AddToEnd);
//graph.Observer.RecordStatus("Adding explicit route {0}".ToFormat(_route));
}
开发者ID:jemacom,项目名称:fubumvc,代码行数:7,代码来源:ExplicitRouteConfiguration.cs
示例16: ExampleHtmlWriter
public ExampleHtmlWriter(IServiceLocator serviceLocator, IUrlRegistry urlRegistry, BehaviorGraph behaviorGraph)
{
_serviceLocator = serviceLocator;
_urlRegistry = urlRegistry;
_behaviorGraph = behaviorGraph;
_examplePageUrl = "_fubu/html/example".ToAbsoluteUrl();
}
开发者ID:nhsevidence,项目名称:fubumvc,代码行数:7,代码来源:ExampleHtmlWriter.cs
示例17: SetUp
public void SetUp()
{
graph = new FubuRegistry().BuildGraph();
urls = MockRepository.GenerateMock<IUrlRegistry>();
writer = new BehaviorGraphWriter(graph, urls, null);
}
开发者ID:henninga,项目名称:fubumvc,代码行数:7,代码来源:BehaviorGraphWriterTester.cs
示例18: Apply
public void Apply(BehaviorGraph graph, BehaviorChain chain)
{
// Don't override the route if it already exists
if (chain.Route != null)
{
return;
}
// Don't override the route if the chain is a partial
if (chain.IsPartialOnly)
{
return;
}
_observer = graph.Observer;
ActionCall call = chain.Calls.FirstOrDefault();
if (call == null) return;
IUrlPolicy policy = _policies.FirstOrDefault(x => x.Matches(call, _observer)) ?? _defaultUrlPolicy;
_observer.RecordCallStatus(call, "First matching UrlPolicy (or default): {0}".ToFormat(policy.GetType().Name));
IRouteDefinition route = policy.Build(call);
_constraintPolicy.Apply(call, route, _observer);
_observer.RecordCallStatus(call, "Route definition determined by url policy: [{0}]".ToFormat(route.ToRoute().Url));
chain.Route = route;
}
开发者ID:roynmoore,项目名称:fubumvc,代码行数:28,代码来源:RouteDefinitionResolver.cs
示例19: Configure
public void Configure(BehaviorGraph graph)
{
var jobs = graph.Settings.Get<ScheduledJobGraph>();
var channels = graph.Settings.Get<ChannelGraph>();
if (jobs.Jobs.Any(x => x.Channel == null) && jobs.DefaultChannel == null)
{
var missing = jobs.Jobs.Where(x => x.Channel == null);
var message =
"No channel configured for jobs {0} and no default Scheduled job channel configured".ToFormat(
missing.Select(x => x.JobType.GetFullName()).Join(", "));
throw new InvalidOperationException(message);
}
jobs.Jobs.Where(x => x.Channel == null).Each(x => x.Channel = jobs.DefaultChannel);
jobs.Jobs.Each(job => {
var accessor = job.Channel ?? jobs.DefaultChannel;
var channel = channels.ChannelFor(accessor);
if (channel == null)
{
throw new InvalidOperationException("Nonexistent Channel '{0}' configured for Scheduled job {1}".ToFormat(accessor, job.JobType.GetFullName()));
}
channel.Rules.Add(job.ToRoutingRule());
});
}
开发者ID:joemcbride,项目名称:fubumvc,代码行数:28,代码来源:ApplyScheduledJobRouting.cs
示例20: Configure
public void Configure(BehaviorGraph graph)
{
graph.FirstActions().Where(x => x.InputType().CanBeCastTo<DomainEntity>()).Each(call =>
{
call.WrapWith(typeof(EnsureEntityExistsBehavior<>), call.InputType());
});
}
开发者ID:DarthFubuMVC,项目名称:FubuFastPack,代码行数:7,代码来源:EnsureEntityExistsConvention.cs
注:本文中的BehaviorGraph类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论