/// <summary> /// Sets the standalone section. /// </summary> /// <typeparam name="T"></typeparam> /// <param name="t">The t</param> void SetStandAloneSection <T>(T t) where T : GcSection { this.sections.RemoveSections <T>(); if (t is GcMarginSection) { GcMarginSection section = t as GcMarginSection; section.Report = this; } if (t != null) { this.sections.Add(t); } }
/// <summary> /// Gets the standalone section. /// </summary> /// <typeparam name="T"></typeparam> /// <returns></returns> T GetStandAloneSection <T>() where T : GcSection { List <T> sections = this.sections.GetSections <T>(); T local = (sections.Count <= 0) ? default(T) : sections[0]; if ((local != null) && (local is GcMarginSection)) { GcMarginSection section = local as GcMarginSection; if (section.Report != this) { section.Report = this; } } return(local); }