mirror of
				https://github.com/art-ist/mustache-sharp.git
				synced 2024-06-16 21:05:32 +00:00 
			
		
		
		
	I needed to make it easier to handle scopes and define custom tags, including context-sensitive tags.
		
			
				
	
	
		
			37 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
using System;
 | 
						|
using System.Collections.Generic;
 | 
						|
 | 
						|
namespace mustache
 | 
						|
{
 | 
						|
    /// <summary>
 | 
						|
    /// Defines a pseudo tag that wraps the entire content of a format string.
 | 
						|
    /// </summary>
 | 
						|
    internal sealed class MasterTagDefinition : ContentTagDefinition
 | 
						|
    {
 | 
						|
        /// <summary>
 | 
						|
        /// Initializes a new instance of a MasterTagDefinition.
 | 
						|
        /// </summary>
 | 
						|
        public MasterTagDefinition()
 | 
						|
            : base(String.Empty, true)
 | 
						|
        {
 | 
						|
        }
 | 
						|
 | 
						|
        /// <summary>
 | 
						|
        /// Gets whether the tag only exists within the scope of its parent.
 | 
						|
        /// </summary>
 | 
						|
        protected override bool GetIsContextSensitive()
 | 
						|
        {
 | 
						|
            return true;
 | 
						|
        }
 | 
						|
 | 
						|
        /// <summary>
 | 
						|
        /// Gets the name of the tags that indicate that the tag's context is closed.
 | 
						|
        /// </summary>
 | 
						|
        /// <returns>The tag names.</returns>
 | 
						|
        protected override IEnumerable<string> GetClosingTags()
 | 
						|
        {
 | 
						|
            return new string[] { };
 | 
						|
        }
 | 
						|
    }
 | 
						|
}
 |