System.ComponentModel.LicenseManager.LicenseInteropHelper.GetLicInfo C# (CSharp) Method

GetLicInfo() private method

private GetLicInfo ( RuntimeTypeHandle rth, int &pRuntimeKeyAvail, int &pLicVerified ) : void
rth System.RuntimeTypeHandle
pRuntimeKeyAvail int
pLicVerified int
return void
            private void GetLicInfo(RuntimeTypeHandle rth, ref int pRuntimeKeyAvail, ref int pLicVerified)
            {
                pRuntimeKeyAvail = 0;
                pLicVerified = 0;

                Type type = Type.GetTypeFromHandle(rth);
                License license;
                string licenseKey;

                if (_helperContext == null)
                {
                    _helperContext = new DesigntimeLicenseContext();
                }
                else
                {
                    _helperContext.savedLicenseKeys.Clear();
                }

                if (LicenseManager.ValidateInternalRecursive(_helperContext, type, null, false, out license, out licenseKey))
                {
                    if (_helperContext.savedLicenseKeys.Contains(type.AssemblyQualifiedName))
                    {
                        pRuntimeKeyAvail = 1;
                    }

                    if (license != null)
                    {
                        license.Dispose();
                        license = null;

                        pLicVerified = 1;
                    }
                }
            }