User 0ccd249401
13-01-2013 11:17:28
Hello!
I get an error when trying to get IUPAC name using code (C#):
someJChemMolecule.Calculations.IUPACName
Exception has line with such info of inner exception:
"Message=The current type, ChemAxon.NET.Base.Licensing.ILicensedProduct, is an interface and cannot be constructed. Are you missing a type mapping?".
Exception is in attachment.
Thanks!
ChemAxon bd13b5bd77
13-01-2013 12:21:16
I think you need to inherit from
public sealed class JChemYOURLicensedProduct : AbstractLicensedProduct<JChemYOURLicenseChecker> {
public JChemYOURLicensedProduct()
: base()
{
}
public override string Name
{
get { return chemaxon.license.LicenseHandler.XXXX; }
}
public override string LicenseEnvironment
{
get { return "WHATEVER NAME"; }
}
}
or simply implement: ILicensedProduct
AND finally you need to register it as :
UnityContainerServiceRegistryLocator.Instance.RegisterTypeAsSingleton<ILicensedProduct,
User 0ccd249401
13-01-2013 18:05:54
Thanks!
But again it was impossible to me to find this way by myself.
All works fine after implementing ILicensedProduct and registering my working class in ServiceRegistryLocator. But when I got an exception with inner exception I wrote, I realy thought that it's problem in ChemAxon lib, where developers didn't implement ILicensedProduct in some license check method.
Thanks again!