public DefinitionBuilder(DefinitionMap staticDefinitions, ITypeFinder typeFinder, TransformerBase <IUniquelyNamed>[] transformers, EngineSection config) { this.staticDefinitions = staticDefinitions; this.typeFinder = typeFinder; this.transformers = transformers; this.config = config; }
public InstallationManager(IHost host, DefinitionMap map, ContentActivator activator, Importer importer, IPersister persister, ISessionProvider sessionProvider, IConfigurationBuilder configurationBuilder, IWebContext webContext) { this.host = host; this.map = map; this.activator = activator; this.importer = importer; this.persister = persister; this.sessionProvider = sessionProvider; this.configurationBuilder = configurationBuilder; this.webContext = webContext; }
public InstallationManager(IHost host, DefinitionMap map, ContentActivator activator, Importer importer, IPersister persister, ISessionProvider sessionProvider, IConfigurationBuilder configurationBuilder, IWebContext webContext, ConnectionMonitor connectionContext, DatabaseSection config) { this.host = host; this.map = map; this.activator = activator; this.importer = importer; this.persister = persister; this.sessionProvider = sessionProvider; this.configurationBuilder = configurationBuilder; this.webContext = webContext; this.connectionContext = connectionContext; this.isDatabaseFileSystemEnbled = config.Files.StorageLocation == FileStoreLocation.Database; }
public override void SetUp() { base.SetUp(); user = CreatePrincipal("SomeSchmuck"); map = new DefinitionMap(); DefinitionBuilder builder = new DefinitionBuilder(map, typeFinder, new TransformerBase<IUniquelyNamed>[0], new EngineSection()); IItemNotifier notifier = mocks.DynamicMock<IItemNotifier>(); mocks.Replay(notifier); var changer = new N2.Edit.Workflow.StateChanger(); activator = new ContentActivator(changer, notifier, new EmptyProxyFactory()); definitions = new DefinitionManager(new[] { new DefinitionProvider(builder) }, new ITemplateProvider[0], activator, changer); }
public void ItemEditor_AddsNewChild() { var item = new DecoratedItem(); var definition = new DefinitionMap().GetOrCreateDefinition(item); var editable = (EditableItemAttribute)definition.Properties["TheItem"].Editable; var page = new Page(); var enclosingEditor = new ItemEditor(); var editor = AddEditorAndInit(item, editable, page, enclosingEditor); editable.UpdateEditor(item, editor); ItemUtility.FindInChildren<N2.Web.UI.WebControls.NameEditor>(editor).Single().Text = "Hello child"; enclosingEditor.UpdateObject(new N2.Edit.Workflow.CommandContext(definition, item, Interfaces.Editing, engine.RequestContext.User)); item.Children.Single().ShouldBe(item.TheItem); }
public void NewChild_IsSaved() { var item = new DecoratedItem(); var definition = new DefinitionMap().GetOrCreateDefinition(item); var editable = (EditableItemAttribute)definition.Properties["TheItem"].Editable; var page = new Page(); var enclosingEditor = new ItemEditor(); var editor = AddEditorAndInit(item, editable, page, enclosingEditor); editable.UpdateEditor(item, editor); var ctx = new N2.Edit.Workflow.CommandContext(definition, item, Interfaces.Editing, engine.RequestContext.User); enclosingEditor.UpdateObject(ctx); ctx.GetItemsToSave().ShouldContain(item.TheItem); }
public TemplateProvider(DefinitionMap map) { this.map = map; }
public ContentTemplateRepository(IPersister persister, DefinitionMap map, ContainerRepository<TemplateContainer> container) { this.persister = persister; this.map = map; this.container = container; }
public ViewTemplateAnalyzer(IProvider<ViewEngineCollection> viewEnginesProvider, DefinitionMap map, DefinitionBuilder builder) { this.viewEnginesProvider = viewEnginesProvider; this.map = map; this.builder = builder; }
public ItemFinder(ISessionProvider sessionProvider, DefinitionMap map) { this.sessionProvider = sessionProvider; this.map = map; }
public TemplateProvider(DefinitionMap map) { this.map = map; }
public void TestFixtureSetUp() { factory = new InterceptingProxyFactory(); var map = new DefinitionMap(); factory.Initialize(new[] { typeof(InterceptableItem), typeof(InterceptableInheritorItem), typeof(IgnoringItem) }.Select(t => map.GetOrCreateDefinition(t))); }
public void SetUp() { Context.Replace(engine = new Fakes.FakeEngine(new[] { typeof(DecoratedItem), typeof(DecoratedItem2) })); engine.AddComponentInstance<ITemplateAggregator>(new TemplateAggregator(engine.Definitions, new ITemplateProvider[] { new TemplateProvider(TestSupport.SetupContentActivator(), map = new DefinitionMap()) })); }
public FakePartsAdapter(DefinitionMap map) { this.map = map; }
public CrossLinkDefinitionBuilder(DefinitionMap staticDefinitions, CrossLinkTypeFinder typeFinder, TransformerBase<IUniquelyNamed>[] transformers, EngineSection config) : base(staticDefinitions, typeFinder, transformers, config) { }
public RavenInstallationManager(IHost host, DefinitionMap map, ContentActivator activator, Importer importer, IPersister persister, ISessionProvider sessionProvider, IConfigurationBuilder configurationBuilder, IWebContext webContext, ConnectionMonitor connectionContext, DatabaseSection config, RavenConnectionProvider cp) : base(connectionContext, importer, webContext, persister, activator) { this.cp = cp; }
public DefinitionMap() { definitions = new Dictionary <string, ItemDefinition>(); _instance = this; }
public DefinitionBuilder(DefinitionMap staticDefinitions, ITypeFinder typeFinder, EngineSection config) { this.staticDefinitions = staticDefinitions; this.typeFinder = typeFinder; this.config = config; }
public ContentTemplateRepository(IRepository<ContentItem> repository, DefinitionMap map, ContainerRepository<TemplateContainer> container) { this.repository = repository; this.map = map; this.container = container; }
public ClassMappingGenerator(DefinitionMap map) { this.map = map; }
public TemplateProvider(ContentActivator activator, DefinitionMap map) { this.activator = activator; this.map = map; SortOrder = 1000; }
public TemplateProvider(ContentActivator activator, DefinitionMap map) { this.activator = activator; this.map = map; }
public DefinitionMap() { definitions = new Dictionary<string, ItemDefinition>(); _instance = this; }