Esempio n. 1
0
        public static COREobject Create(string userName, int appId)
        {
            COREobject core = CreateINIT();

            core.Application = core.Context.Applications.Find(appId);
            core.User        = Persona.Persona.GetUser(userName, core.Application.IsAllowedGuests);
            return(core);
        }
Esempio n. 2
0
        public static COREobject Create(string userName, string appName)
        {
            COREobject core = CreateINIT();

            core.Application = core.Context.Applications.SingleOrDefault(a => a.Name == appName);
            core.User        = Persona.Persona.GetUser(userName, core.Application?.IsAllowedGuests ?? false);
            return(core);
        }
Esempio n. 3
0
        public Message(COREobject core)
        {
            Errors   = new List <string>();
            Warnings = new List <string>();
            Info     = new List <string>();
            Success  = new List <string>();

            _core = core;
            _type = null;
        }
Esempio n. 4
0
        private static COREobject CreateINIT(int?rHash = null)
        {
            rHash = rHash ?? requestHash;
            lock (_lock)
            {
                if (!_instances.ContainsKey(rHash.Value))
                {
                    COREobject core = new COREobject();
                    core.RequestStart = DateTime.UtcNow;
                    _instances.Add(rHash.Value, core);
                }
            }

            return(_instances[rHash.Value]);
        }
Esempio n. 5
0
        public static COREobject Create()
        {
            COREobject core = CreateINIT();

            return(core);
        }