/// <inheritdoc />
        public async Task <int> IndexOfAsync(T item)
        {
            var itemData        = ToSafeData(item);
            var requestMessage  = ListIndexOfCodec.EncodeRequest(Name, itemData);
            var responseMessage = await Cluster.Messaging.SendToPartitionOwnerAsync(requestMessage, PartitionId).CAF();

            return(ListIndexOfCodec.DecodeResponse(responseMessage).Response);
        }
        public int IndexOf(T item)
        {
            ValidationUtil.ThrowExceptionIfNull(item);
            var value    = ToData(item);
            var request  = ListIndexOfCodec.EncodeRequest(GetName(), value);
            var response = Invoke(request);

            return(ListIndexOfCodec.DecodeResponse(response).response);
        }