Show / Hide Table of Contents

    Class NamedServiceFactory<TService>

    LUCENENET specific abstract class containing common fuctionality for named service factories.

    Inheritance
    System.Object
    NamedServiceFactory<TService>
    DefaultCodecFactory
    DefaultDocValuesFormatFactory
    DefaultPostingsFormatFactory
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    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 Source

    m_initializationLock

    Declaration
    protected object m_initializationLock
    Field Value
    Type Description
    System.Object

    Properties

    | Improve this Doc View Source

    CodecsAssembly

    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
    | Improve this Doc View Source

    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 Source

    EnsureInitialized()

    Ensures the Initialize() method has been called since the last application start. This method is thread-safe.

    Declaration
    protected void EnsureInitialized()
    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    Initialize()

    Initializes the dependencies of this factory (such as using Reflection to populate the type cache).

    Declaration
    protected abstract void Initialize()
    | Improve this Doc View Source

    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

    true if the service subclasses TService, is public, and is not abstract; otherwise false.

    Extension Methods

    Number.IsNumber(Object)
    • Improve this Doc
    • View Source
    Back to top Copyright © 2019 Licensed to the Apache Software Foundation (ASF)