Пример #1
0
        // Pusher overrides this to implement the .createTarget option
        /// <summary>This is the _local document ID stored on the remote server to keep track of state.
        ///     </summary>
        /// <remarks>
        /// This is the _local document ID stored on the remote server to keep track of state.
        /// Its ID is based on the local database ID (the private one, to make the result unguessable)
        /// and the remote database's URL.
        /// </remarks>
        internal String RemoteCheckpointDocID()
        {
            if (LocalDatabase == null)
            {
                return(null);
            }

            var input = LocalDatabase.PrivateUUID() + "\n" + RemoteUrl + "\n" + (!IsPull ? "1" : "0");

            return(Misc.TDHexSHA1Digest(Runtime.GetBytesForString(input)));
        }