简体   繁体   中英

Updating ImpromptuInterface from 6.2.2 to 7.0.1 (latest version)

My project currently references ImpromptuInterface 6.2.2 and it works great. I am in the process of updating all my nuget packages to latest version.

When updating ImpromptuInterface from 6.2.2 to 7.0.1 I got 2 errors:

  • 'Impromptu' does not contain a definition for 'InvokeGet'
  • 'Impromptu' does not contain a definition for 'GetMemberNames'

My code:

if (Impromptu.GetMemberNames(sourceObject).Any(x => x == newPropertyPath))
{
    var newSourceObject = Impromptu.InvokeGet(sourceObject, newPropertyPath);
}

It seems these methods does no longer exists. Any help is much appreciated.

It seems the methods in ImpromptuInterface that you are using have been moved to a different library,Dynamitey . ImpromptuInterface depends on Dynamitey, so Dynamitey should have been added to your project as part of the ImpromptuInterface upgrade.

Try replacing ImpromptuInterface.InvokeGet with Dynamic.InvokeGet and ImpromptuInterface.GetMemberNames with Dynamic.GetMemberNames . You might need to add a line using Dynamitey; as well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM