internal void SetAuthenticationResultForBusiness(AuthenticationResult result)
		{
			if (result == null)
			{
				return;
			}

			ENAuthCacheEntry entry = ENAuthCacheEntry.EntryWithResult(result);
			BusinessCache = entry;
		}
			internal static ENAuthCacheEntry EntryWithResult(AuthenticationResult result)
			{
				if (result == null)
				{
					return null;
				}
				ENAuthCacheEntry entry = new ENAuthCacheEntry();
				entry.AuthResult = result;
				entry.CachedDate = DateTime.Now;
				return entry;
			}
        internal void SetAuthenticationResultForBusiness(AuthenticationResult result)
        {
            if (result == null)
            {
                return;
            }

            ENAuthCacheEntry entry = ENAuthCacheEntry.EntryWithResult(result);

            BusinessCache = entry;
        }
        internal void SetAuthenticationResultForLinkedNotebook(AuthenticationResult result, string guid)
        {
            if (result == null)
            {
                return;
            }

            ENAuthCacheEntry entry = ENAuthCacheEntry.EntryWithResult(result);

            LinkedCache[guid] = entry;
        }
            internal static ENAuthCacheEntry EntryWithResult(AuthenticationResult result)
            {
                if (result == null)
                {
                    return(null);
                }
                ENAuthCacheEntry entry = new ENAuthCacheEntry();

                entry.AuthResult = result;
                entry.CachedDate = DateTime.Now;
                return(entry);
            }
        internal AuthenticationResult AuthenticationResultForBusiness()
        {
            AuthenticationResult result = null;
            ENAuthCacheEntry     entry  = BusinessCache;

            if (entry != null && !entry.IsValid())
            {
                // This auth result has already expired, so evict it.
                BusinessCache = null;
                entry         = null;
            }
            if (entry != null)
            {
                result = entry.AuthResult;
            }
            return(result);
        }
        internal AuthenticationResult AuthenticationResultForLinkedNotebook(string guid)
        {
            AuthenticationResult result = null;
            ENAuthCacheEntry     entry  = null;

            LinkedCache.TryGetValue(guid, out entry);
            if (entry != null && !entry.IsValid())
            {
                // This auth result has already expired, so evict it.
                LinkedCache.Remove(guid);
                entry = null;
            }
            else if (entry != null)
            {
                result = entry.AuthResult;
            }
            return(result);
        }
		internal AuthenticationResult AuthenticationResultForBusiness()
		{
			AuthenticationResult result = null;
			ENAuthCacheEntry entry = BusinessCache;
			if (entry != null && !entry.IsValid())
			{
				// This auth result has already expired, so evict it.
				BusinessCache = null;
				entry = null;
			}
			if (entry != null)
			{
				result = entry.AuthResult;
			}
			return result;
		}