Sholo.Web.Security/Authentication/Device/Provider/CacheDeviceAuthenticationTicketProvider.cs
/// <summary>
/// Retrieves all DeviceAuthenticationTicket keys in the ticket store that have not already
/// expired.
/// </summary>
/// <returns>An enumerable collection of tickets</returns>
Retrieves all DeviceAuthenticationTicket keys in the ticket store that have not already
expired.
Retrieves all DeviceAuthenticationTicket keys in the ticket store that have not already expired .
public override IEnumerable<string> GetAllTicketKeys()
        {
            IDictionaryEnumerator enumerator = HttpContext.Current.Cache.GetEnumerator();
            while (enumerator.MoveNext())
            {
                string currentKey = enumerator.Entry.Key as string;
                if (currentKey != null && currentKey.StartsWith(DeviceTicketKeyPrefix))
                {
                    DeviceAuthenticationTicket currentAuthTicket = enumerator.Entry.Value as DeviceAuthenticationTicket;
                    if (currentAuthTicket != null)
                    {
                        yield return currentAuthTicket.Key;
                    }
                }
            }
        }
public override IEnumerable < string > GetAllTicketKeys ( ) { IDictionaryEnumerator enumerator = HttpContext . Current . Cache . GetEnumerator ( ) ; while ( enumerator . MoveNext ( ) ) { string currentKey = enumerator . Entry . Key as string ; if ( currentKey != null && currentKey . StartsWith ( DeviceTicketKeyPrefix ) ) { DeviceAuthenticationTicket currentAuthTicket = enumerator . Entry . Value as DeviceAuthenticationTicket ; if ( currentAuthTicket != null ) { yield return currentAuthTicket . Key ; } } } }
Retrieves all DeviceAuthenticationTicket keys in the ticket store that have not already
expired.
Retrieves all DeviceAuthenticationTicket keys in the ticket store that have not already expired .
An enumerable collection of tickets
An enumerable collection of tickets