private static esriLicenseProductCode[] GetLicenseProductCodes( EsriProduct licenseProduct, EsriProductFallback fallback) { var productCodes = new List <esriLicenseProductCode> { GetLicenseProductCode(licenseProduct) }; if (fallback == EsriProductFallback.TryHigherProduct) { switch (licenseProduct) { case EsriProduct.ArcView: productCodes.Add(GetLicenseProductCode(EsriProduct.ArcEditor)); productCodes.Add(GetLicenseProductCode(EsriProduct.ArcInfo)); break; case EsriProduct.ArcEditor: productCodes.Add(GetLicenseProductCode(EsriProduct.ArcInfo)); break; } } return(productCodes.ToArray()); }
private void Checkout(EsriProduct product, EsriProductFallback fallback, params esriLicenseExtensionCode[] esriExtensionCodes) { esriLicenseProductCode[] productCodesArray = GetLicenseProductCodes(product, fallback); if (!_initializer.InitializeApplication(productCodesArray, esriExtensionCodes)) { throw new InvalidOperationException( $"Cannot check out license ({product}, {StringUtils.Concatenate(esriExtensionCodes, ", ")})"); } }
public void Checkout(EsriProduct product, EsriProductFallback fallback, params EsriExtension[] extensions) { Checkout(product, fallback, GetExtensionCodes(extensions)); }