コード例 #1
0
        public void CreateProject(string name, long?parentId = null, int?colour = null, bool favourite = false)
        {
            Dictionary <string, object> parameters = new Dictionary <string, object>();

            parameters.Add("name", name);
            if (parentId != null)
            {
                parameters.Add("parent_id", parentId);
            }
            if (colour != null)
            {
                parameters.Add("color", colour);
            }
            parameters.Add("favorite", favourite.ToString().ToLower());

            IRestResponse response = ProjectCreateCallManager.CreateProject(parameters);

            SetStatus(response);

            string content = response.Content;

            if (StatusMessage.Equals("OK"))
            {
                ProjectDTO.DeserialiseProject(content);
                ProjectJson = JsonConvert.DeserializeObject <JObject>(content);
            }
        }
コード例 #2
0
 public ProjectCreateService(ProjectCreateCallManager projectCreateCallManager)
 {
     ProjectCreateCallManager = projectCreateCallManager;
 }