本文整理汇总了C#中ContentActivator类的典型用法代码示例。如果您正苦于以下问题:C# ContentActivator类的具体用法?C# ContentActivator怎么用?C# ContentActivator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ContentActivator类属于命名空间,在下文中一共展示了ContentActivator类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LanguageInterceptor
public LanguageInterceptor(IPersister persister, ContentActivator activator, IWebContext context, ILanguageGateway gateway)
{
this.persister = persister;
this.activator = activator;
this.context = context;
this.gateway = gateway;
}
示例2: ItemXmlReader
public ItemXmlReader(IDefinitionManager definitions, ContentActivator activator, IRepository<ContentItem> repository)
{
this.definitions = definitions;
this.activator = activator;
this.readers = DefaultReaders();
this.repository = repository;
}
示例3: ExternalContentRepository
public ExternalContentRepository(ContainerRepository<ExternalItem> containerRepository, IPersister persister, ContentActivator activator, EditSection config)
{
this.containerRepository = containerRepository;
this.persister = persister;
this.activator = activator;
externalItemType = Type.GetType(config.Externals.ExternalItemType) ?? typeof(ExternalItem);
}
示例4: MongoInstallationManager
public MongoInstallationManager(MongoDatabaseProvider database, IHost host, IPersister persister, ConnectionMonitor connectionContext, Importer importer, IWebContext webContext, ContentActivator activator)
: base(connectionContext, importer, webContext, persister, activator)
{
this.database = database;
this.host = host;
this.persister = persister;
}
示例5: SetUp
public override void SetUp()
{
base.SetUp();
activator = new ContentActivator(stateChanger = new N2.Edit.Workflow.StateChanger(), notifier = new ItemNotifier(), new InterceptingProxyFactory());
activator.Initialize(new[] { new ItemDefinition(typeof(Definitions.PersistableItem)), new ItemDefinition(typeof(Definitions.PersistableItem1b)) });
}
示例6: SetUp
public void SetUp()
{
var changer = new N2.Edit.Workflow.StateChanger();
var activator = new ContentActivator(changer, MockRepository.GenerateStrictMock<IItemNotifier>(), new EmptyProxyFactory());
DefinitionBuilder builder = new DefinitionBuilder(new DefinitionMap(), new Fakes.FakeTypeFinder(typeof(RestrictsChildWithCardinality), typeof(ChildWithCardinality)), new TransformerBase<IUniquelyNamed>[0], new EngineSection { Definitions = new DefinitionCollection { DefineUnattributedTypes = true } });
definitions = new DefinitionManager(new[] { new DefinitionProvider(builder) }, new ITemplateProvider[0], activator, changer);
}
示例7: XmlInstallationManager
public XmlInstallationManager(IHost host, IPersister persister, XmlContentRepository repository, ConnectionMonitor connectionContext, Importer importer, IWebContext webContext, ContentActivator activator)
: base(connectionContext, importer, webContext, persister, activator)
{
this.host = host;
this.persister = persister;
this.repository = repository;
}
示例8: SetUp
public override void SetUp()
{
base.SetUp();
finder = new FakeTypeFinder(typeof(XmlableItem).Assembly, typeof(XmlableItem), typeof(XmlableItem2));
notifier = mocks.Stub<IItemNotifier>();
mocks.Replay(notifier);
activator = new ContentActivator(new N2.Edit.Workflow.StateChanger(), notifier, new InterceptingProxyFactory());
definitions = new DefinitionManager(
new[] {new DefinitionProvider(new DefinitionBuilder(new DefinitionMap(),
finder,
new TransformerBase<IUniquelyNamed>[0],
TestSupport.SetupEngineSection()))},
activator, new StateChanger(), new DefinitionMap());
definitions.Start();
parser = mocks.StrictMock<IUrlParser>();
Expect.On(parser)
.Call(parser.BuildUrl(null))
.IgnoreArguments()
.Do(new BuildUrl(delegate(ContentItem itemToBuild)
{
string url = "/" + itemToBuild.Name + ".aspx";
foreach (ContentItem parent in Find.EnumerateParents(itemToBuild, null))
{
if (parent.Parent != null)
url = "/" + parent.Name + url;
}
return url.ToUrl();
}))
.Repeat.Any();
mocks.Replay(parser);
persister = TestSupport.SetupFakePersister();
}
示例9: CreateUrlProvider
public CreateUrlProvider(IPersister persister, IEditUrlManager editUrlManager, IDefinitionManager definitions, ContentActivator activator, Navigator navigator)
{
this.persister = persister;
this.managementPaths = editUrlManager;
this.definitions = definitions;
this.activator = activator;
this.navigator = navigator;
}
示例10: InstallationManager
public InstallationManager(ConnectionMonitor connectionContext, Importer importer, IWebContext webContext, IPersister persister, ContentActivator activator)
{
this.connectionContext = connectionContext;
this.importer = importer;
this.webContext = webContext;
this.persister = persister;
this.activator = activator;
}
示例11: SecurityEnforcer
public SecurityEnforcer(Persistence.IPersister persister, ISecurityManager security, ContentActivator activator, Web.IUrlParser urlParser, Web.IWebContext webContext)
{
this.webContext = webContext;
this.persister = persister;
this.security = security;
this.activator = activator;
this.urlParser = urlParser;
}
示例12: ItemXmlReader
public ItemXmlReader(IDefinitionManager definitions, ContentActivator activator)
{
if (definitions == null)
throw new ArgumentNullException("definitions");
this.definitions = definitions;
this.activator = activator;
this.readers = DefaultReaders();
}
示例13: SecurityEnforcer
public SecurityEnforcer(Persistence.IPersister persister, ISecurityManager security, ContentActivator activator, Web.IUrlParser urlParser, Web.IWebContext webContext, Configuration.HostSection config)
{
this.webContext = webContext;
this.persister = persister;
this.security = security;
this.activator = activator;
this.urlParser = urlParser;
this.permissionDeniedHttpCode = config.Web.PermissionDeniedHttpCode;
}
示例14: CreateUrlProvider
public CreateUrlProvider(IPersister persister, IEditUrlManager editUrlManager, IDefinitionManager definitions, ITemplateProvider[] templates, ContentActivator activator, AjaxRequestDispatcher dispatcher, Navigator navigator)
: base(dispatcher)
{
this.persister = persister;
this.managementPaths = editUrlManager;
this.definitions = definitions;
this.templates = templates;
this.activator = activator;
this.navigator = navigator;
}
示例15: ViewTemplateProvider
public ViewTemplateProvider(ViewTemplateRegistrator registrator, ViewTemplateAnalyzer analyzer, ContentActivator activator, DefinitionBuilder builder, IProvider<HttpContextBase> httpContextProvider, IProvider<VirtualPathProvider> vppProvider)
{
this.registrator = registrator;
this.analyzer = analyzer;
this.activator = activator;
this.builder = builder;
this.httpContextProvider = httpContextProvider;
this.vppProvider = vppProvider;
registrator.RegistrationAdded += (s, a) => rebuild = true;
}