internal object PublishClone(AutomaticSubtotalContext context, bool isSubtotalMember) { Visibility visibility = null; if (isSubtotalMember) { visibility = new Visibility(); visibility.m_hidden = ExpressionInfo.CreateConstExpression(value: true); } else { visibility = (Visibility)MemberwiseClone(); if (m_hidden != null) { visibility.m_hidden = (ExpressionInfo)m_hidden.PublishClone(context); } if (m_toggle != null) { context.AddVisibilityWithToggleToUpdate(visibility); visibility.m_toggle = (string)m_toggle.Clone(); } } visibility.m_isClone = true; return(visibility); }