namespace AIStudio.Tools.AssistantSessions;
///
/// Provides a typed value stored in an assistant session snapshot.
///
public interface IAssistantSessionSnapshotField
{
///
/// Gets the type used when the value was captured.
///
Type ValueType { get; }
///
/// Tries to read the captured value as the requested type.
///
/// The requested value type.
/// The typed value when reading succeeds.
/// true when the captured value matches ; otherwise, false.
bool TryRead(out T? value);
///
/// Tells whether another field provably holds the same value as this one.
///
///
/// The same means: the same captured type, and the same reference, an equal string or value of a
/// value type, or a collection whose items are the same by this rule in turn. Everything else counts
/// as changed. A field wrongly taken for changed is only restored once more, while a field wrongly
/// taken for the same would lose an update.
///
/// The field to compare with.
/// true when both fields provably hold the same value; otherwise, false.
bool HasSameValueAs(IAssistantSessionSnapshotField other);
}