Class NamedServiceFactory<TService>
LUCENENET specific abstract class containing common fuctionality for named service factories.
Inheritance
Inherited Members
Namespace: Lucene.Net.Util
Assembly: Lucene.Net.dll
Syntax
public abstract class NamedServiceFactory<TService>
Type Parameters
Name | Description |
---|---|
TService | The type of service this factory applies to. |
Fields
| Improve this Doc View Sourcem_initializationLock
Declaration
protected object m_initializationLock
Field Value
Type | Description |
---|---|
System.Object |
Properties
| Improve this Doc View SourceCodecsAssembly
The Lucene.Net.Codecs assembly or null
if the assembly is not referenced
in the host project.
Declaration
protected Assembly CodecsAssembly { get; }
Property Value
Type | Description |
---|---|
System.Reflection.Assembly |
IsFullyTrusted
Gets a value that indicates whether the current application domain executes with full trust.
Declaration
protected bool IsFullyTrusted { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
| Improve this Doc View SourceEnsureInitialized()
Ensures the Initialize() method has been called since the last application start. This method is thread-safe.
Declaration
protected void EnsureInitialized()
GetCanonicalName(Type)
Gets the type name without the suffix of the abstract base class it implements. If the class is generic, it will add the word "Generic" to the suffix in place of "`" to ensure the name is ASCII-only.
Declaration
protected static string GetCanonicalName(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The System.Type to get the name for. |
Returns
Type | Description |
---|---|
System.String | The canonical name of the service. |
GetServiceName(Type)
Get the service name for the class (either by convention or by attribute).
Declaration
public static string GetServiceName(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | A service to get the name for. |
Returns
Type | Description |
---|---|
System.String | The canonical name of the service or the name provided in the corresponding name attribute, if supplied. |
Initialize()
Initializes the dependencies of this factory (such as using Reflection to populate the type cache).
Declaration
protected abstract void Initialize()
IsServiceType(Type)
Determines whether the given type is corresponding service for this class,
based on its generic closing type TService
.
Declaration
protected virtual bool IsServiceType(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The System.Type of service to analyze. |
Returns
Type | Description |
---|---|
System.Boolean |
|