using XF.Domain.Authentications;


namespace Hotline.Authentications
{
    public class SessionContextCreator
    {
        public static void CreateSessionContext(ISessionContextProvider sessionContextProvider, string source)
        {
            switch (source)
            {
                case "province":
                    sessionContextProvider.SetContext(ProvinceSessionContext.Key);
                    break;
                case "110":
                    sessionContextProvider.SetContext(Police110SessionContext.Key);
                    break;
                case "yb-enterprise":
                    sessionContextProvider.SetContext(YbEnterpriseSessionContext.Key);
                    break;
                case "zzpt":
                    sessionContextProvider.SetContext(ZzptSessionContext.Key);
                    break;
                default:
                    throw new ArgumentOutOfRangeException(nameof(source), source, null);
            }
        }
    }
}