Example #1
0
 static JsConfig()
 {
     //In-built default serialization, to Deserialize Color struct do:
     //JsConfig<System.Drawing.Color>.SerializeFn = c => c.ToString().Replace("Color ", "").Replace("[", "").Replace("]", "");
     //JsConfig<System.Drawing.Color>.DeSerializeFn = System.Drawing.Color.FromName;
     Reset();
     LicenseUtils.Init();
 }
Example #2
0
        internal void AssertValidUsage()
        {
            if (!IsUserType)
            {
                return;
            }

            LicenseUtils.AssertValidUsage(EnumLicenseFeature.Text, EnumQuotaType.Types, JsConfig.__uniqueTypesCount);
        }
        public static void RegisterLicenseFromFileIfExists(string filePath)
        {
            if (!filePath.FileExists())
            {
                return;
            }

            var licenseKeyText = filePath.ReadAllText();

            LicenseUtils.RegisterLicense(licenseKeyText);
        }
        public static void RegisterLicenseFromFile(string filePath)
        {
            if (!filePath.FileExists())
            {
                throw new LicenseException("License file does not exist: " + filePath).Trace();
            }

            var licenseKeyText = filePath.ReadAllText();

            LicenseUtils.RegisterLicense(licenseKeyText);
        }
 public static void RegisterLicense(string licenseKeyText)
 {
     LicenseUtils.RegisterLicense(licenseKeyText);
 }