public static bool GetIsExposingVariable(this CustomVariable customVariable, IElement container) { bool isExposedExistingMember = false; if (container is EntitySave) { isExposedExistingMember = ExposedVariableManager.IsMemberDefinedByEntity(customVariable.Name, container as EntitySave); } else if (container is ScreenSave) { isExposedExistingMember = customVariable.Name == "CurrentState"; } return(isExposedExistingMember); }