I'm converting a client website from Kentico 7.0.84 to Kentico 8. They have a lot of custom code on the website and I ran the CodeUpgrade utility to resolve most of the issues but still have quite a few that I have been fixing manually. I've run into a problem with MacroResolver and how to set parameters on it.
I've changed the object from ContextResolver to MacroResolver and figured out that EncodeResolvedValues is now under Settings.EncodeResolvedValues. I can't figure out how to set the SourceParameters though. I just get MacroResolver does not contain a definition for SourceParameters.
In v7:
string[,] replacements = new string[5, 2];
replacements[0, 0] = "firstname";
replacements[0, 1] = firstName;
replacements[1, 0] = "lastname";
replacements[1, 1] = lastName;
replacements[2, 0] = "email";
replacements[2, 1] = email;
replacements[3, 0] = "phone";
replacements[3, 1] = phone;
replacements[4, 0] = "attendeeGUID";
replacements[4, 1] = attendeeGUID;
ContextResolver resolver = CMSContext.CurrentResolver;
resolver.SourceParameters = replacements;
resolver.EncodeResolvedValues = true;
In v8:
string[,] replacements = new string[5, 2];
replacements[0, 0] = "firstname";
replacements[0, 1] = firstName;
replacements[1, 0] = "lastname";
replacements[1, 1] = lastName;
replacements[2, 0] = "email";
replacements[2, 1] = email;
replacements[3, 0] = "phone";
replacements[3, 1] = phone;
replacements[4, 0] = "attendeeGUID";
replacements[4, 1] = attendeeGUID;
MacroResolver resolver = MacroContext.CurrentResolver;
resolver.SourceParameters = replacements; //Doesn't exist on MacroResolver.
resolver.Settings.EncodeResolvedValues = true;
Any ideas on how I set source parameters? Thanks.