C# 클래스 BlogEngine.Core.Web.Extensions.ExtensionManager

파일 보기 프로젝트 열기: rasmuskl/ReSharperCourse

Private Properties

프로퍼티 타입 설명
DataStoreExtension BlogEngine.Core.Web.Extensions.ManagedExtension
IsNewExtension bool
LoadExtensions void
SaveToCache void

공개 메소드들

메소드 설명
ChangeStatus ( string extension, bool enabled ) : void

Method to change extension status

Contains ( Type type ) : bool

Tell if manager already has this extension

ExtensionEnabled ( string extensionName ) : bool

Enabled / Disabled

GetExtension ( string extensionName ) : BlogEngine.Core.Web.Extensions.ManagedExtension

Returns extension to the client based on name

GetSettings ( string extensionName ) : BlogEngine.Core.Web.Extensions.ExtensionSettings

Method to get settings collection

GetSettings ( string extensionName, string settingName ) : BlogEngine.Core.Web.Extensions.ExtensionSettings

Returns settings for specified extension

ImportSettings ( BlogEngine.Core.Web.Extensions.ExtensionSettings settings ) : bool

Do initial import here. If already imported, let extension manager take care of settings To reset, blogger has to delete all settings in the manager

ImportSettings ( string extensionName, BlogEngine.Core.Web.Extensions.ExtensionSettings settings ) : bool

Imports the settings.

InitSettings ( string extensionName, BlogEngine.Core.Web.Extensions.ExtensionSettings settings ) : BlogEngine.Core.Web.Extensions.ExtensionSettings

Initializes settings by importing default parameters

Save ( ) : void

Will serialize and cache ext. mgr. object

SaveSettings ( BlogEngine.Core.Web.Extensions.ExtensionSettings settings ) : void

Will save settings (add to extension object, then cache and serialize all object hierarhy to XML)

SaveSettings ( string extensionName, BlogEngine.Core.Web.Extensions.ExtensionSettings settings ) : void

The save settings.

SaveToStorage ( ) : bool

Saves ext. manager object to XML file or database table using provider model

SaveToStorage ( BlogEngine.Core.Web.Extensions.ManagedExtension ext ) : bool

Save individual extension to storage

SetAdminPage ( string extension, string url ) : void

A way to let extension author to use custom admin page. Will show up as link on extensions page

SetStatus ( string extension, bool enabled ) : void

Only change status on first load; This allows to enable/disable extension on initial load and then be able to override it with change status from admin interface

ShowSettings ( string extensionName, bool flag ) : void

Show of hide settings in the admin/extensions list

비공개 메소드들

메소드 설명
DataStoreExtension ( string name ) : BlogEngine.Core.Web.Extensions.ManagedExtension

Returns extension object

IsNewExtension ( string name ) : bool

Extension is "new" if it is loaded from assembly but not yet saved to the disk. This state is needed so that we can initialize extension and its settings on the first load and then override it from admin

LoadExtensions ( ) : void

If extensions not in the cache will load from the XML file. If file not exists will load from assembly using reflection

SaveToCache ( ) : void

Caches for performance. If manager cached and not updates done, chached copy always returned

메소드 상세

ChangeStatus() 공개 정적인 메소드

Method to change extension status
public static ChangeStatus ( string extension, bool enabled ) : void
extension string /// Extensio Name ///
enabled bool /// If true, enables extension ///
리턴 void

Contains() 공개 정적인 메소드

Tell if manager already has this extension
public static Contains ( Type type ) : bool
type System.Type /// Extension Type ///
리턴 bool

ExtensionEnabled() 공개 정적인 메소드

Enabled / Disabled
public static ExtensionEnabled ( string extensionName ) : bool
extensionName string /// Name of the extension. ///
리턴 bool

GetExtension() 공개 정적인 메소드

Returns extension to the client based on name
public static GetExtension ( string extensionName ) : BlogEngine.Core.Web.Extensions.ManagedExtension
extensionName string /// Extension name ///
리턴 BlogEngine.Core.Web.Extensions.ManagedExtension

