// Copyright (c) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information. using System.Diagnostics.CodeAnalysis; using System.Web.WebPages.Instrumentation; namespace System.Web.WebPages { public class AttributeValue { public AttributeValue(PositionTagged prefix, PositionTagged value, bool literal) { Prefix = prefix; Value = value; Literal = literal; } public PositionTagged Prefix { get; private set; } public PositionTagged Value { get; private set; } public bool Literal { get; private set; } [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures", Justification = "We are using tuples here to avoid dependencies from Razor to WebPages")] public static AttributeValue FromTuple(Tuple, Tuple, bool> value) { return new AttributeValue(value.Item1, value.Item2, value.Item3); } [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures", Justification = "We are using tuples here to avoid dependencies from Razor to WebPages")] public static AttributeValue FromTuple(Tuple, Tuple, bool> value) { return new AttributeValue(value.Item1, new PositionTagged(value.Item2.Item1, value.Item2.Item2), value.Item3); } [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures", Justification = "We are using tuples here to avoid dependencies from Razor to WebPages")] public static implicit operator AttributeValue(Tuple, Tuple, bool> value) { return FromTuple(value); } [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures", Justification = "We are using tuples here to avoid dependencies from Razor to WebPages")] public static implicit operator AttributeValue(Tuple, Tuple, bool> value) { return FromTuple(value); } } }