24 lines
647 B
C#
24 lines
647 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.
|
|
|
|
namespace Microsoft.AspNetCore.Mvc.ViewFeatures.Internal
|
|
{
|
|
public class ViewBufferPage
|
|
{
|
|
public ViewBufferPage(ViewBufferValue[] buffer)
|
|
{
|
|
Buffer = buffer;
|
|
}
|
|
|
|
public ViewBufferValue[] Buffer { get; }
|
|
|
|
public int Capacity => Buffer.Length;
|
|
|
|
public int Count { get; set; }
|
|
|
|
public bool IsFull => Count == Capacity;
|
|
|
|
public void Append(ViewBufferValue value) => Buffer[Count++] = value;
|
|
}
|
|
}
|