public override void Init(TagHelperContext tagContext) { if (tagContext.Items.ContainsKey(typeof(NccRepeaterTagContext))) { _nccTagContext = (NccRepeaterTagContext)tagContext.Items[typeof(NccRepeaterTagContext)]; } else { throw new Exception("RepeaterNccTagContext was lost between tags..."); } }
public override void Init(TagHelperContext tagContext) { _nccTagContext = new NccRepeaterTagContext(); tagContext.Items.Add(typeof(NccRepeaterTagContext), _nccTagContext); }