Exemplo n.º 1
0
        public Task Get <AsanaT>(AsanaWorkspace arg1, AsanaCollectionResponseEventHandler callback) where AsanaT : AsanaObject
        {
            AsanaRequest request = default(AsanaRequest);

            if (typeof(AsanaT) == typeof(AsanaUser))
            {
                request = GetBaseRequest(AsanaFunction.GetFunction(Function.GetUsersInWorkspace), arg1);
                return(request.Go((o, h) => PackAndSendResponseCollection <AsanaUser>(o, callback), ErrorCallback));
            }


            if (typeof(AsanaT) == typeof(AsanaProject))
            {
                request = GetBaseRequest(AsanaFunction.GetFunction(Function.GetProjectsInWorkspace), arg1);
                return(request.Go((o, h) => PackAndSendResponseCollection <AsanaProject>(o, callback), ErrorCallback));
            }


            if (typeof(AsanaT) == typeof(AsanaTag))
            {
                request = GetBaseRequest(AsanaFunction.GetFunction(Function.GetTagsInWorkspace), arg1);
                return(request.Go((o, h) => PackAndSendResponseCollection <AsanaTag>(o, callback), ErrorCallback));
            }


            if (typeof(AsanaT) == typeof(AsanaTeam))
            {
                request = GetBaseRequest(AsanaFunction.GetFunction(Function.GetTeamsInWorkspace), arg1);
                return(request.Go((o, h) => PackAndSendResponseCollection <AsanaTeam>(o, callback), ErrorCallback));
            }


            throw new TypeAccessException("Unknown type for this request: " + typeof(AsanaT).Name);
        }
Exemplo n.º 2
0
 public override Task Refresh()
 {
     return Host.GetProjectById(ID, project =>
     {
         Name = (project as AsanaProject).Name;
         CreatedAt = (project as AsanaProject).CreatedAt;
         ModifiedAt = (project as AsanaProject).ModifiedAt;
         Notes = (project as AsanaProject).Notes;
         Archived = (project as AsanaProject).Archived;
         Workspace = (project as AsanaProject).Workspace;
         Followers = (project as AsanaProject).Followers;
         Team = (project as AsanaProject).Team;
     });
 }
Exemplo n.º 3
0
 public Task GetTagsInWorkspace(AsanaWorkspace arg1, AsanaCollectionResponseEventHandler callback)
 {
     var request = GetBaseRequest(AsanaFunction.GetFunction(Function.GetTagsInWorkspace), arg1);
         return request.Go((o, h) => PackAndSendResponseCollection<AsanaTag>(o, callback), ErrorCallback);
 }
Exemplo n.º 4
0
 public AsanaProject(AsanaWorkspace workspace, AsanaTeam team, Int64 id = 0)
 {
     ID        = id;
     Workspace = workspace;
     Team      = team;
 }
Exemplo n.º 5
0
 public AsanaProject(AsanaWorkspace workspace, Int64 id = 0)
 {
     ID        = id;
     Workspace = workspace;
 }
Exemplo n.º 6
0
        public void GetTagsInWorkspace(AsanaWorkspace arg1, AsanaCollectionResponseEventHandler callback)
        {
            var request = GetBaseRequest(AsanaFunction.GetFunction(Function.GetTagsInWorkspace), arg1);

            request.Go((o, h) => PackAndSendResponseCollection <AsanaTag>(o, callback), ErrorCallback);
        }
Exemplo n.º 7
0
        public Task <IAsanaObjectCollection <AsanaTeam> > GetTeamsInWorkspaceAsync(AsanaWorkspace asanaWorkspace)
        {
            var request = GetBaseRequest(AsanaFunction.GetFunction(Function.GetTeamsInWorkspace), asanaWorkspace);

            return(request.GoCollectionAsync <AsanaTeam>());
        }
Exemplo n.º 8
0
        public Task GetTeamsInWorkspace(AsanaWorkspace asanaWorkspace, AsanaCollectionResponseEventHandler callback)
        {
            var request = GetBaseRequest(AsanaFunction.GetFunction(Function.GetTeamsInWorkspace), asanaWorkspace);

            return(request.Go((o, h) => PackAndSendResponseCollection <AsanaTeam>(o, callback), ErrorCallback));
        }
Exemplo n.º 9
0
        public Task <IAsanaObjectCollection <AsanaTask> > GetTasksInWorkspaceAsync(AsanaWorkspace asanaWorkspace, AsanaUser asanaUser)
        {
            var request = GetBaseRequest(AsanaFunction.GetFunction(Function.GetTasksInWorkspace), asanaWorkspace, asanaUser);

            return(request.GoCollectionAsync <AsanaTask>());
        }
Exemplo n.º 10
0
 public AsanaTask(AsanaWorkspace workspace)
 {
     Workspace = workspace;
 }
Exemplo n.º 11
0
 public void GetProjectsInWorkspace(AsanaWorkspace arg1, AsanaCollectionResponseEventHandler callback)
 {
     var request = GetBaseRequest(AsanaFunction.GetFunction(Function.GetProjectsInWorkspace), arg1);
         request.Go((o, h) => PackAndSendResponseCollection<AsanaProject>(o, callback), ErrorCallback);
 }
Exemplo n.º 12
0
 public AsanaProject(AsanaWorkspace workspace, AsanaTeam team, Int64 id = 0)
 {
     ID = id;
     Workspace = workspace;
     Team = team;
 }
Exemplo n.º 13
0
 public AsanaProject(AsanaWorkspace workspace, Int64 id = 0)
 {
     ID = id;
     Workspace = workspace;
 }
Exemplo n.º 14
0
 public AsanaTask(AsanaWorkspace workspace, Int64 id = 0)
 {
     ID        = id;
     Workspace = workspace;
 }
Exemplo n.º 15
0
 public AsanaTask(AsanaWorkspace workspace)
 {
     Workspace = workspace;
 }
Exemplo n.º 16
0
 public AsanaTag(AsanaWorkspace workspace, Int64 id = 0)
 {
     ID = id;
     Workspace = workspace;
 }