IEngine.cs :  » Content-Management-Systems-CMS » N2 » N2 » Engine » C# / CSharp Open Source

Home
C# / CSharp Open Source
1.2.6.4 mono .net core
2.2.6.4 mono core
3.Aspect Oriented Frameworks
4.Bloggers
5.Build Systems
6.Business Application
7.Charting Reporting Tools
8.Chat Servers
9.Code Coverage Tools
10.Content Management Systems CMS
11.CRM ERP
12.Database
13.Development
14.Email
15.Forum
16.Game
17.GIS
18.GUI
19.IDEs
20.Installers Generators
21.Inversion of Control Dependency Injection
22.Issue Tracking
23.Logging Tools
24.Message
25.Mobile
26.Network Clients
27.Network Servers
28.Office
29.PDF
30.Persistence Frameworks
31.Portals
32.Profilers
33.Project Management
34.RSS RDF
35.Rule Engines
36.Script
37.Search Engines
38.Sound Audio
39.Source Control
40.SQL Clients
41.Template Engines
42.Testing
43.UML
44.Web Frameworks
45.Web Service
46.Web Testing
47.Wiki Engines
48.Windows Presentation Foundation
49.Workflows
50.XML Parsers
C# / C Sharp
C# / C Sharp by API
C# / CSharp Tutorial
C# / CSharp Open Source » Content Management Systems CMS » N2 
N2 » N2 » Engine » IEngine.cs
using System;
using N2.Definitions;
using N2.Edit;
using N2.Integrity;
using N2.Persistence;
using N2.Security;
using N2.Web;

namespace N2.Engine{
  /// <summary>
  /// Classes implementing this interface can serve as a portal for the 
  /// various services composing the N2 engine. Edit functionality, modules
  /// and implementations access most N2 functionality through this 
  /// interface.
  /// </summary>
  public interface IEngine
  {
    /// <summary>Gets the persistence manager responsible of storing content items to persistence medium (database).</summary>
    IPersister Persister { get; }

    /// <summary>Gets the url parser responsible of mapping urls to items and back again.</summary>
    IUrlParser UrlParser { get; }

    /// <summary>Gets the definition manager responsible of maintaining available item definitions.</summary>
    IDefinitionManager Definitions { get; }

    /// <summary>Gets the integrity manager used to control which items are allowed below which.</summary>
    IIntegrityManager IntegrityManager { get; }

    /// <summary>Gets the security manager responsible of controlling access to items.</summary>
    ISecurityManager SecurityManager { get; }

    /// <summary>Gets the class responsible for plugins in edit mode.</summary>
    IEditManager EditManager { get; }

    /// <summary>Contextual data associated with the current request.</summary>
    IWebContext RequestContext { get; }

        /// <summary>The base of the web site.</summary>
        IHost Host { get; }

    IServiceContainer Container { get; }

    /// <summary>
        /// Initialize components and plugins in the N2 CMS environment.
        /// </summary>
    void Initialize();

    /// <summary>Resolves a service configured for the factory.</summary>
    /// <typeparam name="T">The type of service to resolve.</typeparam>
    /// <returns>An instance of the resolved service.</returns>
    T Resolve<T>() where T : class;

    /// <summary>Resolves a service configured for the factory.</summary>
    /// <param name="serviceType">The type of service to resolve.</param>
    /// <returns>An instance of the resolved service.</returns>
    object Resolve(Type serviceType);

    /// <summary>Resolves a named service configured for the factory.</summary>
    /// <param name="key">The name of the service to resolve.</param>
    /// <returns>An instance of the resolved service.</returns>
    [Obsolete("No longer supported.  Use another method on the Container property")]
    object Resolve(string key);

    /// <summary>Registers a component in the IoC container.</summary>
    /// <param name="key">The name of the component.</param>
    /// <param name="classType">The type of component.</param>
    void AddComponent(string key, Type classType);

    /// <summary>Registers a component in the IoC container.</summary>
    /// <param name="key">The name of the component.</param>
    /// <param name="serviceType">The service interface of the component.</param>
    /// <param name="classType">The type of component.</param>
    void AddComponent(string key, Type serviceType, Type classType);

    /// <summary>Adds a compnent instance to the container.</summary>
    /// <param name="key">A unique key.</param>
    /// <param name="serviceType">The type of service to provide.</param>
    /// <param name="instance">The service instance to add.</param>
    void AddComponentInstance(string key, Type serviceType, object instance);

    /// <summary>Adds a compnent instance to the container.</summary>
    /// <param name="key">A unique key.</param>
    /// <param name="classType">The type of component.</param>
    /// <param name="lifeStyle">The lifestyle that the component will be instantiated with.</param>
    void AddComponentLifeStyle(string key, Type classType, ComponentLifeStyle lifeStyle);

    /// <summary>Adds a "facility" to the IoC container. Unless this has been changed it's assumed that tihs is a <see cref="Castle.MicroKernel.IFacility"/>.</summary>
    /// <param name="key">The name of the facility.</param>
    /// <param name="facility">The facility instance.</param>
    [Obsolete("Not supportable by all service containers. Use the specific IServiceContainer implementation")]
    void AddFacility(string key, object facility);

    /// <summary>Releases a component from the IoC container.</summary>
    /// <param name="instance">The component instance to release.</param>
    void Release(object instance);
  }

  public enum ComponentLifeStyle
  {
    Singleton = 0,
    Transient = 1,
  }
}
www.java2v.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.