Couchbase .NET SDK | 3.7.2
Search Results for

    Show / Hide Table of Contents

    Class LookupInResultExtensions

    Extensions for ILookupInResult.

    Inheritance
    object
    LookupInResultExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Couchbase.KeyValue
    Assembly: Couchbase.NetClient.dll
    Syntax
    public static class LookupInResultExtensions

    Methods

    | Edit this page View Source

    ContentAs<TDocument, TContent>(ILookupInResult<TDocument>, Expression<Func<TDocument, TContent>>)

    Get the result type TContent from a document of type TDocument, using a given lambda expression path.

    Declaration
    public static TContent? ContentAs<TDocument, TContent>(this ILookupInResult<TDocument> result, Expression<Func<TDocument, TContent>> path)
    Parameters
    Type Name Description
    ILookupInResult<TDocument> result

    ILookupInResult<TDocument> where the the subdocument lookup was returned.

    Expression<Func<TDocument, TContent>> path

    Lambda expression path that navigates to the subdocument from the parent document. This must be a path that was provided originally to the LookupInSpecBuilder<TDocument>.

    Returns
    Type Description
    TContent

    The subdocument content.

    Type Parameters
    Name Description
    TDocument

    Type of the parent document.

    TContent

    Type of the subdocument.

    Exceptions
    Type Condition
    ArgumentNullException

    result or path is null.

    | Edit this page View Source

    Exists<TDocument, TContent>(ILookupInResult<TDocument>, Expression<Func<TDocument, TContent>>)

    Get the existence result for a fragment of type TContent from a document of type TDocument, using a given lambda expression path.

    Declaration
    public static bool Exists<TDocument, TContent>(this ILookupInResult<TDocument> result, Expression<Func<TDocument, TContent>> path)
    Parameters
    Type Name Description
    ILookupInResult<TDocument> result

    ILookupInResult<TDocument> where the the subdocument lookup was returned.

    Expression<Func<TDocument, TContent>> path

    Lambda expression path that navigates to the subdocument from the parent document. This must be a path that was provided originally to the LookupInSpecBuilder<TDocument>.

    Returns
    Type Description
    bool

    True if the subdocument exists.

    Type Parameters
    Name Description
    TDocument

    Type of the parent document.

    TContent

    Type of the subdocument.

    Exceptions
    Type Condition
    ArgumentNullException

    result or path is null.

    • Edit this page
    • View Source
    In this article
    Back to top © 2025 Couchbase, Inc.