示例#1
0
 public MarkupBlock(
     BlockType blockType,
     IParentChunkGenerator chunkGenerator,
     IEnumerable <SyntaxTreeNode> children)
     : base(blockType, children, chunkGenerator)
 {
 }
示例#2
0
 public MarkupBlock(
     BlockKindInternal BlockKind,
     IParentChunkGenerator chunkGenerator,
     IReadOnlyList <SyntaxTreeNode> children)
     : base(BlockKind, children, chunkGenerator)
 {
 }
示例#3
0
 public MarkupBlock(
     BlockType blockType,
     IParentChunkGenerator chunkGenerator,
     IReadOnlyList <SyntaxTreeNode> children)
     : base(blockType, children, chunkGenerator)
 {
 }
示例#4
0
        public void Equals_False_WhenExpected(IParentChunkGenerator leftObject, object rightObject)
        {
            // Arrange & Act
            var result = leftObject.Equals(rightObject);

            // Assert
            Assert.False(result);
        }
示例#5
0
        public void Equals_True_WhenExpected(RazorCommentChunkGenerator leftObject, IParentChunkGenerator rightObject)
        {
            // Arrange & Act
            var result = leftObject.Equals(rightObject);

            // Assert
            Assert.True(result);
        }
示例#6
0
        public void Equals_False_WhenExpected(IParentChunkGenerator leftObject, object rightObject)
        {
            // Arrange & Act
            var result = leftObject.Equals(rightObject);

            // Assert
            Assert.False(result);
        }
示例#7
0
        public void Equals_True_WhenExpected(RazorCommentChunkGenerator leftObject, IParentChunkGenerator rightObject)
        {
            // Arrange & Act
            var result = leftObject.Equals(rightObject);

            // Assert
            Assert.True(result);
        }
示例#8
0
        public void GetHashCode_ReturnsSameValue_WhenEqual(
            RazorCommentChunkGenerator leftObject,
            IParentChunkGenerator rightObject)
        {
            // Arrange & Act
            var leftResult  = leftObject.GetHashCode();
            var rightResult = rightObject.GetHashCode();

            // Assert
            Assert.Equal(leftResult, rightResult);
        }
        public void GetHashCode_ReturnsSameValue_WhenEqual(
            RazorCommentChunkGenerator leftObject,
            IParentChunkGenerator rightObject)
        {
            // Arrange & Act
            var leftResult = leftObject.GetHashCode();
            var rightResult = rightObject.GetHashCode();

            // Assert
            Assert.Equal(leftResult, rightResult);
        }
示例#10
0
        protected Block(BlockType?type, IEnumerable <SyntaxTreeNode> contents, IParentChunkGenerator generator)
        {
            if (type == null)
            {
                throw new InvalidOperationException(RazorResources.Block_Type_Not_Specified);
            }

            Type           = type.Value;
            Children       = contents;
            ChunkGenerator = generator;

            foreach (SyntaxTreeNode node in Children)
            {
                node.Parent = this;
            }
        }
示例#11
0
文件: Block.cs 项目: jgglg/Razor
        protected Block(BlockType? type, IEnumerable<SyntaxTreeNode> contents, IParentChunkGenerator generator)
        {
            if (type == null)
            {
                throw new InvalidOperationException(RazorResources.Block_Type_Not_Specified);
            }

            Type = type.Value;
            Children = contents;
            ChunkGenerator = generator;

            foreach (SyntaxTreeNode node in Children)
            {
                node.Parent = this;
            }
        }
示例#12
0
        protected Block(BlockKindInternal?type, IReadOnlyList <SyntaxTreeNode> children, IParentChunkGenerator generator)
        {
            if (type == null)
            {
                throw new InvalidOperationException(Resources.Block_Type_Not_Specified);
            }

            Type           = type.Value;
            Children       = children;
            ChunkGenerator = generator;

            // Perf: Avoid allocating an enumerator.
            for (var i = 0; i < Children.Count; i++)
            {
                Children[i].Parent = this;
            }
        }
示例#13
0
        protected Block(BlockType? type, IReadOnlyList<SyntaxTreeNode> contents, IParentChunkGenerator generator)
        {
            if (type == null)
            {
                throw new InvalidOperationException(RazorResources.Block_Type_Not_Specified);
            }

            Type = type.Value;
            Children = contents;
            ChunkGenerator = generator;

            // Perf: Avoid allocating an enumerator.
            for (var i = 0; i < Children.Count; i++)
            {
                Children[i].Parent = this;
            }
        }
示例#14
0
 public DirectiveBlock(IParentChunkGenerator chunkGenerator, IReadOnlyList <SyntaxTreeNode> children)
     : base(ThisBlockKind, children, chunkGenerator)
 {
 }
示例#15
0
 public ExpressionBlock(IParentChunkGenerator chunkGenerator, params SyntaxTreeNode[] children)
     : this(chunkGenerator, (IEnumerable <SyntaxTreeNode>)children)
 {
 }
