Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class ReferenceContext<T>

    ReferenceContext<T> holds a reference instance and ensures it is properly de-referenced from its corresponding ReferenceManager<G> when Dispose() is called. This class is primarily intended to be used with a using block.

    LUCENENET specific

    Inheritance
    System.Object
    ReferenceContext<T>
    Implements
    System.IDisposable
    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.Search
    Assembly: Lucene.Net.dll
    Syntax
    public sealed class ReferenceContext<T> : IDisposable where T : class
    Type Parameters
    Name Description
    T

    The reference type

    Properties

    | Improve this Doc View Source

    Reference

    The reference acquired from the ReferenceManager<G>.

    Declaration
    public T Reference { get; }
    Property Value
    Type Description
    T

    Methods

    | Improve this Doc View Source

    Dispose()

    Ensures the reference is properly de-referenced from its ReferenceManager<G>. After this call, Reference will be null.

    Declaration
    public void Dispose()

    Implements

    System.IDisposable
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 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.