예제 #1
0
 public List<Message> GetRelevantMessages(Authentication auth, int skip, int take)
 {
     using (var business = new SocialServiceBusiness())
     {
         business.Authentication.AuthenticateUser(auth);
         return business.Groups.GetRelevantMessages(auth.UserId, skip, take);
     }
 }
예제 #2
0
 public List<GroupExtended> GetGroupsExtended(Authentication auth)
 {
     using (var business = new SocialServiceBusiness())
     {
         business.Authentication.AuthenticateUser(auth);
         return business.Groups.GetGroupsExtended(auth.UserId);
     }
 }
예제 #3
0
 public List<Message> GetMessages(Authentication auth, int groupId)
 {
     using (var business = new SocialServiceBusiness())
     {
         business.Authentication.AuthenticateUser(auth);
         return business.Groups.GetMessages(auth.UserId, groupId);
     }
 }
예제 #4
0
 public List<Group> GetGroups(Authentication auth)
 {
     using (var business = new SocialServiceBusiness())
     {
         business.Authentication.AuthenticateUser(auth);
         return business.Groups.GetGroups();
     }
 }
예제 #5
0
 public Group GetGroup(Authentication auth, int groupId)
 {
     using (var business = new SocialServiceBusiness())
     {
         business.Authentication.AuthenticateUser(auth);
         return business.Groups.GetGroup(groupId);
     }
 }
예제 #6
0
 public void EnrollInGroup(Authentication auth, int groupId)
 {
     using (var business = new SocialServiceBusiness())
     {
         business.Authentication.AuthenticateUser(auth);
         business.Groups.EnrollInGroup(auth.UserId, groupId);
     }
 }
예제 #7
0
 public void DeleteMessage(Authentication auth, int messageId)
 {
     using (var business = new SocialServiceBusiness())
     {
         business.Authentication.AuthenticateUser(auth);
         business.Groups.DeleteMessage(auth.UserId, messageId);
     }
 }
예제 #8
0
 public int AddGroup(Authentication auth, Group group)
 {
     using (var business = new SocialServiceBusiness())
     {
         business.Authentication.AuthenticateUser(auth);
         return business.Groups.AddGroup(group);
     }
 }
예제 #9
0
 public void PostMessage(Authentication auth, Message message, int? parentId)
 {
     using(var business = new SocialServiceBusiness())
     {
         business.Authentication.AuthenticateUser(auth);
         business.Groups.PostMessage(message, parentId);
     }
 }
예제 #10
0
 public Authentication Login(LoginCredentials credentials)
 {
     using (var business = new SocialServiceBusiness())
         return business.Authentication.Login(credentials);
 }