Codestellation.Ether.Templating.Razor.RenderContext.DefineSection C# (CSharp) Method

DefineSection() public method

public DefineSection ( string name, System.Action action ) : void
name string
action System.Action
return void
        public void DefineSection(string name, Action action)
        {
            if (string.IsNullOrWhiteSpace(name))
            {
                throw new ArgumentNullException("name", "Section name is required");
            }
            if (Sections.ContainsKey(name))
            {
                throw new ArgumentException(string.Format("Section '{0}' already defined", name), "name");
            }
            Sections.Add(name, action);
        }