How can it be determined in a C# script whether a passed in control is cloneable or not? I don't see any properties that would indicate this, and the documentation seems to be lacking in this regard.
I have a C# script method that is receiving a container web control as a parameter. The method iterates through the control's child web controls to set next keys for those controls having the UseKeys property set to true. I want to prevent raising errors for those child controls that are not cloneable... something like the following:
// pseudocode, since IsCloneable is not a real property
I have tried the following check, but it doesn't return an expected result.
if (ctrl is ICloneable)
// returns false even for controls using keys
if (ctrl.GetType() is ICloneable)
// returns true even for controls NOT using keys
I am using Visual Studio 2015, with the Pega plugin v.8.0.1081.