示例#16
0
 public ExpressionBlock(IParentChunkGenerator chunkGenerator, IEnumerable <SyntaxTreeNode> children)
     : base(ThisBlockType, children, chunkGenerator)
 {
 }
示例#17
0
 public DirectiveBlock(IParentChunkGenerator chunkGenerator, params SyntaxTreeNode[] children)
     : this(chunkGenerator, (IEnumerable <SyntaxTreeNode>)children)
 {
 }
示例#18
0
 public DirectiveBlock(IParentChunkGenerator chunkGenerator, IEnumerable <SyntaxTreeNode> children)
     : base(ThisBlockType, children, chunkGenerator)
 {
 }
示例#19
0
 public MarkupBlock(IParentChunkGenerator chunkGenerator, IEnumerable <SyntaxTreeNode> children)
     : this(ThisBlockType, chunkGenerator, children)
 {
 }
示例#20
0
文件: BlockTypes.cs 项目: jgglg/Razor
 public DirectiveBlock(IParentChunkGenerator chunkGenerator, IEnumerable<SyntaxTreeNode> children)
     : base(ThisBlockType, children, chunkGenerator)
 {
 }
示例#21
0
 // A Test constructor
 internal Block(BlockType type, IReadOnlyList <SyntaxTreeNode> contents, IParentChunkGenerator generator)
 {
     Type           = type;
     ChunkGenerator = generator;
     Children       = contents;
 }
示例#22
0
 // A Test constructor
 internal Block(BlockType type, IEnumerable <SyntaxTreeNode> contents, IParentChunkGenerator generator)
 {
     Type           = type;
     ChunkGenerator = generator;
     Children       = contents;
 }
示例#23
0
文件: BlockTypes.cs 项目: jgglg/Razor
 public MarkupBlock(
     BlockType blockType,
     IParentChunkGenerator chunkGenerator,
     IEnumerable<SyntaxTreeNode> children)
     : base(blockType, children, chunkGenerator)
 {
 }
示例#24
0
 public ExpressionBlock(IParentChunkGenerator chunkGenerator, params SyntaxTreeNode[] children)
     : this(chunkGenerator, (IReadOnlyList <SyntaxTreeNode>)children)
 {
 }
示例#25
0
 public MarkupBlock(IParentChunkGenerator chunkGenerator, IReadOnlyList <SyntaxTreeNode> children)
     : this(ThisBlockType, chunkGenerator, children)
 {
 }
示例#26
0
文件: BlockTypes.cs 项目: jgglg/Razor
 public DirectiveBlock(IParentChunkGenerator chunkGenerator, params SyntaxTreeNode[] children)
     : this(chunkGenerator, (IEnumerable<SyntaxTreeNode>)children)
 {
 }
示例#27
0
 public virtual void Reset()
 {
     Type = null;
     Children = new List<SyntaxTreeNode>();
     ChunkGenerator = ParentChunkGenerator.Null;
 }
示例#28
0
文件: Block.cs 项目: jgglg/Razor
 // A Test constructor
 internal Block(BlockType type, IEnumerable<SyntaxTreeNode> contents, IParentChunkGenerator generator)
 {
     Type = type;
     ChunkGenerator = generator;
     Children = contents;
 }
示例#29
0
文件: BlockTypes.cs 项目: jgglg/Razor
 public ExpressionBlock(IParentChunkGenerator chunkGenerator, IEnumerable<SyntaxTreeNode> children)
     : base(ThisBlockType, children, chunkGenerator)
 {
 }
示例#30
0
文件: BlockTypes.cs 项目: jgglg/Razor
 public MarkupBlock(IParentChunkGenerator chunkGenerator, IEnumerable<SyntaxTreeNode> children)
     : this(ThisBlockType, chunkGenerator, children)
 {
 }
示例#31
0
 public ExpressionBlock(IParentChunkGenerator chunkGenerator, IReadOnlyList <SyntaxTreeNode> children)
     : base(ThisBlockType, children, chunkGenerator)
 {
 }
示例#32
0
文件: BlockTypes.cs 项目: jgglg/Razor
 public ExpressionBlock(IParentChunkGenerator chunkGenerator, params SyntaxTreeNode[] children)
     : this(chunkGenerator, (IEnumerable<SyntaxTreeNode>)children)
 {
 }
示例#33
0
 public virtual void Reset()
 {
     Type           = null;
     Children       = new List <SyntaxTreeNode>();
     ChunkGenerator = ParentChunkGenerator.Null;
 }
示例#34
0
 // A Test constructor
 internal Block(BlockType type, IReadOnlyList<SyntaxTreeNode> contents, IParentChunkGenerator generator)
 {
     Type = type;
     ChunkGenerator = generator;
     Children = contents;
 }