Click or drag to resize

SKMGetParameters Method

This method will take in a set of parameters (input parameters) and send them to the given action. You can find them here: http://docs.serialkeymanager.com/web-api/.

Namespace:  SKGL
Assembly:  SKM (in SKM.dll) Version: 4.0.2.6 (4.0.2.6)
Syntax
public static Dictionary<string, string> GetParameters(
	Dictionary<string, string> inputParameters,
	string typeOfAction,
	WebProxy proxy = null
)

Parameters

inputParameters
Type: System.Collections.GenericDictionaryString, String
A dictionary that contains data such as "uid", "pid", etc.
typeOfAction
Type: SystemString
A string that tells what to do, i.e. "validate", "activate" etc.
proxy (Optional)
Type: System.NetWebProxy
(Optional) The proxy settings.

Return Value

Type: DictionaryString, String
A dictionary of the JSON elements returned for that particular request.
Examples
If you would like to access a method in the Web API manually, please use GetParameters method. A list of them can be found at http://docs.serialkeymanager.com/web-api/.
C#
public void GetParamtersExample()
{
   var input = new System.Collections.Generic.Dictionary<string, string >();
   input.Add("uid", "1");
   input.Add("pid", "1");
   input.Add("hsum", "11111");
   input.Add("sid", "ABCD-EFGHI-GKLMN-OPQRS");
   input.Add("sign","true");

   var result = SKGL.SKM.GetParameters(input, "Validate");

   var keyinfo = SKGL.SKM.GetKeyInformationFromParameters(result);

   if(result.ContainsKey("error") && result["error"] != "")
   {
       // if we are here, something went wrong.
   }
}
See Also