Revoke key C#, TurboActivate.IsDateValid()

Hi guys , i have 2 questions, 1. how to revoke key using c#?2. how to check 1 year licence using TurboActivate.IsDateValid() ? i created updates_expires field

thanks

1. how to revoke key using c#?

From the web API. Specifically, download the Web API pack, then use the RevokePKey() function in LimeLM.cs.

2. how to check 1 year licence using TurboActivate.IsDateValid() ? i created updates_expires field

Read in the "update_expires" field like this:

string updateExpires = TurboActivate.GetFeatureValue("update_expires", null);

Then verify the date hasn't expired yet:

bool isDateValid = updateExpires != null && TurboActivate.IsDateValid(updateExpires, TurboActivate.TA_DateCheckFlags.TA_HAS_NOT_EXPIRED)(

I download web API. LimeLM.cs not include RevokePKey() function

Oh, we haven't released the version that contains that function. Just add this to the LimeLM.cs file:

        /// <summary>Revoke or unrevoke a product key.</summary>        /// <param name="pkey_id">The ID of the product key.</param>        /// <param name="revoke">Whether to revoke or unrevoke product keys.</param>        /// <returns>XML or JSON response from LimeLM.</returns>        public static string RevokePKey(string pkey_id, bool revoke = true)        {            List<KeyValuePair<string, object>> postData = new List<KeyValuePair<string, object>>                                          {                                              new KeyValuePair<string, object>("method", "limelm.pkey.revoke"),                                              new KeyValuePair<string, object>("pkey_id", pkey_id),                                              new KeyValuePair<string, object>("revoke", revoke ? "true" : "false")                                          };


            return PostRequest(postData);        }

LimeLM.APIKey = "key";

LimeLM.RevokePKey(TurboActivate.GetPKey(), true);

NOT WORKING

LimeLM.APIKey = "lime key";

LimeLM.RevokePKey(TurboActivate.GetPKey(), true);

NO ERROR . NOT WORKING , CAN NOT REVOKE KEY

Of course it's not working. TurboActivate.GetPKey() is not a function. GetPKeyID() is, and it returns an XML response. You actually have to parse the response to get the pkey ID. Also, you need to actually pass a product key to GetPKeyID().