Exemple #1
0
 public IAsyncResult BeginSaveRole(Role role, Identification identification, AsyncCallback callback, object state)
 {
     logger.Log(LogLevel.Trace, AppLib.GetCaller(logger));
     if (AppLib.VerifyToken(identification.Token) <= 0) {
         throw new FaultException<ServiceFault>(new ServiceFault("Invalid Authentication", "Authorization"), new FaultReason("Unauthorized"));
     }
     var task = Task<Guid>.Factory.StartNew(process => DoSaveRole(role, identification), state);
     return task.ContinueWith(res => callback(task));
 }
Exemple #2
0
 public SaveRoleRequest(Role role)
 {
     this.role = role;
 }
Exemple #3
0
        public Guid DoSaveRole(Role role, Identification identification)
        {
            logger.Log(LogLevel.Trace, AppLib.GetCaller(logger));

            using (SystemDAO dao = new SystemDAO()) {
                return dao.SaveRole(role, identification.Token);
            }
        }