Forum Discussion

sbala's avatar
sbala
Creator I
6 years ago

Obsolete method warning for innovator 11.0 SP9

Am using a C# Method which is used to fetch the related parts of a CAD. On Syntax check i get an Obsolete method warning as shown below,

Line number 332, Warning Number: CS0618, 'Aras.Server.Core.ICachePublicAPI.GetItemTypeFromCache(ref string, ref string)' is obsolete: 'Obsolete starting from 9.3. Do not use in server core.'

But this method was working fine before.

Due to this warning the method is not working as expected. Am very new to PLM Aaras programming. I couldn't understand what is happening and how to resolve. Is there any method to replace the Obselete method or how? Any quick response would be more appreciated. 

Thanks,

Bala.

6 Replies

  • Hi Bala

    Try using Utils.CCO.Cache.GetItemTypeFromCache(ref string, ref string) and let me know if it works

    • sbala's avatar
      sbala
      Creator I

      Hi Gopi

      Thanks for your quick response.

      Actually the error is thrown when I put a break point in the method and check for syntax. Else there is no such warning and the method executes without throwing any errors.

      And I pass string only. please ref the image below,

      Thanks.

      • christopher_gillis's avatar
        christopher_gillis
        Community Manager

        Hi sbala,

        I tried looking for these snippets of code in a local database and found it was used in some standard methods like PE_GetRelatedParts. In general, the Utils and CCO classes are not needed and are typically only used by experienced Aras developers. Where possible, it's also best not modify standard methods like these as making changes to them can have unintended results.

        Could you clarify what you're use case is? There might be a better alternative approach you could take instead of modifying this method.

        Chris


        Christopher Gillis

        Aras Labs Software Engineer