Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class ClasspathResourceLoader

    Simple IResourceLoader that uses GetManifestResourceStream(string) and GetType(string) to open resources and Types, respectively.

    Inheritance
    object
    ClasspathResourceLoader
    Implements
    IResourceLoader
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Analysis.Util
    Assembly: Lucene.Net.Analysis.Common.dll
    Syntax
    public sealed class ClasspathResourceLoader : IResourceLoader

    Constructors

    ClasspathResourceLoader(Type)

    Creates an instance using the System.Assembly of the given class to load Resources and classes Resource paths must be absolute.

    Declaration
    public ClasspathResourceLoader(Type clazz)
    Parameters
    Type Name Description
    Type clazz

    Methods

    FindType(string)

    Finds class of the name

    NOTE: This was findClass() in Lucene
    Declaration
    public Type FindType(string cname)
    Parameters
    Type Name Description
    string cname
    Returns
    Type Description
    Type

    NewInstance<T>(string)

    Creates an instance of the name and expected type

    Declaration
    public T NewInstance<T>(string cname)
    Parameters
    Type Name Description
    string cname
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    OpenResource(string)

    Opens a named resource

    Declaration
    public Stream OpenResource(string resource)
    Parameters
    Type Name Description
    string resource
    Returns
    Type Description
    Stream

    Implements

    IResourceLoader
    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.