GetSettings() 공개 정적인 메소드

Method to get settings collection
public static GetSettings ( string extensionName ) : BlogEngine.Core.Web.Extensions.ExtensionSettings
extensionName string /// Extension Name ///
리턴 BlogEngine.Core.Web.Extensions.ExtensionSettings

GetSettings() 공개 정적인 메소드

Returns settings for specified extension
public static GetSettings ( string extensionName, string settingName ) : BlogEngine.Core.Web.Extensions.ExtensionSettings
extensionName string /// Extension Name ///
settingName string /// Settings Name ///
리턴 BlogEngine.Core.Web.Extensions.ExtensionSettings

ImportSettings() 공개 정적인 메소드

Do initial import here. If already imported, let extension manager take care of settings To reset, blogger has to delete all settings in the manager
public static ImportSettings ( BlogEngine.Core.Web.Extensions.ExtensionSettings settings ) : bool
settings BlogEngine.Core.Web.Extensions.ExtensionSettings /// The settings. ///
리턴 bool

ImportSettings() 공개 정적인 메소드

Imports the settings.
public static ImportSettings ( string extensionName, BlogEngine.Core.Web.Extensions.ExtensionSettings settings ) : bool
extensionName string /// Name of the extension. ///
settings BlogEngine.Core.Web.Extensions.ExtensionSettings /// The settings. ///
리턴 bool

InitSettings() 공개 정적인 메소드

Initializes settings by importing default parameters
public static InitSettings ( string extensionName, BlogEngine.Core.Web.Extensions.ExtensionSettings settings ) : BlogEngine.Core.Web.Extensions.ExtensionSettings
extensionName string /// Extension Name ///
settings BlogEngine.Core.Web.Extensions.ExtensionSettings /// Settings object ///
리턴 BlogEngine.Core.Web.Extensions.ExtensionSettings

Save() 공개 정적인 메소드

Will serialize and cache ext. mgr. object
public static Save ( ) : void
리턴 void

SaveSettings() 공개 정적인 메소드

Will save settings (add to extension object, then cache and serialize all object hierarhy to XML)
public static SaveSettings ( BlogEngine.Core.Web.Extensions.ExtensionSettings settings ) : void
settings BlogEngine.Core.Web.Extensions.ExtensionSettings /// Settings object ///
리턴 void

SaveSettings() 공개 정적인 메소드

The save settings.
public static SaveSettings ( string extensionName, BlogEngine.Core.Web.Extensions.ExtensionSettings settings ) : void
extensionName string /// The extension name. ///
settings BlogEngine.Core.Web.Extensions.ExtensionSettings /// The settings. ///
리턴 void

SaveToStorage() 공개 정적인 메소드

Saves ext. manager object to XML file or database table using provider model
public static SaveToStorage ( ) : bool
리턴 bool

SaveToStorage() 공개 정적인 메소드

Save individual extension to storage
public static SaveToStorage ( BlogEngine.Core.Web.Extensions.ManagedExtension ext ) : bool
ext BlogEngine.Core.Web.Extensions.ManagedExtension /// The Extension ///
리턴 bool

SetAdminPage() 공개 정적인 메소드

A way to let extension author to use custom admin page. Will show up as link on extensions page
public static SetAdminPage ( string extension, string url ) : void
extension string /// Extension Name ///
url string /// Path to custom admin page ///
리턴 void

SetStatus() 공개 정적인 메소드

Only change status on first load; This allows to enable/disable extension on initial load and then be able to override it with change status from admin interface
public static SetStatus ( string extension, bool enabled ) : void
extension string /// Extension Name ///
enabled bool /// Enable/disable extension on initial load ///
리턴 void

ShowSettings() 공개 정적인 메소드

Show of hide settings in the admin/extensions list
public static ShowSettings ( string extensionName, bool flag ) : void
extensionName string /// Extension name ///
flag bool /// True of false ///
리턴 void