Exemple #1
0
        internal static Service Create(Guid id)
        {
            var data = Singleton<KeyPool>.Instance.Find(id);
            if(data != null)
            {
                var service = new Service(data);
                if(service._Initial())
                {
                    return service;
                }
            }

            return null;
        }
Exemple #2
0
        internal static Guid Verify(string user, string password)
        {
            var service = new Service(
                new VerifyData
                {
                    Account = user,
                    Password = password
                });
            if(service._Initial())
            {
                service.Release();
                return Singleton<KeyPool>.Instance.Query(user, password);
            }

            return Guid.Empty;
        }