/// <summary> /// Handles the filters for closing html tags /// </summary> private void CloseTag(FilterBuffer b, int i, FilterTags Filters) { i = b.SkipWhiteSpace(i, true); b.Write(i); b.Write(Filters.Content.HTML); b.Seek(i); }
/// <summary> /// Adds a filter to the unrendered chain of filters. /// </summary> /// <param name="key"></param> /// <param name="source"></param> private void AddFilter(string key, string source) { FilterTag Tag1 = new FilterTag(key, source); FilterTags Tag = (FilterTags)this[Tag1.Tag]; if (Tag != null) { Tag.Add(Tag1); } else { this[Tag1.Tag] = new FilterTags(Tag1); } }
/// <summary> /// Handles the filters for opening html tags /// </summary> private void OpenTag(FilterBuffer b, int i, int j, string tag, FilterTags Filters) { b.Write(i); if (Filters.Replace != null) { tag = Filters.Replace.HTML; } foreach (FilterTag F in Filters.Attributes) { F.Substitute(ref tag); } b.Write(tag); if (Filters.Content != null) { b.Write(Filters.Content.HTML); } b.Seek(j + 1); }
/// <summary> /// Adds the Filter, initializes the controls in the filter, and adds them /// to the child controls. /// </summary> private void AddFilter(FilterTags Filter) { FilterTags F = Filter.Clone(Page); // In case the filter itself is an instance of Template.UserControl if (F.CheckMatch(Owner) && F.Empty) { return; } ((!Filter.IsBackup)?FwdList:BkupList).Add(F); if (F.Content != null) { Controls.Add(F.Content.Control); } if (F.Replace != null) { Controls.Add(F.Replace.Control); } }
/// <summary> /// ICloneable interface /// </summary> /// <returns>Clone of object</returns> public object Clone() { FilterTags result = new FilterTags(); if (Content != null) { result.Add(Content.Clone()); } if (Replace != null) { result.Add(Replace.Clone()); } foreach (FilterTag i in Attributes) { result.Add(i.Clone()); } result.Multiple = Multiple; result.IsBackup = IsBackup; result.Tag = Tag; return(result); }