コード例 #1
0
        void ReleaseDesignerOutlets()
        {
            if (CompletedIcon != null)
            {
                CompletedIcon.Dispose();
                CompletedIcon = null;
            }

            if (CompletedTableViewCell != null)
            {
                CompletedTableViewCell.Dispose();
                CompletedTableViewCell = null;
            }

            if (CreateIcon != null)
            {
                CreateIcon.Dispose();
                CreateIcon = null;
            }

            if (CreateLabel != null)
            {
                CreateLabel.Dispose();
                CreateLabel = null;
            }

            if (CreateMaintenanceTableViewCell != null)
            {
                CreateMaintenanceTableViewCell.Dispose();
                CreateMaintenanceTableViewCell = null;
            }

            if (IncompleteIcon != null)
            {
                IncompleteIcon.Dispose();
                IncompleteIcon = null;
            }

            if (IncompleteTableViewCell != null)
            {
                IncompleteTableViewCell.Dispose();
                IncompleteTableViewCell = null;
            }

            if (RequestedIcon != null)
            {
                RequestedIcon.Dispose();
                RequestedIcon = null;
            }

            if (RequestedTableViewCell != null)
            {
                RequestedTableViewCell.Dispose();
                RequestedTableViewCell = null;
            }
        }
コード例 #2
0
        public async Task <Label> CreateLabels(CreateLabel label)
        {
            var content  = new StringContent(JsonHelper.Serialize(label), Encoding.UTF8, "application/json");
            var response = await _httpClient.PostAsync($"label?api_token={_apiKey}", content).ConfigureAwait(false);

            var jsonResult = await response.Content.ReadAsStringAsync().ConfigureAwait(false);

            if (response.IsSuccessStatusCode)
            {
                return(JsonHelper.Deserialize <Label>(jsonResult));
            }
            HandleResponseError(response);
            return(null);
        }