Exemplo n.º 1
0
 public static ObjectRequest CreateDeleteGroupRequest(long id)
 {
     var request = new ObjectRequest("Delete Group", Method.DELETE);
     request.AddParameter("handler", _handler);
     request.Data = new
     {
         id = id
     };
     request.ObjectId = id;
     return request;
 }
 public static ObjectRequest CreateGetGroupMembersRequest(int start, int limit, string groupName, bool globalGroup)
 {
     var request = new ObjectRequest("Get Group Members", Method.GET);
     request.AddParameter("provider", _defaultProvider);
     request.AskForProperties("id", "name");
     request.AddParameter("parameters", new { globalgroup = globalGroup });
     request.AddParameter("start", start);
     request.AddParameter("limit", limit);
     request.AddParameter("source", groupName);
     return request;
 }
Exemplo n.º 3
0
 private static ObjectRequest CreateNamedObjectRequest(string requestName, Method method)
 {
     var request = new ObjectRequest(requestName, method);
     request.AskForProperties("name", "id");
     return request;
 }
Exemplo n.º 4
0
 public static ObjectRequest CreateDeleteUserRequest(long id)
 {
     var request = new ObjectRequest("Delete User", Method.DELETE);
     request.ObjectId = id;
     request.AddParameter("handler", _defaultHandler);
     return request;
 }
Exemplo n.º 5
0
 private static ObjectRequest CreateUserObjectRequest(string requestName, Method method)
 {
     var request = new ObjectRequest(requestName, method);
     // TODO: think about making this dynamic by checking the DeserializeAs attributes from UserObject
     request.AskForProperties(JsonUserObjectProperties);
     request.AddParameter("handler", _defaultHandler);
     request.AddParameter("sort", _defaultSort);
     request.AddParameter("filter", _lockedFilter);
     return request;
 }