//------------------------------------------------------------------------------ // // Copyright (c) Microsoft Corporation. All rights reserved. // //------------------------------------------------------------------------------ namespace System.Web.UI { using System; /* * The StateItem class * by the StateBag class. * The StateItem has an object value, a dirty flag. */ /// /// Represents an item that is saved in the class when view state /// information is persisted between Web requests. /// public sealed class StateItem { private object value; private bool isDirty; /* * Constructs a StateItem with an initial value. */ internal StateItem(object initialValue) { value = initialValue; isDirty = false; } /* * Property to indicate StateItem has been modified. */ /// /// Indicates whether the object has been modified. /// public bool IsDirty { get { return isDirty; } set { isDirty = value; } } /* * Property to access the StateItem value. */ /// /// Indicates the value of the item that is stored in the /// object. /// public object Value { get { return value; } set { this.value = value; } } } }