I created a plugin to add a token to a rule. It broke under 10 and I don't understand why.
The basic structure of the token is this: there is an ITokenizedTemplatePrimitiveToken class that declares the token, and a ITokenRegistrar class that contains the RegisterTokens method, that accepts the ITokenizedTemplateTokenController and calls the Register method on it, with a new instance of the aforementioned class as its argument.
The error I am seeing is the iTokenRegistrar class is throwing an error when I try to enable the token, Object reference not set to an instance of an object. at (class name here)..ctor()
The resulting stack trace made little sense, except that something very strange is happening.
I tried to make it "future proof" and not use deprecated APIs, eg I think Evolution.Extensibility.Apis.Get<IUsers>().ContentTypeId is the correct way to get the ContentTypeId. Also as a constructor-less class I'm befuddled.
Any pointers on how this could have broken from 9->10? My original question on this is at https://community.telligent.com/community/10/f/ask-the-community/1146486/tokens-and-extending-rule-support