コード例 #1
0
        /// <summary>
        /// This method will remove an existing data object.
        /// </summary>
        /// <param name="token">The access token. Read more at https://serialkeymanager.com/docs/api/v3/Auth </param>
        /// <remarks>Note: for more details, please see
        /// <a href="https://serialkeymanager.com/docs/api/v3/IncrementIntValue">https://serialkeymanager.com/docs/api/v3/IncrementIntValue</a> <br/>
        /// </remarks>
        /// <returns>Returns true if successful or false otherwise.</returns>
        public bool RemoveDataObject(string token)
        {
            var parameters = new RemoveDataObjectToKeyModel
            {
                ProductId = this.ProductId,
                Key       = this.Key,
            };

            var result = Data.RemoveDataObject(token, parameters);

            if (result != null && result.Result == ResultType.Success)
            {
                return(true);
            }
            return(false);
        }
コード例 #2
0
        /// <summary>
        /// This method will remove an existing data object.
        /// </summary>
        /// <param name="token">The access token. Read more at https://app.cryptolens.io/docs/api/v3/Auth </param>
        /// <remarks>Note: for more details, please see
        /// <a href="https://app.cryptolens.io/docs/api/v3/IncrementIntValue">https://app.cryptolens.io/docs/api/v3/IncrementIntValue</a> <br/>
        /// </remarks>
        /// <returns>Returns true if successful or false otherwise.</returns>
        public bool RemoveDataObject(string token, int dataObjectId)
        {
            var parameters = new RemoveDataObjectToKeyModel
            {
                ProductId = this.ProductId,
                Key       = this.Key,
                Id        = dataObjectId
            };

            var result = Data.RemoveDataObject(token, parameters);

            if (result != null && result.Result == ResultType.Success)
            {
                DataObjects.Remove(DataObjects.FirstOrDefault(x => x.Id == dataObjectId));
                return(true);
            }
            return(false);
        }
コード例 #3
0
 /// <summary>
 /// This method will remove an existing data object.
 /// </summary>
 /// <param name="token">The access token. Read more at https://app.cryptolens.io/docs/api/v3/Auth </param>
 /// <param name="parameters">The parameters that the method needs</param>
 /// <remarks>Note: for more details, please see
 /// <a href="https://app.cryptolens.io/docs/api/v3/RemoveDataObject">https://app.cryptolens.io/docs/api/v3/RemoveDataObject</a> <br/>
 /// </remarks>
 /// <returns>Returns <see cref="ListOfDataObjectsResult"/> or null.</returns>
 public static BasicResult RemoveDataObject(string token, RemoveDataObjectToKeyModel parameters)
 {
     return(HelperMethods.SendRequestToWebAPI3 <BasicResult>(parameters, "/data/removedataobjecttokey/", token));
 }