aspnetcore/src/Microsoft.AspNetCore.Razor..../Intermediate/UsingDirectiveIntermediateN...

32 lines
952 B
C#

// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
namespace Microsoft.AspNetCore.Razor.Language.Intermediate
{
public sealed class UsingDirectiveIntermediateNode : IntermediateNode
{
public override IntermediateNodeCollection Children => IntermediateNodeCollection.ReadOnly;
public string Content { get; set; }
public override void Accept(IntermediateNodeVisitor visitor)
{
if (visitor == null)
{
throw new ArgumentNullException(nameof(visitor));
}
visitor.VisitUsingDirective(this);
}
public override void FormatNode(IntermediateNodeFormatter formatter)
{
formatter.WriteContent(Content);
formatter.WriteProperty(nameof(Content), Content);
}
}
}