From 4e303a338a48f8f7958c5103314cb2204775cb7b Mon Sep 17 00:00:00 2001 From: Maarten Balliauw Date: Thu, 14 Sep 2017 13:44:36 +0200 Subject: [PATCH 1/9] Rider model updates --- .gitignore | 1 + .idea/.idea.YouTrackSharp/.idea/indexLayout.xml | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 .idea/.idea.YouTrackSharp/.idea/indexLayout.xml diff --git a/.gitignore b/.gitignore index 0bb62b58..5418b887 100644 --- a/.gitignore +++ b/.gitignore @@ -205,3 +205,4 @@ fabric.properties artifacts/ .vs/YouTrackSharp/v15/sqlite3/storage.ide .idea/.idea.YouTrackSharp/.idea/inspectionProfiles/profiles_settings.xml +.idea/.idea.YouTrackSharp/.idea/contentModel.xml diff --git a/.idea/.idea.YouTrackSharp/.idea/indexLayout.xml b/.idea/.idea.YouTrackSharp/.idea/indexLayout.xml new file mode 100644 index 00000000..f1feadf0 --- /dev/null +++ b/.idea/.idea.YouTrackSharp/.idea/indexLayout.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file From 0d2fde344e69a86c5f39754f3b35cc44ad3ead83 Mon Sep 17 00:00:00 2001 From: Maarten Balliauw Date: Thu, 14 Sep 2017 13:56:18 +0200 Subject: [PATCH 2/9] Fix some code issues --- src/YouTrackSharp/Connection.cs | 4 +- src/YouTrackSharp/Issues/Field.cs | 56 ++++++++----------- src/YouTrackSharp/Issues/Issue.cs | 14 ++--- .../Issues/IssuesService.Attachments.cs | 12 ++-- src/YouTrackSharp/Issues/IssuesService.cs | 6 +- src/YouTrackSharp/Issues/Link.cs | 1 - src/YouTrackSharp/Json/JTokenTypeUtil.cs | 1 + .../Json/ProjectVersionConverter.cs | 5 +- .../Json/TimeSpanMinutesConverter.cs | 19 +++---- .../Json/UnixDateTimeOffsetConverter.cs | 55 ++++++++---------- .../TimeTrackingManagementService.cs | 5 +- .../Management/UserManagementService.cs | 2 +- .../TimeTracking/TimeTrackingService.cs | 4 +- .../Infrastructure/TemporaryIssueContext.cs | 3 +- .../Issues/Attachments/DownloadAttachment.cs | 2 +- 15 files changed, 80 insertions(+), 109 deletions(-) diff --git a/src/YouTrackSharp/Connection.cs b/src/YouTrackSharp/Connection.cs index 070183dd..52ae7c51 100644 --- a/src/YouTrackSharp/Connection.cs +++ b/src/YouTrackSharp/Connection.cs @@ -25,10 +25,8 @@ public abstract class Connection /// protected Connection(string serverUrl) { - Uri serverUri; - if (string.IsNullOrEmpty(serverUrl) - || !Uri.TryCreate(EnsureTrailingSlash(serverUrl), UriKind.Absolute, out serverUri)) + || !Uri.TryCreate(EnsureTrailingSlash(serverUrl), UriKind.Absolute, out var serverUri)) { throw new ArgumentException("The server URL is invalid. Please provide a valid URL to a self-hosted YouTrack instance or YouTrack InCloud.", nameof(serverUrl)); } diff --git a/src/YouTrackSharp/Issues/Field.cs b/src/YouTrackSharp/Issues/Field.cs index 20ca6f9a..325fa316 100644 --- a/src/YouTrackSharp/Issues/Field.cs +++ b/src/YouTrackSharp/Issues/Field.cs @@ -42,16 +42,14 @@ public class Field /// as . public string AsString() { - if (Value == null) + switch (Value) { - return null; + case null: + return null; + case ICollection collection: + return collection.SingleOrDefault(); } - - if (Value is ICollection collection) - { - return collection.SingleOrDefault(); - } - + return Value.ToString(); } @@ -61,20 +59,17 @@ public string AsString() /// as . public ICollection AsCollection() { - if (Value == null) - { - return new List(); - } - else if (Value is ICollection collection) + switch (Value) { - return collection; - } - else - { - return new List() - { - Value.ToString() - }; + case null: + return new List(); + case ICollection collection: + return collection; + default: + return new List + { + Value.ToString() + }; } } @@ -84,19 +79,16 @@ public ICollection AsCollection() /// as . public DateTime AsDateTime() { - if (Value is DateTime dateTime) - { - return dateTime; - } - else if (Value is DateTimeOffset dateTimeOffset) - { - return dateTimeOffset.DateTime; - } - else + switch (Value) { - var milliseconds = Convert.ToInt64(AsString()); + case DateTime dateTime: + return dateTime; + case DateTimeOffset dateTimeOffset: + return dateTimeOffset.DateTime; + default: + var milliseconds = Convert.ToInt64(AsString()); - return DateTimeOffset.FromUnixTimeMilliseconds(milliseconds).DateTime; + return DateTimeOffset.FromUnixTimeMilliseconds(milliseconds).DateTime; } } diff --git a/src/YouTrackSharp/Issues/Issue.cs b/src/YouTrackSharp/Issues/Issue.cs index 2c5f9264..954fb2c7 100644 --- a/src/YouTrackSharp/Issues/Issue.cs +++ b/src/YouTrackSharp/Issues/Issue.cs @@ -73,10 +73,7 @@ public string Description { /// /// Issue fields. /// - public ICollection Fields - { - get { return _fields.Values; } - } + public ICollection Fields => _fields.Values; /// /// Issue comments. @@ -97,8 +94,7 @@ public ICollection Fields /// matching the ; null when not found. public Field GetField(string fieldName) { - Field field; - _fields.TryGetValue(fieldName, out field); + _fields.TryGetValue(fieldName, out var field); return field; } @@ -109,8 +105,7 @@ public Field GetField(string fieldName) /// The value to set for the . public void SetField(string fieldName, object value) { - Field field; - if (_fields.TryGetValue(fieldName, out field)) + if (_fields.TryGetValue(fieldName, out var field)) { field.Value = value; } @@ -177,8 +172,7 @@ public override bool TrySetMember(SetMemberBinder binder, object value) } // Regular setter - Field field; - if (_fields.TryGetValue(binder.Name, out field) || _fields.TryGetValue(binder.Name.Replace("_", " "), out field)) + if (_fields.TryGetValue(binder.Name, out var field) || _fields.TryGetValue(binder.Name.Replace("_", " "), out field)) { field.Value = value; } diff --git a/src/YouTrackSharp/Issues/IssuesService.Attachments.cs b/src/YouTrackSharp/Issues/IssuesService.Attachments.cs index 9152d021..9242509c 100644 --- a/src/YouTrackSharp/Issues/IssuesService.Attachments.cs +++ b/src/YouTrackSharp/Issues/IssuesService.Attachments.cs @@ -43,11 +43,11 @@ public async Task AttachFileToIssue(string issueId, string attachmentName, Strea { queryString.Add($"attachmentName={attachmentName}"); } - if (!string.IsNullOrEmpty(@group)) + if (!string.IsNullOrEmpty(group)) { - queryString.Add($"group={@group}"); + queryString.Add($"group={group}"); } - if (!string.IsNullOrEmpty(@group)) + if (!string.IsNullOrEmpty(group)) { queryString.Add($"author={author}"); } @@ -61,8 +61,10 @@ public async Task AttachFileToIssue(string issueId, string attachmentName, Strea Name = attachmentName }; - var content = new MultipartFormDataContent(); - content.Add(streamContent); + var content = new MultipartFormDataContent + { + streamContent + }; var client = await _connection.GetAuthenticatedHttpClient(); var response = await client.PostAsync($"rest/issue/{issueId}/attachment?{query}", content); diff --git a/src/YouTrackSharp/Issues/IssuesService.cs b/src/YouTrackSharp/Issues/IssuesService.cs index a7042083..0632c4f4 100644 --- a/src/YouTrackSharp/Issues/IssuesService.cs +++ b/src/YouTrackSharp/Issues/IssuesService.cs @@ -17,7 +17,7 @@ public partial class IssuesService { private readonly Connection _connection; - private static readonly string[] ReservedFields = new [] + private static readonly string[] ReservedFields = { "id", "entityid", "jiraid", "summary", "description" }; @@ -125,7 +125,7 @@ public async Task CreateIssue(string projectId, Issue issue) response.EnsureSuccessStatusCode(); // Extract issue id from Location header response - var marker = "rest/issue/"; + const string marker = "rest/issue/"; var locationHeader = response.Headers.Location.ToString(); var issueId = locationHeader.Substring(locationHeader.IndexOf(marker, StringComparison.OrdinalIgnoreCase) + marker.Length); @@ -243,7 +243,7 @@ public async Task ApplyCommand(string issueId, string command, string comment = } if (disableNotifications) { - queryString.Add($"disableNotifications=true"); + queryString.Add("disableNotifications=true"); } if (!string.IsNullOrEmpty(runAs)) { diff --git a/src/YouTrackSharp/Issues/Link.cs b/src/YouTrackSharp/Issues/Link.cs index 23e19603..598c70d4 100644 --- a/src/YouTrackSharp/Issues/Link.cs +++ b/src/YouTrackSharp/Issues/Link.cs @@ -1,4 +1,3 @@ -using System; using Newtonsoft.Json; namespace YouTrackSharp.Issues diff --git a/src/YouTrackSharp/Json/JTokenTypeUtil.cs b/src/YouTrackSharp/Json/JTokenTypeUtil.cs index 5839cbbd..962589c4 100644 --- a/src/YouTrackSharp/Json/JTokenTypeUtil.cs +++ b/src/YouTrackSharp/Json/JTokenTypeUtil.cs @@ -6,6 +6,7 @@ internal static class JTokenTypeUtil { public static bool IsSimpleType(JTokenType tokenType) { + // ReSharper disable once SwitchStatementMissingSomeCases switch (tokenType) { case JTokenType.Boolean: diff --git a/src/YouTrackSharp/Json/ProjectVersionConverter.cs b/src/YouTrackSharp/Json/ProjectVersionConverter.cs index d02f7005..82580c53 100644 --- a/src/YouTrackSharp/Json/ProjectVersionConverter.cs +++ b/src/YouTrackSharp/Json/ProjectVersionConverter.cs @@ -15,8 +15,7 @@ public class ProjectVersionConverter /// public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) { - var collection = value as ICollection; - if (collection != null) + if (value is ICollection collection) { writer.WriteValue("[" + string.Join(", ", collection) + "]"); } @@ -44,7 +43,7 @@ public override object ReadJson(JsonReader reader, Type objectType, object exist var splitEntries = value.Trim('[', ']').Split(new[] {','}, StringSplitOptions.RemoveEmptyEntries); foreach (var entry in splitEntries) { - collection.Add(entry.Trim()); + collection?.Add(entry.Trim()); } } } diff --git a/src/YouTrackSharp/Json/TimeSpanMinutesConverter.cs b/src/YouTrackSharp/Json/TimeSpanMinutesConverter.cs index 2235092a..2b1c5691 100644 --- a/src/YouTrackSharp/Json/TimeSpanMinutesConverter.cs +++ b/src/YouTrackSharp/Json/TimeSpanMinutesConverter.cs @@ -25,18 +25,15 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s /// public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { - if (reader.TokenType == JsonToken.Null) + switch (reader.TokenType) { - return null; - } - - if (reader.TokenType == JsonToken.Integer || reader.TokenType == JsonToken.Float) - { - return TimeSpan.FromMinutes((long)reader.Value); - } - else - { - throw new FormatException(string.Format(Strings.Exception_CouldNotParseTimeSpan, reader.Value.ToString())); + case JsonToken.Null: + return null; + case JsonToken.Integer: + case JsonToken.Float: + return TimeSpan.FromMinutes((long)reader.Value); + default: + throw new FormatException(string.Format(Strings.Exception_CouldNotParseTimeSpan, reader.Value.ToString())); } } } diff --git a/src/YouTrackSharp/Json/UnixDateTimeOffsetConverter.cs b/src/YouTrackSharp/Json/UnixDateTimeOffsetConverter.cs index 2c0360d0..5c1d47d2 100644 --- a/src/YouTrackSharp/Json/UnixDateTimeOffsetConverter.cs +++ b/src/YouTrackSharp/Json/UnixDateTimeOffsetConverter.cs @@ -13,17 +13,16 @@ public class UnixDateTimeOffsetConverter /// public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) { - if (value is DateTimeOffset) + switch (value) { - writer.WriteValue(((DateTimeOffset)value).ToUnixTimeMilliseconds()); - } - else if (value is DateTime) - { - writer.WriteValue(new DateTimeOffset((DateTime)value).ToUnixTimeMilliseconds()); - } - else - { - throw new Exception("Expected DateTimeOffset or DateTime."); + case DateTimeOffset offset: + writer.WriteValue(offset.ToUnixTimeMilliseconds()); + break; + case DateTime dateTime: + writer.WriteValue(new DateTimeOffset(dateTime).ToUnixTimeMilliseconds()); + break; + default: + throw new Exception("Expected DateTimeOffset or DateTime."); } } @@ -35,32 +34,24 @@ public override object ReadJson(JsonReader reader, Type objectType, object exist return null; } - long ticks = 0; + long ticks; - if (reader.TokenType == JsonToken.Integer || reader.TokenType == JsonToken.Float) - { - ticks = (long)reader.Value; - } - else if (reader.TokenType == JsonToken.String) + switch (reader.TokenType) { - long.TryParse(reader.Value.ToString(), out ticks); - } - else - { - throw new FormatException(string.Format(Strings.Exception_CouldNotParseUnixTimeStamp, reader.Value.ToString())); + case JsonToken.Integer: + case JsonToken.Float: + ticks = (long)reader.Value; + break; + case JsonToken.String: + long.TryParse(reader.Value.ToString(), out ticks); + break; + default: + throw new FormatException(string.Format(Strings.Exception_CouldNotParseUnixTimeStamp, reader.Value.ToString())); } - DateTimeOffset converted; - if (Math.Ceiling(Math.Log10(ticks)) >= 12) - { - // Milliseconds - converted = DateTimeOffset.FromUnixTimeMilliseconds(ticks); - } - else - { - // Seconds - converted = DateTimeOffset.FromUnixTimeSeconds(ticks); - } + var converted = Math.Ceiling(Math.Log10(ticks)) >= 12 + ? DateTimeOffset.FromUnixTimeMilliseconds(ticks) + : DateTimeOffset.FromUnixTimeSeconds(ticks); // Return value if (objectType == typeof(DateTimeOffset) || objectType == typeof(DateTimeOffset?)) diff --git a/src/YouTrackSharp/Management/TimeTrackingManagementService.cs b/src/YouTrackSharp/Management/TimeTrackingManagementService.cs index 0d364214..1eac3cdb 100644 --- a/src/YouTrackSharp/Management/TimeTrackingManagementService.cs +++ b/src/YouTrackSharp/Management/TimeTrackingManagementService.cs @@ -5,7 +5,6 @@ using System.Threading.Tasks; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using YouTrackSharp.TimeTracking; namespace YouTrackSharp.Management { @@ -35,7 +34,7 @@ public TimeTrackingManagementService(Connection connection) public async Task GetSystemWideTimeTrackingSettings() { var client = await _connection.GetAuthenticatedHttpClient(); - var response = await client.GetAsync($"rest/admin/timetracking"); + var response = await client.GetAsync("rest/admin/timetracking"); response.EnsureSuccessStatusCode(); @@ -61,7 +60,7 @@ public async Task UpdateSystemWideTimeTrackingSettings(SystemWideTimeTrackingSet stringContent.Headers.ContentType = new MediaTypeHeaderValue(Constants.HttpContentTypes.ApplicationJson); var client = await _connection.GetAuthenticatedHttpClient(); - var response = await client.PutAsync($"rest/admin/timetracking", stringContent); + var response = await client.PutAsync("rest/admin/timetracking", stringContent); if (response.StatusCode == HttpStatusCode.BadRequest) { diff --git a/src/YouTrackSharp/Management/UserManagementService.cs b/src/YouTrackSharp/Management/UserManagementService.cs index 030a7d80..cf2816dd 100644 --- a/src/YouTrackSharp/Management/UserManagementService.cs +++ b/src/YouTrackSharp/Management/UserManagementService.cs @@ -88,7 +88,7 @@ public async Task> GetUsers(string filter = null, string group } if (onlineOnly) { - queryString.Add($"onlineOnly=true"); + queryString.Add("onlineOnly=true"); } if (start > 0) { diff --git a/src/YouTrackSharp/TimeTracking/TimeTrackingService.cs b/src/YouTrackSharp/TimeTracking/TimeTrackingService.cs index b768cfba..b51407ba 100644 --- a/src/YouTrackSharp/TimeTracking/TimeTrackingService.cs +++ b/src/YouTrackSharp/TimeTracking/TimeTrackingService.cs @@ -13,7 +13,7 @@ namespace YouTrackSharp.TimeTracking /// A class that represents a REST API client for YouTrack Time Tracking User Methods. /// It uses a implementation to connect to the remote YouTrack server instance. /// - public partial class TimeTrackingService + public class TimeTrackingService { private readonly Connection _connection; @@ -116,7 +116,7 @@ public async Task CreateWorkItemForIssue(string issueId, WorkItem workIt response.EnsureSuccessStatusCode(); // Extract work item id from Location header response - var marker = "timetracking/workitem/"; + const string marker = "timetracking/workitem/"; var locationHeader = response.Headers.Location.ToString(); return locationHeader.Substring(locationHeader.IndexOf(marker, StringComparison.OrdinalIgnoreCase) + marker.Length); diff --git a/tests/YouTrackSharp.Tests/Infrastructure/TemporaryIssueContext.cs b/tests/YouTrackSharp.Tests/Infrastructure/TemporaryIssueContext.cs index 25029c39..929acb34 100644 --- a/tests/YouTrackSharp.Tests/Infrastructure/TemporaryIssueContext.cs +++ b/tests/YouTrackSharp.Tests/Infrastructure/TemporaryIssueContext.cs @@ -1,6 +1,5 @@ using System; using System.Globalization; -using System.Runtime.CompilerServices; using System.Threading.Tasks; using YouTrackSharp.Issues; @@ -9,7 +8,7 @@ namespace YouTrackSharp.Tests.Infrastructure public class TemporaryIssueContext : IDisposable { - private bool _destroyed = false; + private bool _destroyed; private readonly Connection _connection; diff --git a/tests/YouTrackSharp.Tests/Integration/Issues/Attachments/DownloadAttachment.cs b/tests/YouTrackSharp.Tests/Integration/Issues/Attachments/DownloadAttachment.cs index 8407f1ac..68101b1d 100644 --- a/tests/YouTrackSharp.Tests/Integration/Issues/Attachments/DownloadAttachment.cs +++ b/tests/YouTrackSharp.Tests/Integration/Issues/Attachments/DownloadAttachment.cs @@ -22,7 +22,7 @@ public async Task Valid_Connection_Gets_Attachments_For_Issue() using (var attachmentStream = await TestUtilities.GenerateAttachmentStream("Generated by unit test.")) { - await service.AttachFileToIssue(temporaryIssueContext.Issue.Id, $"file1.txt", attachmentStream); + await service.AttachFileToIssue(temporaryIssueContext.Issue.Id, "file1.txt", attachmentStream); } var attachments = await service.GetAttachmentsForIssue(temporaryIssueContext.Issue.Id); From 79c291524f134a59a457e7dd0073773ac43014f6 Mon Sep 17 00:00:00 2001 From: Maarten Balliauw Date: Thu, 14 Sep 2017 14:13:19 +0200 Subject: [PATCH 3/9] Revert to base file --- .idea/.idea.YouTrackSharp/.idea/contentModel.xml | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 .idea/.idea.YouTrackSharp/.idea/contentModel.xml diff --git a/.idea/.idea.YouTrackSharp/.idea/contentModel.xml b/.idea/.idea.YouTrackSharp/.idea/contentModel.xml deleted file mode 100644 index 02cf7ea4..00000000 --- a/.idea/.idea.YouTrackSharp/.idea/contentModel.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file From 2d790280a4c8dcc779449d52304ad02f02088fc4 Mon Sep 17 00:00:00 2001 From: Maarten Balliauw Date: Tue, 24 Oct 2017 09:37:58 +0200 Subject: [PATCH 4/9] Remove redundant `new` --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c54f13d0..0f28f36c 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ var connection = new UsernamePasswordConnection("https://ytsharp.myjetbrains.com Once a connection is made, various services can be used. For example to get a list of projects the user has access to, the `ProjectsService` can be used: ```csharp -var projectsService = new connection.CreateProjectsService(); +var projectsService = connection.CreateProjectsService(); var projectsForCurrentUser = await projectsService.GetAccessibleProjects(); ``` From 3b340e5a9c1f6ca8e48138bbf02f732056d31d87 Mon Sep 17 00:00:00 2001 From: Maarten Balliauw Date: Tue, 24 Oct 2017 11:08:41 +0200 Subject: [PATCH 5/9] Add R# settings file --- YouTrackSharp.sln.DotSettings | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 YouTrackSharp.sln.DotSettings diff --git a/YouTrackSharp.sln.DotSettings b/YouTrackSharp.sln.DotSettings new file mode 100644 index 00000000..d967c518 --- /dev/null +++ b/YouTrackSharp.sln.DotSettings @@ -0,0 +1,6 @@ + + True + <?xml version="1.0" encoding="utf-16"?><Profile name="YouTrackSharp"><AspOptimizeRegisterDirectives>True</AspOptimizeRegisterDirectives><HtmlReformatCode>True</HtmlReformatCode><JsInsertSemicolon>True</JsInsertSemicolon><FormatAttributeQuoteDescriptor>True</FormatAttributeQuoteDescriptor><CorrectVariableKindsDescriptor>True</CorrectVariableKindsDescriptor><VariablesToInnerScopesDescriptor>True</VariablesToInnerScopesDescriptor><StringToTemplatesDescriptor>True</StringToTemplatesDescriptor><JsReformatCode>True</JsReformatCode><RemoveRedundantQualifiersTs>True</RemoveRedundantQualifiersTs><OptimizeImportsTs>True</OptimizeImportsTs><OptimizeReferenceCommentsTs>True</OptimizeReferenceCommentsTs><PublicModifierStyleTs>True</PublicModifierStyleTs><ExplicitAnyTs>True</ExplicitAnyTs><TypeAnnotationStyleTs>True</TypeAnnotationStyleTs><RelativePathStyleTs>True</RelativePathStyleTs><AsInsteadOfCastTs>True</AsInsteadOfCastTs><CSCodeStyleAttributes ArrangeTypeAccessModifier="True" ArrangeTypeMemberAccessModifier="True" SortModifiers="True" RemoveRedundantParentheses="True" AddMissingParentheses="True" ArrangeBraces="True" ArrangeAttributes="True" ArrangeArgumentsStyle="True" ArrangeCodeBodyStyle="False" /><CSEnforceVarKeywordUsageSettings>True</CSEnforceVarKeywordUsageSettings><RemoveCodeRedundanciesVB>True</RemoveCodeRedundanciesVB><CssAlphabetizeProperties>True</CssAlphabetizeProperties><VBOptimizeImports>True</VBOptimizeImports><VBShortenReferences>True</VBShortenReferences><CSUseAutoProperty>True</CSUseAutoProperty><CSMakeAutoPropertyGetOnly>True</CSMakeAutoPropertyGetOnly><CSArrangeQualifiers>True</CSArrangeQualifiers><CSFixBuiltinTypeReferences>True</CSFixBuiltinTypeReferences><CssReformatCode>True</CssReformatCode><VBReformatCode>True</VBReformatCode><VBFormatDocComments>True</VBFormatDocComments><CSOptimizeUsings><OptimizeUsings>True</OptimizeUsings><EmbraceInRegion>False</EmbraceInRegion><RegionName></RegionName></CSOptimizeUsings><CSShortenReferences>True</CSShortenReferences><CSReformatCode>True</CSReformatCode></Profile> + YouTrackSharp + False + False \ No newline at end of file From b67762a764920c107f8abee69ce12481f34e439d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Helmich?= Date: Tue, 24 Oct 2017 11:14:14 +0200 Subject: [PATCH 6/9] Functionality to pull changeset of an issue. --- src/YouTrackSharp/Issues/Change.cs | 31 +++++++++++++++ src/YouTrackSharp/Issues/Changeset.cs | 31 +++++++++++++++ src/YouTrackSharp/Issues/Field.cs | 12 ++++++ .../Issues/IssuesService.Changeset.cs | 33 ++++++++++++++++ .../Issues/Changeset/GetChangesetForIssue.cs | 38 +++++++++++++++++++ 5 files changed, 145 insertions(+) create mode 100644 src/YouTrackSharp/Issues/Change.cs create mode 100644 src/YouTrackSharp/Issues/Changeset.cs create mode 100644 src/YouTrackSharp/Issues/IssuesService.Changeset.cs create mode 100644 tests/YouTrackSharp.Tests/Integration/Issues/Changeset/GetChangesetForIssue.cs diff --git a/src/YouTrackSharp/Issues/Change.cs b/src/YouTrackSharp/Issues/Change.cs new file mode 100644 index 00000000..e8aecf16 --- /dev/null +++ b/src/YouTrackSharp/Issues/Change.cs @@ -0,0 +1,31 @@ +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace YouTrackSharp.Issues +{ + /// + /// A class that represents YouTrack issue change. + /// + public class Change + { + /// + /// Creates an instance of the class. + /// + public Change() + { + Fields = new List(); + } + + /// + /// Id of the change. + /// + [JsonProperty("id")] + public string Id { get; set; } + + /// + /// Fields. + /// + [JsonProperty("field")] + public ICollection Fields { get; set; } + } +} \ No newline at end of file diff --git a/src/YouTrackSharp/Issues/Changeset.cs b/src/YouTrackSharp/Issues/Changeset.cs new file mode 100644 index 00000000..4d649a69 --- /dev/null +++ b/src/YouTrackSharp/Issues/Changeset.cs @@ -0,0 +1,31 @@ +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace YouTrackSharp.Issues +{ + /// + /// A class that represents YouTrack issue Changeset. + /// + public class Changeset + { + /// + /// Creates an instance of the class. + /// + public Changeset() + { + Changes = new List(); + } + + /// + /// Id of the change. + /// + [JsonProperty("issue")] + public Issue Issue { get; set; } + + /// + /// Fields. + /// + [JsonProperty("change")] + public ICollection Changes { get; set; } + } +} \ No newline at end of file diff --git a/src/YouTrackSharp/Issues/Field.cs b/src/YouTrackSharp/Issues/Field.cs index 325fa316..9c4090c0 100644 --- a/src/YouTrackSharp/Issues/Field.cs +++ b/src/YouTrackSharp/Issues/Field.cs @@ -24,6 +24,18 @@ public class Field [JsonProperty("value")] public object Value; + /// + /// Value. + /// + [JsonProperty("oldValue")] + public object OldValue; + + /// + /// Value. + /// + [JsonProperty("newValue")] + public object NewValue; + /// /// Value Id. /// diff --git a/src/YouTrackSharp/Issues/IssuesService.Changeset.cs b/src/YouTrackSharp/Issues/IssuesService.Changeset.cs new file mode 100644 index 00000000..c68af0fd --- /dev/null +++ b/src/YouTrackSharp/Issues/IssuesService.Changeset.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Newtonsoft.Json; + +namespace YouTrackSharp.Issues +{ + public partial class IssuesService + { + /// + /// Get changes for a specific issue from the server. + /// + /// Uses the REST API Get Changes of an Issue. + /// Id of the issue to get changes for. + /// for the requested issue . + /// When the is null or empty. + /// When the call to the remote YouTrack server instance failed. + public async Task GetChangsetForIssue(string issueId) + { + if (string.IsNullOrEmpty(issueId)) + { + throw new ArgumentNullException(nameof(issueId)); + } + + var client = await _connection.GetAuthenticatedHttpClient(); + var response = await client.GetAsync($"rest/issue/{issueId}/changes"); + + response.EnsureSuccessStatusCode(); + + return JsonConvert.DeserializeObject(await response.Content.ReadAsStringAsync()); + } + } +} \ No newline at end of file diff --git a/tests/YouTrackSharp.Tests/Integration/Issues/Changeset/GetChangesetForIssue.cs b/tests/YouTrackSharp.Tests/Integration/Issues/Changeset/GetChangesetForIssue.cs new file mode 100644 index 00000000..76f2ad71 --- /dev/null +++ b/tests/YouTrackSharp.Tests/Integration/Issues/Changeset/GetChangesetForIssue.cs @@ -0,0 +1,38 @@ +using System.Threading.Tasks; +using Xunit; +using YouTrackSharp.Tests.Infrastructure; + +// ReSharper disable once CheckNamespace +namespace YouTrackSharp.Tests.Integration.Issues +{ + public partial class IssuesServiceTests + { + public class GetChangesForIssue + { + [Fact] + public async Task Valid_Connection_Returns_Changeset_For_Issue() + { + // Arrange + var connection = Connections.Demo1Token; + var service = connection.CreateIssuesService(); + + // Act + var result = await service.GetChangsetForIssue("DP1-1"); + + // Assert + Assert.NotNull(result); + } + + [Fact] + public async Task Invalid_Connection_Throws_UnauthorizedConnectionException() + { + // Arrange + var service = Connections.UnauthorizedConnection.CreateIssuesService(); + + // Act & Assert + await Assert.ThrowsAsync( + async () => await service.GetChangsetForIssue("NOT-EXIST")); + } + } + } +} \ No newline at end of file From 4a154cd0567db81e849fc8818c69231f59d36b97 Mon Sep 17 00:00:00 2001 From: Maarten Balliauw Date: Tue, 24 Oct 2017 14:09:27 +0200 Subject: [PATCH 7/9] Updates to object model for change history --- src/YouTrackSharp/Issues/Change.cs | 24 +++-- .../Issues/ChangeCollectionWrapper.cs | 17 ++++ src/YouTrackSharp/Issues/Changeset.cs | 31 ------- src/YouTrackSharp/Issues/Field.cs | 12 --- src/YouTrackSharp/Issues/FieldChange.cs | 88 +++++++++++++++++++ ....Changeset.cs => IssuesService.History.cs} | 11 +-- .../GetChangeHistoryForIssue.cs} | 16 +++- 7 files changed, 139 insertions(+), 60 deletions(-) create mode 100644 src/YouTrackSharp/Issues/ChangeCollectionWrapper.cs delete mode 100644 src/YouTrackSharp/Issues/Changeset.cs create mode 100644 src/YouTrackSharp/Issues/FieldChange.cs rename src/YouTrackSharp/Issues/{IssuesService.Changeset.cs => IssuesService.History.cs} (64%) rename tests/YouTrackSharp.Tests/Integration/Issues/{Changeset/GetChangesetForIssue.cs => History/GetChangeHistoryForIssue.cs} (59%) diff --git a/src/YouTrackSharp/Issues/Change.cs b/src/YouTrackSharp/Issues/Change.cs index e8aecf16..81153c0d 100644 --- a/src/YouTrackSharp/Issues/Change.cs +++ b/src/YouTrackSharp/Issues/Change.cs @@ -1,10 +1,12 @@ +using System; using System.Collections.Generic; +using System.Linq; using Newtonsoft.Json; namespace YouTrackSharp.Issues { /// - /// A class that represents YouTrack issue change. + /// A class that represents a YouTrack issue change. /// public class Change { @@ -13,19 +15,23 @@ public class Change /// public Change() { - Fields = new List(); + Fields = new List(); } - + /// - /// Id of the change. + /// Fields that have been changed. /// - [JsonProperty("id")] - public string Id { get; set; } + [JsonProperty("field")] + public ICollection Fields { get; set; } /// - /// Fields. + /// Get for a field identified by . /// - [JsonProperty("field")] - public ICollection Fields { get; set; } + /// Name of the field to retrieve for. + /// for a field identified by . Can be null. + public FieldChange ForField(string fieldName) + { + return Fields.FirstOrDefault(field => string.Equals(field.Name, fieldName, StringComparison.OrdinalIgnoreCase)); + } } } \ No newline at end of file diff --git a/src/YouTrackSharp/Issues/ChangeCollectionWrapper.cs b/src/YouTrackSharp/Issues/ChangeCollectionWrapper.cs new file mode 100644 index 00000000..c5f2efbd --- /dev/null +++ b/src/YouTrackSharp/Issues/ChangeCollectionWrapper.cs @@ -0,0 +1,17 @@ +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace YouTrackSharp.Issues +{ + /// + /// Wrapper for of . + /// + internal class ChangeCollectionWrapper + { + /// + /// Wrapped of . + /// + [JsonProperty("change")] + public ICollection Changes { get; set; } + } +} \ No newline at end of file diff --git a/src/YouTrackSharp/Issues/Changeset.cs b/src/YouTrackSharp/Issues/Changeset.cs deleted file mode 100644 index 4d649a69..00000000 --- a/src/YouTrackSharp/Issues/Changeset.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace YouTrackSharp.Issues -{ - /// - /// A class that represents YouTrack issue Changeset. - /// - public class Changeset - { - /// - /// Creates an instance of the class. - /// - public Changeset() - { - Changes = new List(); - } - - /// - /// Id of the change. - /// - [JsonProperty("issue")] - public Issue Issue { get; set; } - - /// - /// Fields. - /// - [JsonProperty("change")] - public ICollection Changes { get; set; } - } -} \ No newline at end of file diff --git a/src/YouTrackSharp/Issues/Field.cs b/src/YouTrackSharp/Issues/Field.cs index 9c4090c0..325fa316 100644 --- a/src/YouTrackSharp/Issues/Field.cs +++ b/src/YouTrackSharp/Issues/Field.cs @@ -24,18 +24,6 @@ public class Field [JsonProperty("value")] public object Value; - /// - /// Value. - /// - [JsonProperty("oldValue")] - public object OldValue; - - /// - /// Value. - /// - [JsonProperty("newValue")] - public object NewValue; - /// /// Value Id. /// diff --git a/src/YouTrackSharp/Issues/FieldChange.cs b/src/YouTrackSharp/Issues/FieldChange.cs new file mode 100644 index 00000000..bada79ec --- /dev/null +++ b/src/YouTrackSharp/Issues/FieldChange.cs @@ -0,0 +1,88 @@ +using System.Diagnostics; +using Newtonsoft.Json; + +namespace YouTrackSharp.Issues +{ + /// + /// Represents a YouTrack issue field change. + /// + [DebuggerDisplay("{Name}: {GetDebuggerTransition()}")] + public class FieldChange + { + #region JsonProperties + + [JsonProperty("oldValue")] + // ReSharper disable once InconsistentNaming + private object _oldValue + { + get => From.Value; + set => From.Value = value; + } + + [JsonProperty("value")] + // ReSharper disable once InconsistentNaming + private object _value + { + get => To.Value; + set => To.Value = value; + } + + [JsonProperty("newValue")] + // ReSharper disable once InconsistentNaming + private object _newValue + { + get => To.Value; + set => To.Value = value; + } + + #endregion + + /// + /// Creates an instance of the class. + /// + public FieldChange() + { + From = new Field(); + To = new Field(); + } + + /// + /// Name of the field. + /// + [JsonProperty("name")] + public string Name + { + get => To.Name; + private set + { + From.Name = value; + To.Name = value; + } + } + + /// + /// representing the original value. Can be null. + /// + [JsonIgnore] + public Field From { get; } + + /// + /// representing the new value. Can be null. + /// + [JsonIgnore] + public Field To { get; } + + /// + /// Is this a transition from an older value to a newer one? + /// + [JsonIgnore] + public bool IsTransition => From.Value != null; + + private string GetDebuggerTransition() + { + return IsTransition + ? $"{From.Value} -> {To.Value}" + : To.Value.ToString(); + } + } +} \ No newline at end of file diff --git a/src/YouTrackSharp/Issues/IssuesService.Changeset.cs b/src/YouTrackSharp/Issues/IssuesService.History.cs similarity index 64% rename from src/YouTrackSharp/Issues/IssuesService.Changeset.cs rename to src/YouTrackSharp/Issues/IssuesService.History.cs index c68af0fd..fceba39c 100644 --- a/src/YouTrackSharp/Issues/IssuesService.Changeset.cs +++ b/src/YouTrackSharp/Issues/IssuesService.History.cs @@ -8,14 +8,14 @@ namespace YouTrackSharp.Issues public partial class IssuesService { /// - /// Get changes for a specific issue from the server. + /// Get change history for a specific issue from the server. /// /// Uses the REST API Get Changes of an Issue. - /// Id of the issue to get changes for. - /// for the requested issue . + /// Id of the issue to get change history for. + /// An of for the requested issue . /// When the is null or empty. /// When the call to the remote YouTrack server instance failed. - public async Task GetChangsetForIssue(string issueId) + public async Task> GetChangeHistoryForIssue(string issueId) { if (string.IsNullOrEmpty(issueId)) { @@ -27,7 +27,8 @@ public async Task GetChangsetForIssue(string issueId) response.EnsureSuccessStatusCode(); - return JsonConvert.DeserializeObject(await response.Content.ReadAsStringAsync()); + var wrapper = JsonConvert.DeserializeObject(await response.Content.ReadAsStringAsync()); + return wrapper.Changes; } } } \ No newline at end of file diff --git a/tests/YouTrackSharp.Tests/Integration/Issues/Changeset/GetChangesetForIssue.cs b/tests/YouTrackSharp.Tests/Integration/Issues/History/GetChangeHistoryForIssue.cs similarity index 59% rename from tests/YouTrackSharp.Tests/Integration/Issues/Changeset/GetChangesetForIssue.cs rename to tests/YouTrackSharp.Tests/Integration/Issues/History/GetChangeHistoryForIssue.cs index 76f2ad71..84f9927c 100644 --- a/tests/YouTrackSharp.Tests/Integration/Issues/Changeset/GetChangesetForIssue.cs +++ b/tests/YouTrackSharp.Tests/Integration/Issues/History/GetChangeHistoryForIssue.cs @@ -1,3 +1,5 @@ +using System; +using System.Linq; using System.Threading.Tasks; using Xunit; using YouTrackSharp.Tests.Infrastructure; @@ -7,7 +9,7 @@ namespace YouTrackSharp.Tests.Integration.Issues { public partial class IssuesServiceTests { - public class GetChangesForIssue + public class GetChangeHistoryForIssue { [Fact] public async Task Valid_Connection_Returns_Changeset_For_Issue() @@ -17,10 +19,18 @@ public async Task Valid_Connection_Returns_Changeset_For_Issue() var service = connection.CreateIssuesService(); // Act - var result = await service.GetChangsetForIssue("DP1-1"); + var result = await service.GetChangeHistoryForIssue("DP1-1"); // Assert Assert.NotNull(result); + Assert.True(result.Any()); + + // Get an item and check for two common properties (updaterName & updated) + var firstChange = result.First(); + + Assert.True(firstChange.Fields.Count > 0); + Assert.True(firstChange.ForField("updaterName") != null); + Assert.True(firstChange.ForField("updated") != null && firstChange.ForField("updated").To.AsDateTime() < DateTime.UtcNow); } [Fact] @@ -31,7 +41,7 @@ public async Task Invalid_Connection_Throws_UnauthorizedConnectionException() // Act & Assert await Assert.ThrowsAsync( - async () => await service.GetChangsetForIssue("NOT-EXIST")); + async () => await service.GetChangeHistoryForIssue("NOT-EXIST")); } } } From dcee592fd04cd6a6caabbcec502e74bb51f0806e Mon Sep 17 00:00:00 2001 From: Maarten Balliauw Date: Tue, 24 Oct 2017 14:20:49 +0200 Subject: [PATCH 8/9] JsonSerializationException serializing/deserializing system-wide time tracking settings #63 --- .../Management/SystemWideTimeTrackingSettings.cs | 4 ++-- .../Management/TimeTrackingManagementService.cs | 8 ++++---- .../GetSystemWideTimeTrackingSettings.cs | 10 +++++----- .../UpdateSystemWideTimeTrackingSettings.cs | 12 ++++++------ 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/YouTrackSharp/Management/SystemWideTimeTrackingSettings.cs b/src/YouTrackSharp/Management/SystemWideTimeTrackingSettings.cs index c071ed11..1d779493 100644 --- a/src/YouTrackSharp/Management/SystemWideTimeTrackingSettings.cs +++ b/src/YouTrackSharp/Management/SystemWideTimeTrackingSettings.cs @@ -13,7 +13,7 @@ public class SystemWideTimeTrackingSettings /// public SystemWideTimeTrackingSettings() { - WorkDays = new List>(); + WorkDays = new List(); } /// @@ -32,6 +32,6 @@ public SystemWideTimeTrackingSettings() /// WorkDays A Week. /// [JsonProperty("workWeek")] - public ICollection> WorkDays { get; set; } + public ICollection WorkDays { get; set; } } } \ No newline at end of file diff --git a/src/YouTrackSharp/Management/TimeTrackingManagementService.cs b/src/YouTrackSharp/Management/TimeTrackingManagementService.cs index 1eac3cdb..01e2d3cf 100644 --- a/src/YouTrackSharp/Management/TimeTrackingManagementService.cs +++ b/src/YouTrackSharp/Management/TimeTrackingManagementService.cs @@ -37,8 +37,8 @@ public async Task GetSystemWideTimeTrackingSetti var response = await client.GetAsync("rest/admin/timetracking"); response.EnsureSuccessStatusCode(); - - return JsonConvert.DeserializeObject(await response.Content.ReadAsStringAsync()); + + return JsonConvert.DeserializeObject(await response.Content.ReadAsStringAsync()); } @@ -64,8 +64,8 @@ public async Task UpdateSystemWideTimeTrackingSettings(SystemWideTimeTrackingSet if (response.StatusCode == HttpStatusCode.BadRequest) { - // Try reading the error message - var responseJson = JObject.Parse(await response.Content.ReadAsStringAsync()); + // Try reading the error message + var responseJson = JObject.Parse(await response.Content.ReadAsStringAsync()); if (responseJson["value"] != null) { throw new YouTrackErrorException(responseJson["value"].Value()); diff --git a/tests/YouTrackSharp.Tests/Integration/Management/TimeTracking/GetSystemWideTimeTrackingSettings.cs b/tests/YouTrackSharp.Tests/Integration/Management/TimeTracking/GetSystemWideTimeTrackingSettings.cs index 102a97cc..1b10d261 100644 --- a/tests/YouTrackSharp.Tests/Integration/Management/TimeTracking/GetSystemWideTimeTrackingSettings.cs +++ b/tests/YouTrackSharp.Tests/Integration/Management/TimeTracking/GetSystemWideTimeTrackingSettings.cs @@ -24,11 +24,11 @@ public async Task Valid_Connection_Gets_Systemwide_TimeTracking_Settings() Assert.Equal(5, results.DaysAWeek); Assert.True(results.HoursADay > 0); - Assert.Equal(1, workdays[0].Value); - Assert.Equal(2, workdays[1].Value); - Assert.Equal(3, workdays[2].Value); - Assert.Equal(4, workdays[3].Value); - Assert.Equal(5, workdays[4].Value); + Assert.Equal(1, workdays[0]); + Assert.Equal(2, workdays[1]); + Assert.Equal(3, workdays[2]); + Assert.Equal(4, workdays[3]); + Assert.Equal(5, workdays[4]); } } } diff --git a/tests/YouTrackSharp.Tests/Integration/Management/TimeTracking/UpdateSystemWideTimeTrackingSettings.cs b/tests/YouTrackSharp.Tests/Integration/Management/TimeTracking/UpdateSystemWideTimeTrackingSettings.cs index 8116a013..ca48293f 100644 --- a/tests/YouTrackSharp.Tests/Integration/Management/TimeTracking/UpdateSystemWideTimeTrackingSettings.cs +++ b/tests/YouTrackSharp.Tests/Integration/Management/TimeTracking/UpdateSystemWideTimeTrackingSettings.cs @@ -25,13 +25,13 @@ public async Task Valid_Connection_Updates_Systemwide_TimeTracking_Settings() var timeSettings = new SystemWideTimeTrackingSettings { HoursADay = hoursADay, - WorkDays = new List>(5) + WorkDays = new List(5) }; - timeSettings.WorkDays.Add(new SubValue { Value = 1 }); - timeSettings.WorkDays.Add(new SubValue { Value = 2 }); - timeSettings.WorkDays.Add(new SubValue { Value = 3 }); - timeSettings.WorkDays.Add(new SubValue { Value = 4 }); - timeSettings.WorkDays.Add(new SubValue { Value = 5 }); + timeSettings.WorkDays.Add(1); + timeSettings.WorkDays.Add(2); + timeSettings.WorkDays.Add(3); + timeSettings.WorkDays.Add(4); + timeSettings.WorkDays.Add(5); await service.UpdateSystemWideTimeTrackingSettings(timeSettings); From a073486e2ef6ac1b2dc8f018e9b93c97232095d0 Mon Sep 17 00:00:00 2001 From: Maarten Balliauw Date: Tue, 24 Oct 2017 14:24:36 +0200 Subject: [PATCH 9/9] Update version prefix --- YouTrackSharp.sln.DotSettings | 5 ++++- src/YouTrackSharp/YouTrackSharp.csproj | 2 +- tests/YouTrackSharp.Tests/YouTrackSharp.Tests.csproj | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/YouTrackSharp.sln.DotSettings b/YouTrackSharp.sln.DotSettings index d967c518..e11d91d8 100644 --- a/YouTrackSharp.sln.DotSettings +++ b/YouTrackSharp.sln.DotSettings @@ -3,4 +3,7 @@ <?xml version="1.0" encoding="utf-16"?><Profile name="YouTrackSharp"><AspOptimizeRegisterDirectives>True</AspOptimizeRegisterDirectives><HtmlReformatCode>True</HtmlReformatCode><JsInsertSemicolon>True</JsInsertSemicolon><FormatAttributeQuoteDescriptor>True</FormatAttributeQuoteDescriptor><CorrectVariableKindsDescriptor>True</CorrectVariableKindsDescriptor><VariablesToInnerScopesDescriptor>True</VariablesToInnerScopesDescriptor><StringToTemplatesDescriptor>True</StringToTemplatesDescriptor><JsReformatCode>True</JsReformatCode><RemoveRedundantQualifiersTs>True</RemoveRedundantQualifiersTs><OptimizeImportsTs>True</OptimizeImportsTs><OptimizeReferenceCommentsTs>True</OptimizeReferenceCommentsTs><PublicModifierStyleTs>True</PublicModifierStyleTs><ExplicitAnyTs>True</ExplicitAnyTs><TypeAnnotationStyleTs>True</TypeAnnotationStyleTs><RelativePathStyleTs>True</RelativePathStyleTs><AsInsteadOfCastTs>True</AsInsteadOfCastTs><CSCodeStyleAttributes ArrangeTypeAccessModifier="True" ArrangeTypeMemberAccessModifier="True" SortModifiers="True" RemoveRedundantParentheses="True" AddMissingParentheses="True" ArrangeBraces="True" ArrangeAttributes="True" ArrangeArgumentsStyle="True" ArrangeCodeBodyStyle="False" /><CSEnforceVarKeywordUsageSettings>True</CSEnforceVarKeywordUsageSettings><RemoveCodeRedundanciesVB>True</RemoveCodeRedundanciesVB><CssAlphabetizeProperties>True</CssAlphabetizeProperties><VBOptimizeImports>True</VBOptimizeImports><VBShortenReferences>True</VBShortenReferences><CSUseAutoProperty>True</CSUseAutoProperty><CSMakeAutoPropertyGetOnly>True</CSMakeAutoPropertyGetOnly><CSArrangeQualifiers>True</CSArrangeQualifiers><CSFixBuiltinTypeReferences>True</CSFixBuiltinTypeReferences><CssReformatCode>True</CssReformatCode><VBReformatCode>True</VBReformatCode><VBFormatDocComments>True</VBFormatDocComments><CSOptimizeUsings><OptimizeUsings>True</OptimizeUsings><EmbraceInRegion>False</EmbraceInRegion><RegionName></RegionName></CSOptimizeUsings><CSShortenReferences>True</CSShortenReferences><CSReformatCode>True</CSReformatCode></Profile> YouTrackSharp False - False \ No newline at end of file + False + True + True + True \ No newline at end of file diff --git a/src/YouTrackSharp/YouTrackSharp.csproj b/src/YouTrackSharp/YouTrackSharp.csproj index 503c8a55..8d116114 100644 --- a/src/YouTrackSharp/YouTrackSharp.csproj +++ b/src/YouTrackSharp/YouTrackSharp.csproj @@ -17,7 +17,7 @@ JetBrains https://github.com/JetBrains/YouTrackSharp.git Git - 3.1.0 + 3.2.0 diff --git a/tests/YouTrackSharp.Tests/YouTrackSharp.Tests.csproj b/tests/YouTrackSharp.Tests/YouTrackSharp.Tests.csproj index 98e647e0..098fa376 100644 --- a/tests/YouTrackSharp.Tests/YouTrackSharp.Tests.csproj +++ b/tests/YouTrackSharp.Tests/YouTrackSharp.Tests.csproj @@ -13,7 +13,7 @@ https://raw.githubusercontent.com/JetBrains/YouTrackSharp/master/logo.png https://github.com/JetBrains/YouTrackSharp.git Git - 3.1.0 + 3.2.0 False