Пример #1
0
 public void AddAccessMember(ITable table, TaskContext context)
 {
     table.Dispatcher.Invoke(() =>
     {
         var userContext = table.GetService(typeof(IUserContext)) as IUserContext;
         var memberID    = userContext.Dispatcher.Invoke(() => userContext.Select(item => item.Path).Random());
         var accessType  = RandomUtility.NextEnum <AccessType>();
         table.AddAccessMember(context.Authentication, memberID, accessType);
     });
 }
Пример #2
0
 public static void AddAccessMemberFailTest <T>(ITable table, Authentication authentication, string memberID) where T : Exception
 {
     Assert.AreNotEqual(null, table.Parent);
     table.Dispatcher.Invoke(() =>
     {
         try
         {
             table.AddAccessMember(authentication, memberID, AccessType.ReadWrite);
             Assert.Fail("AddAccessMember");
         }
         catch (T)
         {
         }
     });
 }
Пример #3
0
 public void AddAccessMember()
 {
     table.AddAccessMember(authentication, "admin", ServiceModel.AccessType.Owner);
 }