src/Orleans.Serialization/Session/ReferencedObjectCollection.cs
/// <summary>
/// Gets the index of the reference, or <c>-1</c> if the object has not been encountered before.
/// </summary>
/// <param name="value">The value.</param>
/// <returns>The index of the reference, or <c>-1</c> if the object has not been encountered before.</returns>
Gets the index of the reference, or -1
Gets the index of the reference or - 1
[MethodImpl(MethodImplOptions.AggressiveInlining)]
        public int GetReferenceIndex(object value)
        {
            if (value is null)
            {
                return -1;
            }
            for (var i = 0; i < ReferenceToObjectCount; ++i)
            {
                if (ReferenceEquals(_referenceToObject[i].Object, value))
                {
                    return i;
                }
            }
            return -1;
        }
[ MethodImpl ( MethodImplOptions . AggressiveInlining ) ] public int GetReferenceIndex ( object value ) { if ( value is null ) { return - 1 ; } for ( var i = 0 ; i < ReferenceToObjectCount ; ++ i ) { if ( ReferenceEquals ( _referenceToObject [ i ] . Object , value ) ) { return i ; } } return - 1 ; }
Gets the index of the reference, or -1
Gets the index of the reference or - 1
The index of the reference, or -1
The index of the reference or - 1
value
object
None