namespace OwinFramework.InterfacesV1.Middleware { /// /// Defines the functionallity exposed by the session feature that /// can be used by other middleware compoennts /// public interface ISession { /// /// Returns true if a sesion was established for the current request. If this property /// is false then reading session values is not reliable and updating session values /// will have no effect /// bool HasSession { get; } /// /// Gets a strongly typed value from the user's session /// T Get(string name); /// /// Updates the user's session with a strongly typed value /// void Set(string name, T value); /// /// For the situations where strong typing is not possible /// object this[string name] { get; set; } } }