Свойство | Тип | Описание | |
---|---|---|---|
CreateCaseInsensitiveDictionary | IDictionary | ||
CreateCaseSensitiveDictionary | IDictionary | ||
EnsureEventHandlersRegistered | void | ||
GetObjectScope | ObjectScope | ||
IsWebScopedSingleton | bool | ||
OnEndRequest | void | ||
OnEndSession | void | ||
WebObjectFactory | System |
Метод | Описание | |
---|---|---|
GetSingleton ( string objectName ) : object |
Tries to find cached object for the specified name. This implementation tries to find object first in the Request scope, then in the Session scope and finally in the Application scope. |
|
WebObjectFactory ( string contextPath, bool caseSensitive ) : System |
Creates a new instance of the Spring.Objects.Factory.Support.WebObjectFactory class.
|
|
WebObjectFactory ( string contextPath, bool caseSensitive, IObjectFactory parentFactory ) : System |
Creates a new instance of the Spring.Objects.Factory.Support.WebObjectFactory class.
|
Метод | Описание | |
---|---|---|
AddEagerlyCachedSingleton ( string objectName, IObjectDefinition objectDefinition, object rawSingletonInstance ) : void |
Add the created, but yet unpopulated singleton to the singleton cache to be able to resolve circular references Derived classes may override this method to select the right cache based on the object definition. |
|
ConfigureObject ( string name, Spring.Objects.Factory.Support.RootObjectDefinition definition, IObjectWrapper wrapper ) : object |
Configures object instance by injecting dependencies, satisfying Spring lifecycle interfaces and applying object post-processors.
|
|
CreateAndCacheScopedSingletonInstance ( string objectName, Spring.Objects.Factory.Support.RootObjectDefinition objectDefinition, object arguments, IDictionary scopedSingletonCache ) : object |
Creates a singleton instance for the specified object name and definition and caches the instance in the specified dictionary If the object is successfully created, scopedSingletonCache contains the cached instance with the key objectName. |
|
CreateAndCacheSingletonInstance ( string objectName, Spring.Objects.Factory.Support.RootObjectDefinition objectDefinition, object arguments ) : object |
Creates a singleton instance for the specified object name and definition.
|
|
CreateObjectDictionary ( ) : IDictionary |
Creates a dictionary matching this factory's case sensitivity behaviour.
|
|
CreateRootObjectDefinition ( IObjectDefinition templateDefinition ) : Spring.Objects.Factory.Support.RootObjectDefinition |
Creates the root object definition.
|
|
GetScopedSingleton ( string objectName, IDictionary scopedSingletonCache ) : object |
Looks up an objectName in the specified cache dictionary.
|
|
RegisterDisposableObjectIfNecessary ( string name, object instance, Spring.Objects.Factory.Support.RootObjectDefinition objectDefinition ) : void |
We need this override so that Web Scoped Singletons are not registered in general DisposalObjectRegister
|
|
RemoveEagerlyCachedSingleton ( string objectName, IObjectDefinition objectDefinition ) : void |
Remove the specified singleton from the singleton cache that has been added before by a call to AddEagerlyCachedSingleton Derived classes may override this method to select the right cache based on the object definition. |
Метод | Описание | |
---|---|---|
CreateCaseInsensitiveDictionary ( ) : IDictionary |
Creates a case insensitive hashtable instance
|
|
CreateCaseSensitiveDictionary ( ) : IDictionary |
Creates a case sensitive hashtable instance
|
|
EnsureEventHandlersRegistered ( ) : void |
Registers events handlers with WebSupportModule to ensure proper disposal of 'request'- and 'session'-scoped objects
|
|
GetObjectScope ( IObjectDefinition objectDefinition ) : ObjectScope | ||
IsWebScopedSingleton ( IObjectDefinition objectDefinition ) : bool | ||
OnEndRequest ( |
Disposes all 'request'-scoped objects at the end of each Request
|
|
OnEndSession ( System.Web.SessionState.HttpSessionState session, CacheItemRemovedReason reason ) : void |
Disposes all 'session'-scoped objects at the end of a session
|
|
WebObjectFactory ( ) : System |
protected AddEagerlyCachedSingleton ( string objectName, IObjectDefinition objectDefinition, object rawSingletonInstance ) : void | ||
objectName | string | the name of the object to add to the cache. |
objectDefinition | IObjectDefinition | the definition used to create and populated the object. |
rawSingletonInstance | object | the raw object instance. |
Результат | void |
protected ConfigureObject ( string name, Spring.Objects.Factory.Support.RootObjectDefinition definition, IObjectWrapper wrapper ) : object | ||
name | string |
/// The name of the object definition expressing the dependencies that are to
/// be injected into the supplied |
definition | Spring.Objects.Factory.Support.RootObjectDefinition | /// An object definition that should be used to configure object. /// |
wrapper | IObjectWrapper | /// A wrapped object instance that is to be so configured. /// |
Результат | object |
protected CreateAndCacheScopedSingletonInstance ( string objectName, Spring.Objects.Factory.Support.RootObjectDefinition objectDefinition, object arguments, IDictionary scopedSingletonCache ) : object | ||
objectName | string | /// The object name (will be used as the key in the singleton cache key). /// |
objectDefinition | Spring.Objects.Factory.Support.RootObjectDefinition | The object definition. |
arguments | object | /// The arguments to use if creating a prototype using explicit arguments to /// a static factory method. It is invalid to use a non-null arguments value /// in any other case. /// |
scopedSingletonCache | IDictionary | the dictionary to be used for caching singleton instances |
Результат | object |
protected CreateAndCacheSingletonInstance ( string objectName, Spring.Objects.Factory.Support.RootObjectDefinition objectDefinition, object arguments ) : object | ||
objectName | string | /// The object name (will be used as the key in the singleton cache key). /// |
objectDefinition | Spring.Objects.Factory.Support.RootObjectDefinition | The object definition. |
arguments | object | /// The arguments to use if creating a prototype using explicit arguments to /// a static factory method. It is invalid to use a non-null arguments value /// in any other case. /// |
Результат | object |
protected CreateObjectDictionary ( ) : IDictionary | ||
Результат | IDictionary |
protected CreateRootObjectDefinition ( IObjectDefinition templateDefinition ) : Spring.Objects.Factory.Support.RootObjectDefinition | ||
templateDefinition | IObjectDefinition | The template definition. |
Результат | Spring.Objects.Factory.Support.RootObjectDefinition |
protected GetScopedSingleton ( string objectName, IDictionary scopedSingletonCache ) : object | ||
objectName | string | the name to lookup. |
scopedSingletonCache | IDictionary | the cache dictionary to search |
Результат | object |
public GetSingleton ( string objectName ) : object | ||
objectName | string | Object name to look for. |
Результат | object |
protected RegisterDisposableObjectIfNecessary ( string name, object instance, Spring.Objects.Factory.Support.RootObjectDefinition objectDefinition ) : void | ||
name | string | |
instance | object | |
objectDefinition | Spring.Objects.Factory.Support.RootObjectDefinition | |
Результат | void |
protected RemoveEagerlyCachedSingleton ( string objectName, IObjectDefinition objectDefinition ) : void | ||
objectName | string | the name of the object to remove from the cache. |
objectDefinition | IObjectDefinition | the definition used to create and populated the object. |
Результат | void |
public WebObjectFactory ( string contextPath, bool caseSensitive ) : System | ||
contextPath | string | The virtual path resources will be relative resolved to. |
caseSensitive | bool | Flag specifying whether to make this object factory case sensitive or not. |
Результат | System |
public WebObjectFactory ( string contextPath, bool caseSensitive, IObjectFactory parentFactory ) : System | ||
contextPath | string | The virtual path resources will be relative resolved to. |
caseSensitive | bool | Flag specifying whether to make this object factory case sensitive or not. |
parentFactory | IObjectFactory | /// The parent object factory. /// |
Результат | System |