• ArmDot Home
  • Documentation
  • Tutorial
  • API
  • Download
Show / Hide Table of Contents
  • Getting Started
  • Tutorial
  • MSBuild Obfuscation Task
  • Embedded Files
    • Embedded Files
    • Predefined Directories
  • Key Generators
    • Key Generator for PHP
    • Key Generator for C/C++
  • Command Line Tools
    • ArmDotConsole.exe
  • API
    • ArmDot.Client
      • Api
      • Api.Hardware
      • Api.LicenseKeyState
      • EmbedFileAttribute
      • HideStringsAttribute
      • ObfuscateControlFlowAttribute
      • ObfuscateNamesAttribute
      • ObfuscateNamespacesAttribute
      • ProtectEmbeddedResourcesAttribute
      • VirtualizeCodeAttribute
    • ArmDot.Engine.MSBuildTasks
      • ObfuscateTask
  • Obfuscation Attributes
  • Stack Trace Deobfuscation
  • ArmDot Warnings
    • How to disable a warning?
    • Warning ARMDOT0001
    • Warning ARMDOT0002
    • Warning ARMDOT0003
    • Warning ARMDOT0004
    • Warning ARMDOT0005
    • Warning ARMDOT0006
    • Warning ARMDOT0007
    • Warning ARMDOT0008
  • Glossary
    • Hardware Id
  • License

Class Api

Use methods of this class to set and check the license key state, and to get current machine's hardware id.

Inheritance
System.Object
Api
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: ArmDot.Client
Assembly: ArmDot.Client.dll
Syntax
public static class Api

Methods

GetCurrentMachineHardwareId(Byte)

Generates a hardware id based on the current machine's hardware.

Declaration
public static string GetCurrentMachineHardwareId(byte hardware)
Parameters
Type Name Description
System.Byte hardware

Use it to specify the hardware combination you want to use to generate a hardware id. One or several of the ArmDot.Client.Api.Hardware values are possible.

Returns
Type Description
System.String

The current machine's hardware id.

GetExpirationDate()

A license key becomes expired and ArmDot.Client.Api.GetLicenseState returns LicenseKeyState.Expired if a current date is more than an expiraton date.

ArmDot.Client.Api.PutKey must have been already called.

Declaration
public static DateTime? GetExpirationDate()
Returns
Type Description
System.Nullable<System.DateTime>

An expiration date stored in a current license key.

GetLicenseState()

Returns state of a license.

Declaration
public static int GetLicenseState()
Returns
Type Description
System.Int32

For possible return values, refer to ArmDot.Client.Api.LicenseKeyState.

GetMaximumBuildDate()

Retrieves a maximum build date from a current license key.

Returned DateTime? has a value if a current license key contains maximum build date.

A license key becomes expired and ArmDot.Client.Api.GetLicenseState returns LicenseKeyState.MaximumBuildDateExpired for binaries, built after maximum build date.

ArmDot.Client.Api.PutKey must have been already called.

Declaration
public static DateTime? GetMaximumBuildDate()
Returns
Type Description
System.Nullable<System.DateTime>

A maximum build date stored in a current license key.

GetUserData()

Retrieves a user data from the current license key. ArmDot.Client.Api.PutKey must have been already called.

Declaration
public static byte[] GetUserData()
Returns
Type Description
System.Byte[]

A user data stored in a current license key.

GetUserEMail()

Retrieves a user e-mail from the current license key. ArmDot.Client.Api.PutKey must have been already called.

Declaration
public static string GetUserEMail()
Returns
Type Description
System.String

A user e-mail stored in a current license key.

GetUserName()

Retrieves a user name from a current license key. ArmDot.Client.Api.PutKey must have been already called.

Declaration
public static string GetUserName()
Returns
Type Description
System.String

A user name stored in a current license key.

IsCodeProtected()

Use IsCodeProtected to check whether the code of a method was processed by ArmDot, or not.

Declaration
public static bool IsCodeProtected()
Returns
Type Description
System.Boolean

If IsCodeProtected is called from a method that was not processed by ArmDot, IsCodeProtected returns false.

If IsCodeProtected is called from a method that was processed by ArmDot, IsCodeProtected returns true.

PutKey(String)

Puts a license key.

Declaration
public static void PutKey(string key)
Parameters
Type Name Description
System.String key
Back to top Copyright © 2015-2017 Microsoft
Generated by DocFX