diff --git a/Dapplo.Confluence.PCL/Properties/AssemblyInfo.cs b/Dapplo.Confluence.PCL/Properties/AssemblyInfo.cs index c926b42..44acb07 100644 --- a/Dapplo.Confluence.PCL/Properties/AssemblyInfo.cs +++ b/Dapplo.Confluence.PCL/Properties/AssemblyInfo.cs @@ -1,25 +1,29 @@ -// Dapplo - building blocks for desktop applications -// Copyright (C) 2015-2016 Dapplo +#region Dapplo 2016 - GNU Lesser General Public License + +// Dapplo - building blocks for .NET applications +// Copyright (C) 2016 Dapplo // -// For more information see: http://dapplo.net/ -// Dapplo repositories are hosted on GitHub: https://github.com/dapplo +// For more information see: http://dapplo.net/ +// Dapplo repositories are hosted on GitHub: https://github.com/dapplo // -// This file is part of Dapplo.Confluence +// This file is part of Dapplo.Confluence // -// Dapplo.Confluence is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. +// Dapplo.Confluence is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // -// Dapplo.Confluence is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. +// Dapplo.Confluence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. // -// You should have a copy of the GNU Lesser General Public License -// along with Dapplo.Confluence. If not, see . +// You should have a copy of the GNU Lesser General Public License +// along with Dapplo.Confluence. If not, see . + +#endregion -#region using +#region Usings using System.Reflection; using System.Resources; diff --git a/Dapplo.Confluence.Shared/ConfluenceApi.cs b/Dapplo.Confluence.Shared/ConfluenceApi.cs index b41d539..78baff1 100644 --- a/Dapplo.Confluence.Shared/ConfluenceApi.cs +++ b/Dapplo.Confluence.Shared/ConfluenceApi.cs @@ -1,25 +1,29 @@ -// Dapplo - building blocks for desktop applications -// Copyright (C) 2015-2016 Dapplo +#region Dapplo 2016 - GNU Lesser General Public License + +// Dapplo - building blocks for .NET applications +// Copyright (C) 2016 Dapplo // -// For more information see: http://dapplo.net/ -// Dapplo repositories are hosted on GitHub: https://github.com/dapplo +// For more information see: http://dapplo.net/ +// Dapplo repositories are hosted on GitHub: https://github.com/dapplo // -// This file is part of Dapplo.Confluence +// This file is part of Dapplo.Confluence // -// Dapplo.Confluence is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. +// Dapplo.Confluence is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // -// Dapplo.Confluence is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. +// Dapplo.Confluence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. // -// You should have a copy of the GNU Lesser General Public License -// along with Dapplo.Confluence. If not, see . +// You should have a copy of the GNU Lesser General Public License +// along with Dapplo.Confluence. If not, see . + +#endregion -#region using +#region Usings using System; using System.Collections.Generic; @@ -77,6 +81,33 @@ public ConfluenceApi(Uri baseUri, IHttpSettings httpSettings = null) }; } + #region Read + + /// + /// Retrieve the picture for the supplied Picture entity + /// + /// the type to return the result into. e.g. Bitmap,BitmapSource or MemoryStream + /// Picture from User, Space, History etc + /// CancellationToken + /// Bitmap,BitmapSource or MemoryStream (etc) depending on TResponse + public async Task GetPictureAsync(Picture picture, CancellationToken cancellationToken = default(CancellationToken)) + where TResponse : class + { + PromoteContext(); + var pictureUriBuilder = new UriBuilder(ConfluenceApiBaseUri) + { + Path = picture.Path + }; + var response = await pictureUriBuilder.Uri.GetAsAsync>(cancellationToken).ConfigureAwait(false); + if (response.HasError) + { + throw new Exception(response.ErrorResponse); + } + return response.Response; + } + + #endregion + #region Supporting /// @@ -167,14 +198,17 @@ public async Task> GetAttachmentsAsync(string contentId, Canc } /// - /// Delete attachment - /// Can't work yet, see CONF-36015 + /// Delete attachment + /// Can't work yet, see CONF-36015 /// /// Attachment which needs to be deleted /// cancellationToken public async Task DeleteAttachmentAsync(Attachment attachment, CancellationToken cancellationToken = default(CancellationToken)) { - var contentUri = ConfluenceDownloadBaseUri.AppendSegments("json","removeattachmentversion.action").ExtendQuery("pageId",attachment.Container.Id).ExtendQuery("fileName",attachment.Title); + var contentUri = + ConfluenceDownloadBaseUri.AppendSegments("json", "removeattachmentversion.action") + .ExtendQuery("pageId", attachment.Container.Id) + .ExtendQuery("fileName", attachment.Title); PromoteContext(); await contentUri.GetAsAsync(cancellationToken).ConfigureAwait(false); @@ -217,7 +251,8 @@ public async Task GetAttachmentContentAsync(Attachment att /// true if the space needs to be private /// /// created Space - public async Task CreateSpaceAsync(string key, string name, string description, bool isPrivate = false, CancellationToken cancellationToken = default(CancellationToken)) + public async Task CreateSpaceAsync(string key, string name, string description, bool isPrivate = false, + CancellationToken cancellationToken = default(CancellationToken)) { var space = new Space { @@ -339,33 +374,6 @@ public async Task> GetSpacesAsync(CancellationToken cancellationTok #endregion - #region Read - - /// - /// Retrieve the picture for the supplied Picture entity - /// - /// the type to return the result into. e.g. Bitmap,BitmapSource or MemoryStream - /// Picture from User, Space, History etc - /// CancellationToken - /// Bitmap,BitmapSource or MemoryStream (etc) depending on TResponse - public async Task GetPictureAsync(Picture picture, CancellationToken cancellationToken = default(CancellationToken)) - where TResponse : class - { - PromoteContext(); - var pictureUriBuilder = new UriBuilder(ConfluenceApiBaseUri) - { - Path = picture.Path - }; - var response = await pictureUriBuilder.Uri.GetAsAsync>(cancellationToken).ConfigureAwait(false); - if (response.HasError) - { - throw new Exception(response.ErrorResponse); - } - return response.Response; - } - - #endregion - #region Content /// @@ -400,7 +408,7 @@ public async Task GetContentAsync(string contentId, CancellationToken c public async Task GetContentHistoryAsync(string contentId, CancellationToken cancellationToken = default(CancellationToken)) { var historyUri = ConfluenceApiBaseUri.AppendSegments("content", contentId, "history"); - + PromoteContext(); var response = await historyUri.GetAsAsync>(cancellationToken).ConfigureAwait(false); @@ -412,10 +420,13 @@ public async Task GetContentHistoryAsync(string contentId, Cancellation } /// - /// Delete content (attachments are also content) + /// Delete content (attachments are also content) /// /// ID for the content which needs to be deleted - /// If the content is trashable, you will need to call DeleteAsyc twice, second time with isTrashed = true + /// + /// If the content is trashable, you will need to call DeleteAsyc twice, second time with isTrashed + /// = true + /// /// cancellationToken public async Task DeleteContentAsync(string contentId, bool isTrashed = false, CancellationToken cancellationToken = default(CancellationToken)) { @@ -434,7 +445,7 @@ public async Task DeleteContentAsync(string contentId, bool isTrashed = false, C } /// - /// Create content + /// Create content /// /// Type of content, usually page /// Title for the content @@ -464,7 +475,7 @@ public async Task CreateContentAsync(string type, string title, string } }; PromoteContext(); - var response = await contentUri.PostAsync>(newPage,cancellationToken).ConfigureAwait(false); + var response = await contentUri.PostAsync>(newPage, cancellationToken).ConfigureAwait(false); if (response.HasError) { throw new Exception(response.ErrorResponse.Message); @@ -539,7 +550,8 @@ public async Task> SearchAsync(string cql, string cqlContext = n /// Maximum number of results returned, default is 20 /// CancellationToken /// Results with content items - public async Task> GetContentByTitleAsync(string spaceKey, string title, int start = 0, int limit = 20, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetContentByTitleAsync(string spaceKey, string title, int start = 0, int limit = 20, + CancellationToken cancellationToken = default(CancellationToken)) { PromoteContext(); var searchUri = ConfluenceApiBaseUri.AppendSegments("content").ExtendQuery(new Dictionary @@ -575,6 +587,7 @@ public async Task> GetContentByTitleAsync(string spaceKey, strin #endregion #region User + /// /// Get currrent user information, introduced with 6.6 /// See: https://docs.atlassian.com/confluence/REST/latest/#user-getCurrent @@ -631,7 +644,7 @@ public async Task GetUserAsync(string username, CancellationToken cancella } /// - /// Get the groups for a user + /// Get the groups for a user /// /// string with username /// CancellationToken diff --git a/Dapplo.Confluence.Shared/ConfluenceConfig.cs b/Dapplo.Confluence.Shared/ConfluenceConfig.cs index b6fb8ec..4ebe611 100644 --- a/Dapplo.Confluence.Shared/ConfluenceConfig.cs +++ b/Dapplo.Confluence.Shared/ConfluenceConfig.cs @@ -1,23 +1,27 @@ -// Dapplo - building blocks for desktop applications -// Copyright (C) 2015-2016 Dapplo +#region Dapplo 2016 - GNU Lesser General Public License + +// Dapplo - building blocks for .NET applications +// Copyright (C) 2016 Dapplo // -// For more information see: http://dapplo.net/ -// Dapplo repositories are hosted on GitHub: https://github.com/dapplo +// For more information see: http://dapplo.net/ +// Dapplo repositories are hosted on GitHub: https://github.com/dapplo // -// This file is part of Dapplo.Confluence +// This file is part of Dapplo.Confluence // -// Dapplo.Confluence is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. +// Dapplo.Confluence is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // -// Dapplo.Confluence is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. +// Dapplo.Confluence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. // -// You should have a copy of the GNU Lesser General Public License -// along with Dapplo.Confluence. If not, see . +// You should have a copy of the GNU Lesser General Public License +// along with Dapplo.Confluence. If not, see . + +#endregion namespace Dapplo.Confluence { @@ -39,7 +43,7 @@ public static class ConfluenceConfig /// /// The values that are expanded in the GetContent result /// - public static string[] ExpandGetContent { get; set; } = {"body","body.view", "version"}; + public static string[] ExpandGetContent { get; set; } = {"body", "body.view", "version"}; /// /// The values that are expanded in the GetContentByTitle results @@ -49,13 +53,13 @@ public static class ConfluenceConfig /// /// The values that are expanded in the GetSpace result /// - public static string[] ExpandGetSpace { get; set; } = { "icon", "description.plain", "homepage" }; + public static string[] ExpandGetSpace { get; set; } = {"icon", "description.plain", "homepage"}; /// /// The values that are expanded in the GetSpaces results /// - public static string[] ExpandGetSpaces { get; set; } = { "icon", "description.plain", "homepage" }; + public static string[] ExpandGetSpaces { get; set; } = {"icon", "description.plain", "homepage"}; /// /// The values that are expanded in the Search results diff --git a/Dapplo.Confluence.Shared/Dapplo.Confluence.Shared.projitems b/Dapplo.Confluence.Shared/Dapplo.Confluence.Shared.projitems index 36a82be..4e01ff3 100644 --- a/Dapplo.Confluence.Shared/Dapplo.Confluence.Shared.projitems +++ b/Dapplo.Confluence.Shared/Dapplo.Confluence.Shared.projitems @@ -13,6 +13,7 @@ + diff --git a/Dapplo.Confluence.Shared/Entities/Attachment.cs b/Dapplo.Confluence.Shared/Entities/Attachment.cs index e98ebd3..f8ab2e8 100644 --- a/Dapplo.Confluence.Shared/Entities/Attachment.cs +++ b/Dapplo.Confluence.Shared/Entities/Attachment.cs @@ -1,25 +1,29 @@ -// Dapplo - building blocks for desktop applications -// Copyright (C) 2015-2016 Dapplo +#region Dapplo 2016 - GNU Lesser General Public License + +// Dapplo - building blocks for .NET applications +// Copyright (C) 2016 Dapplo // -// For more information see: http://dapplo.net/ -// Dapplo repositories are hosted on GitHub: https://github.com/dapplo +// For more information see: http://dapplo.net/ +// Dapplo repositories are hosted on GitHub: https://github.com/dapplo // -// This file is part of Dapplo.Confluence +// This file is part of Dapplo.Confluence // -// Dapplo.Confluence is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. +// Dapplo.Confluence is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // -// Dapplo.Confluence is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. +// Dapplo.Confluence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. // -// You should have a copy of the GNU Lesser General Public License -// along with Dapplo.Confluence. If not, see . +// You should have a copy of the GNU Lesser General Public License +// along with Dapplo.Confluence. If not, see . + +#endregion -#region using +#region Usings using System.Runtime.Serialization; @@ -35,43 +39,43 @@ namespace Dapplo.Confluence.Entities public class Attachment { /// - /// The container where this attachment hangs, this is not filled unless expand=container + /// The container where this attachment hangs, this is not filled unless expand=container /// [DataMember(Name = "container")] public Content Container { get; set; } /// - /// The ID of the attachment + /// The ID of the attachment /// [DataMember(Name = "id")] public string Id { get; set; } /// - /// Different links for this entity, depending on the entry + /// Different links for this entity, depending on the entry /// [DataMember(Name = "_links")] public Links Links { get; set; } /// - /// Additional meta-data for the attachment, like the comment + /// Additional meta-data for the attachment, like the comment /// [DataMember(Name = "metadata")] public Metadata Metadata { get; set; } /// - /// Title for the attachment + /// Title for the attachment /// [DataMember(Name = "title")] public string Title { get; set; } /// - /// Type of attachment + /// Type of attachment /// [DataMember(Name = "type")] public string Type { get; set; } /// - /// Version information on the attachment, this is not filled unless expand=version + /// Version information on the attachment, this is not filled unless expand=version /// [DataMember(Name = "version")] public Version Version { get; set; } diff --git a/Dapplo.Confluence.Shared/Entities/Body.cs b/Dapplo.Confluence.Shared/Entities/Body.cs index 4472fa9..f5d6db7 100644 --- a/Dapplo.Confluence.Shared/Entities/Body.cs +++ b/Dapplo.Confluence.Shared/Entities/Body.cs @@ -1,25 +1,29 @@ -// Dapplo - building blocks for desktop applications -// Copyright (C) 2015-2016 Dapplo +#region Dapplo 2016 - GNU Lesser General Public License + +// Dapplo - building blocks for .NET applications +// Copyright (C) 2016 Dapplo // -// For more information see: http://dapplo.net/ -// Dapplo repositories are hosted on GitHub: https://github.com/dapplo +// For more information see: http://dapplo.net/ +// Dapplo repositories are hosted on GitHub: https://github.com/dapplo // -// This file is part of Dapplo.Confluence +// This file is part of Dapplo.Confluence // -// Dapplo.Confluence is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. +// Dapplo.Confluence is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // -// Dapplo.Confluence is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. +// Dapplo.Confluence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. // -// You should have a copy of the GNU Lesser General Public License -// along with Dapplo.Confluence. If not, see . +// You should have a copy of the GNU Lesser General Public License +// along with Dapplo.Confluence. If not, see . + +#endregion -#region using +#region Usings using System.Runtime.Serialization; @@ -35,13 +39,13 @@ namespace Dapplo.Confluence.Entities public class Body { /// - /// View for Body + /// View for Body /// [DataMember(Name = "view")] public BodyContent View { get; set; } /// - /// Storage for content, used when creating + /// Storage for content, used when creating /// [DataMember(Name = "storage")] public BodyContent Storage { get; set; } diff --git a/Dapplo.Confluence.Shared/Entities/BodyContent.cs b/Dapplo.Confluence.Shared/Entities/BodyContent.cs index e65a991..d80764c 100644 --- a/Dapplo.Confluence.Shared/Entities/BodyContent.cs +++ b/Dapplo.Confluence.Shared/Entities/BodyContent.cs @@ -1,25 +1,29 @@ -// Dapplo - building blocks for desktop applications -// Copyright (C) 2015-2016 Dapplo +#region Dapplo 2016 - GNU Lesser General Public License + +// Dapplo - building blocks for .NET applications +// Copyright (C) 2016 Dapplo // -// For more information see: http://dapplo.net/ -// Dapplo repositories are hosted on GitHub: https://github.com/dapplo +// For more information see: http://dapplo.net/ +// Dapplo repositories are hosted on GitHub: https://github.com/dapplo // -// This file is part of Dapplo.Confluence +// This file is part of Dapplo.Confluence // -// Dapplo.Confluence is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. +// Dapplo.Confluence is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // -// Dapplo.Confluence is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. +// Dapplo.Confluence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. // -// You should have a copy of the GNU Lesser General Public License -// along with Dapplo.Confluence. If not, see . +// You should have a copy of the GNU Lesser General Public License +// along with Dapplo.Confluence. If not, see . + +#endregion -#region using +#region Usings using System.Runtime.Serialization; diff --git a/Dapplo.Confluence.Shared/Entities/Child.cs b/Dapplo.Confluence.Shared/Entities/Child.cs index 976e410..6f853f6 100644 --- a/Dapplo.Confluence.Shared/Entities/Child.cs +++ b/Dapplo.Confluence.Shared/Entities/Child.cs @@ -1,25 +1,29 @@ -// Dapplo - building blocks for desktop applications -// Copyright (C) 2015-2016 Dapplo +#region Dapplo 2016 - GNU Lesser General Public License + +// Dapplo - building blocks for .NET applications +// Copyright (C) 2016 Dapplo // -// For more information see: http://dapplo.net/ -// Dapplo repositories are hosted on GitHub: https://github.com/dapplo +// For more information see: http://dapplo.net/ +// Dapplo repositories are hosted on GitHub: https://github.com/dapplo // -// This file is part of Dapplo.Confluence +// This file is part of Dapplo.Confluence // -// Dapplo.Confluence is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. +// Dapplo.Confluence is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // -// Dapplo.Confluence is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. +// Dapplo.Confluence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. // -// You should have a copy of the GNU Lesser General Public License -// along with Dapplo.Confluence. If not, see . +// You should have a copy of the GNU Lesser General Public License +// along with Dapplo.Confluence. If not, see . + +#endregion -#region using +#region Usings using System.Collections.Generic; using System.Runtime.Serialization; @@ -36,19 +40,19 @@ namespace Dapplo.Confluence.Entities public class Child { /// - /// The values that are expandable + /// The values that are expandable /// [DataMember(Name = "_expandable")] public IDictionary Expandables { get; set; } /// - /// Different links for this entity, depending on the entry + /// Different links for this entity, depending on the entry /// [DataMember(Name = "_links")] public Links Links { get; set; } /// - /// Results with pages + /// Results with pages /// [DataMember(Name = "page")] public Result Result { get; set; } diff --git a/Dapplo.Confluence.Shared/Entities/Content.cs b/Dapplo.Confluence.Shared/Entities/Content.cs index 5b384ad..50776e1 100644 --- a/Dapplo.Confluence.Shared/Entities/Content.cs +++ b/Dapplo.Confluence.Shared/Entities/Content.cs @@ -1,25 +1,29 @@ -// Dapplo - building blocks for desktop applications -// Copyright (C) 2015-2016 Dapplo +#region Dapplo 2016 - GNU Lesser General Public License + +// Dapplo - building blocks for .NET applications +// Copyright (C) 2016 Dapplo // -// For more information see: http://dapplo.net/ -// Dapplo repositories are hosted on GitHub: https://github.com/dapplo +// For more information see: http://dapplo.net/ +// Dapplo repositories are hosted on GitHub: https://github.com/dapplo // -// This file is part of Dapplo.Confluence +// This file is part of Dapplo.Confluence // -// Dapplo.Confluence is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. +// Dapplo.Confluence is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // -// Dapplo.Confluence is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. +// Dapplo.Confluence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. // -// You should have a copy of the GNU Lesser General Public License -// along with Dapplo.Confluence. If not, see . +// You should have a copy of the GNU Lesser General Public License +// along with Dapplo.Confluence. If not, see . + +#endregion -#region using +#region Usings using System.Collections.Generic; using System.Runtime.Serialization; @@ -53,6 +57,12 @@ public class Content [DataMember(Name = "id")] public string Id { get; set; } + /// + /// History information for the content, this is not filled unless expand=history + /// + [DataMember(Name = "history")] + public History History { get; set; } + /// /// Different links for this entity, depending on the entry /// diff --git a/Dapplo.Confluence.Shared/Entities/Description.cs b/Dapplo.Confluence.Shared/Entities/Description.cs index 7847eb1..e0806c7 100644 --- a/Dapplo.Confluence.Shared/Entities/Description.cs +++ b/Dapplo.Confluence.Shared/Entities/Description.cs @@ -1,25 +1,29 @@ -// Dapplo - building blocks for desktop applications -// Copyright (C) 2015-2016 Dapplo +#region Dapplo 2016 - GNU Lesser General Public License + +// Dapplo - building blocks for .NET applications +// Copyright (C) 2016 Dapplo // -// For more information see: http://dapplo.net/ -// Dapplo repositories are hosted on GitHub: https://github.com/dapplo +// For more information see: http://dapplo.net/ +// Dapplo repositories are hosted on GitHub: https://github.com/dapplo // -// This file is part of Dapplo.Confluence +// This file is part of Dapplo.Confluence // -// Dapplo.Confluence is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. +// Dapplo.Confluence is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // -// Dapplo.Confluence is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. +// Dapplo.Confluence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. // -// You should have a copy of the GNU Lesser General Public License -// along with Dapplo.Confluence. If not, see . +// You should have a copy of the GNU Lesser General Public License +// along with Dapplo.Confluence. If not, see . + +#endregion -#region using +#region Usings using System.Runtime.Serialization; @@ -35,7 +39,7 @@ namespace Dapplo.Confluence.Entities public class Description { /// - /// Plain text + /// Plain text /// [DataMember(Name = "plain")] public Plain Plain { get; set; } diff --git a/Dapplo.Confluence.Shared/Entities/Error.cs b/Dapplo.Confluence.Shared/Entities/Error.cs index 5aea3da..62f37c0 100644 --- a/Dapplo.Confluence.Shared/Entities/Error.cs +++ b/Dapplo.Confluence.Shared/Entities/Error.cs @@ -1,25 +1,29 @@ -// Dapplo - building blocks for desktop applications -// Copyright (C) 2015-2016 Dapplo +#region Dapplo 2016 - GNU Lesser General Public License + +// Dapplo - building blocks for .NET applications +// Copyright (C) 2016 Dapplo // -// For more information see: http://dapplo.net/ -// Dapplo repositories are hosted on GitHub: https://github.com/dapplo +// For more information see: http://dapplo.net/ +// Dapplo repositories are hosted on GitHub: https://github.com/dapplo // -// This file is part of Dapplo.Confluence +// This file is part of Dapplo.Confluence // -// Dapplo.Confluence is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. +// Dapplo.Confluence is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // -// Dapplo.Confluence is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. +// Dapplo.Confluence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. // -// You should have a copy of the GNU Lesser General Public License -// along with Dapplo.Confluence. If not, see . +// You should have a copy of the GNU Lesser General Public License +// along with Dapplo.Confluence. If not, see . + +#endregion -#region using +#region Usings using System.Runtime.Serialization; @@ -34,13 +38,13 @@ namespace Dapplo.Confluence.Entities public class Error { /// - /// Error message from Confluence + /// Error message from Confluence /// [DataMember(Name = "message")] public string Message { get; set; } /// - /// Confluence status code + /// Confluence status code /// [DataMember(Name = "statusCode")] public int StatusCode { get; set; } diff --git a/Dapplo.Confluence.Shared/Entities/Group.cs b/Dapplo.Confluence.Shared/Entities/Group.cs index 52fcd75..4039ff6 100644 --- a/Dapplo.Confluence.Shared/Entities/Group.cs +++ b/Dapplo.Confluence.Shared/Entities/Group.cs @@ -1,25 +1,29 @@ -// Dapplo - building blocks for desktop applications -// Copyright (C) 2015-2016 Dapplo +#region Dapplo 2016 - GNU Lesser General Public License + +// Dapplo - building blocks for .NET applications +// Copyright (C) 2016 Dapplo // -// For more information see: http://dapplo.net/ -// Dapplo repositories are hosted on GitHub: https://github.com/dapplo +// For more information see: http://dapplo.net/ +// Dapplo repositories are hosted on GitHub: https://github.com/dapplo // -// This file is part of Dapplo.Confluence +// This file is part of Dapplo.Confluence // -// Dapplo.Confluence is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. +// Dapplo.Confluence is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // -// Dapplo.Confluence is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. +// Dapplo.Confluence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. // -// You should have a copy of the GNU Lesser General Public License -// along with Dapplo.Confluence. If not, see . +// You should have a copy of the GNU Lesser General Public License +// along with Dapplo.Confluence. If not, see . + +#endregion -#region using +#region Usings using System.Runtime.Serialization; @@ -35,13 +39,13 @@ namespace Dapplo.Confluence.Entities public class Group { /// - /// Name of the group + /// Name of the group /// [DataMember(Name = "name")] public string Name { get; set; } /// - /// Type + /// Type /// [DataMember(Name = "type")] public string Type { get; set; } diff --git a/Dapplo.Confluence.Shared/Entities/History.cs b/Dapplo.Confluence.Shared/Entities/History.cs index 34c4bfe..da7f6dc 100644 --- a/Dapplo.Confluence.Shared/Entities/History.cs +++ b/Dapplo.Confluence.Shared/Entities/History.cs @@ -1,25 +1,29 @@ -// Dapplo - building blocks for desktop applications -// Copyright (C) 2015-2016 Dapplo +#region Dapplo 2016 - GNU Lesser General Public License + +// Dapplo - building blocks for .NET applications +// Copyright (C) 2016 Dapplo // -// For more information see: http://dapplo.net/ -// Dapplo repositories are hosted on GitHub: https://github.com/dapplo +// For more information see: http://dapplo.net/ +// Dapplo repositories are hosted on GitHub: https://github.com/dapplo // -// This file is part of Dapplo.Confluence +// This file is part of Dapplo.Confluence // -// Dapplo.Confluence is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. +// Dapplo.Confluence is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // -// Dapplo.Confluence is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. +// Dapplo.Confluence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. // -// You should have a copy of the GNU Lesser General Public License -// along with Dapplo.Confluence. If not, see . +// You should have a copy of the GNU Lesser General Public License +// along with Dapplo.Confluence. If not, see . + +#endregion -#region using +#region Usings using System; using System.Collections.Generic; @@ -37,31 +41,37 @@ namespace Dapplo.Confluence.Entities public class History { /// - /// User who created it + /// User who created it /// [DataMember(Name = "createdBy")] public User CreatedBy { get; set; } /// - /// Created data + /// Last updated information + /// + [DataMember(Name = "lastUpdated")] + public LastUpdated LastUpdated { get; set; } + + /// + /// Created data /// [DataMember(Name = "createdDate")] public DateTimeOffset CreatedDate { get; set; } /// - /// The values that are expandable + /// The values that are expandable /// [DataMember(Name = "_expandable")] public IDictionary Expandables { get; set; } /// - /// Is this history entity the latest entry? + /// Is this history entity the latest entry? /// [DataMember(Name = "latest")] public bool Latest { get; set; } /// - /// Different links for this entity, depending on the entry + /// Different links for this entity, depending on the entry /// [DataMember(Name = "_links")] public Links Links { get; set; } diff --git a/Dapplo.Confluence.Shared/Entities/LastUpdated.cs b/Dapplo.Confluence.Shared/Entities/LastUpdated.cs new file mode 100644 index 0000000..e9fa49d --- /dev/null +++ b/Dapplo.Confluence.Shared/Entities/LastUpdated.cs @@ -0,0 +1,73 @@ +#region Dapplo 2016 - GNU Lesser General Public License + +// Dapplo - building blocks for .NET applications +// Copyright (C) 2016 Dapplo +// +// For more information see: http://dapplo.net/ +// Dapplo repositories are hosted on GitHub: https://github.com/dapplo +// +// This file is part of Dapplo.Confluence +// +// Dapplo.Confluence is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Dapplo.Confluence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have a copy of the GNU Lesser General Public License +// along with Dapplo.Confluence. If not, see . + +#endregion + +#region Usings + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +#endregion + +namespace Dapplo.Confluence.Entities +{ + /// + /// LastUpdated information + /// See: https://docs.atlassian.com/confluence/REST/latest + /// + [DataContract] + public class LastUpdated + { + /// + /// User who updated + /// + [DataMember(Name = "by")] + public User By { get; set; } + + /// + /// When the last update was + /// + [DataMember(Name = "when")] + public DateTimeOffset When { get; set; } + + /// + /// Friendly representation for When + /// + [DataMember(Name = "friendlyWhen")] + public string FriendlyWhen { get; set; } + + /// + /// The values that are expandable + /// + [DataMember(Name = "_expandable")] + public IDictionary Expandables { get; set; } + + /// + /// Different links for this entity, depending on the entry + /// + [DataMember(Name = "_links")] + public Links Links { get; set; } + } +} \ No newline at end of file diff --git a/Dapplo.Confluence.Shared/Entities/Links.cs b/Dapplo.Confluence.Shared/Entities/Links.cs index d42b208..b7a472a 100644 --- a/Dapplo.Confluence.Shared/Entities/Links.cs +++ b/Dapplo.Confluence.Shared/Entities/Links.cs @@ -1,25 +1,29 @@ -// Dapplo - building blocks for desktop applications -// Copyright (C) 2015-2016 Dapplo +#region Dapplo 2016 - GNU Lesser General Public License + +// Dapplo - building blocks for .NET applications +// Copyright (C) 2016 Dapplo // -// For more information see: http://dapplo.net/ -// Dapplo repositories are hosted on GitHub: https://github.com/dapplo +// For more information see: http://dapplo.net/ +// Dapplo repositories are hosted on GitHub: https://github.com/dapplo // -// This file is part of Dapplo.Confluence +// This file is part of Dapplo.Confluence // -// Dapplo.Confluence is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. +// Dapplo.Confluence is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // -// Dapplo.Confluence is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. +// Dapplo.Confluence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. // -// You should have a copy of the GNU Lesser General Public License -// along with Dapplo.Confluence. If not, see . +// You should have a copy of the GNU Lesser General Public License +// along with Dapplo.Confluence. If not, see . + +#endregion -#region using +#region Usings using System; using System.Runtime.Serialization; @@ -36,43 +40,43 @@ namespace Dapplo.Confluence.Entities public class Links { /// - /// The base (hostname) for the server + /// The base (hostname) for the server /// [DataMember(Name = "base")] public Uri Base { get; set; } /// - /// A path to the rest API to where this belongs, content has a collection of "/rest/api/content" + /// A path to the rest API to where this belongs, content has a collection of "/rest/api/content" /// [DataMember(Name = "collection")] public string Collection { get; set; } /// - /// TODO: What is this? + /// TODO: What is this? /// [DataMember(Name = "context")] public string Context { get; set; } /// - /// The link, usually for attachments, to download the content + /// The link, usually for attachments, to download the content /// [DataMember(Name = "download")] public string Download { get; set; } /// - /// A link to the entity itself (so one can find it again) + /// A link to the entity itself (so one can find it again) /// [DataMember(Name = "self")] public Uri Self { get; set; } /// - /// A short link to the content, relative to the hostname (and port) + /// A short link to the content, relative to the hostname (and port) /// [DataMember(Name = "tinyui")] public string TinyUi { get; set; } /// - /// A normal, but well readable, link to the content + /// A normal, but well readable, link to the content /// [DataMember(Name = "webui")] public string WebUi { get; set; } diff --git a/Dapplo.Confluence.Shared/Entities/Metadata.cs b/Dapplo.Confluence.Shared/Entities/Metadata.cs index e9952c1..c687f7f 100644 --- a/Dapplo.Confluence.Shared/Entities/Metadata.cs +++ b/Dapplo.Confluence.Shared/Entities/Metadata.cs @@ -1,25 +1,29 @@ -// Dapplo - building blocks for desktop applications -// Copyright (C) 2015-2016 Dapplo +#region Dapplo 2016 - GNU Lesser General Public License + +// Dapplo - building blocks for .NET applications +// Copyright (C) 2016 Dapplo // -// For more information see: http://dapplo.net/ -// Dapplo repositories are hosted on GitHub: https://github.com/dapplo +// For more information see: http://dapplo.net/ +// Dapplo repositories are hosted on GitHub: https://github.com/dapplo // -// This file is part of Dapplo.Confluence +// This file is part of Dapplo.Confluence // -// Dapplo.Confluence is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. +// Dapplo.Confluence is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // -// Dapplo.Confluence is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. +// Dapplo.Confluence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. // -// You should have a copy of the GNU Lesser General Public License -// along with Dapplo.Confluence. If not, see . +// You should have a copy of the GNU Lesser General Public License +// along with Dapplo.Confluence. If not, see . + +#endregion -#region using +#region Usings using System.Runtime.Serialization; @@ -35,13 +39,13 @@ namespace Dapplo.Confluence.Entities public class Metadata { /// - /// A comment for the attachment + /// A comment for the attachment /// [DataMember(Name = "comment")] public string Comment { get; set; } /// - /// Type of media (content-type) + /// Type of media (content-type) /// [DataMember(Name = "mediaType")] public string MediaType { get; set; } diff --git a/Dapplo.Confluence.Shared/Entities/Picture.cs b/Dapplo.Confluence.Shared/Entities/Picture.cs index 80f0af5..969aa57 100644 --- a/Dapplo.Confluence.Shared/Entities/Picture.cs +++ b/Dapplo.Confluence.Shared/Entities/Picture.cs @@ -1,25 +1,29 @@ -// Dapplo - building blocks for desktop applications -// Copyright (C) 2015-2016 Dapplo +#region Dapplo 2016 - GNU Lesser General Public License + +// Dapplo - building blocks for .NET applications +// Copyright (C) 2016 Dapplo // -// For more information see: http://dapplo.net/ -// Dapplo repositories are hosted on GitHub: https://github.com/dapplo +// For more information see: http://dapplo.net/ +// Dapplo repositories are hosted on GitHub: https://github.com/dapplo // -// This file is part of Dapplo.Confluence +// This file is part of Dapplo.Confluence // -// Dapplo.Confluence is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. +// Dapplo.Confluence is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // -// Dapplo.Confluence is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. +// Dapplo.Confluence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. // -// You should have a copy of the GNU Lesser General Public License -// along with Dapplo.Confluence. If not, see . +// You should have a copy of the GNU Lesser General Public License +// along with Dapplo.Confluence. If not, see . + +#endregion -#region using +#region Usings using System.Runtime.Serialization; @@ -35,25 +39,25 @@ namespace Dapplo.Confluence.Entities public class Picture { /// - /// Height of the picture + /// Height of the picture /// [DataMember(Name = "height")] public int Height { get; set; } /// - /// Is this picture the default + /// Is this picture the default /// [DataMember(Name = "isDefault")] public bool IsDefault { get; set; } /// - /// The path for the picture relative to the hostname (and port) of the server, this is outside the Rest API path + /// The path for the picture relative to the hostname (and port) of the server, this is outside the Rest API path /// [DataMember(Name = "path")] public string Path { get; set; } /// - /// Width of the picture + /// Width of the picture /// [DataMember(Name = "width")] public int Width { get; set; } diff --git a/Dapplo.Confluence.Shared/Entities/Plain.cs b/Dapplo.Confluence.Shared/Entities/Plain.cs index c6e81b5..9461e87 100644 --- a/Dapplo.Confluence.Shared/Entities/Plain.cs +++ b/Dapplo.Confluence.Shared/Entities/Plain.cs @@ -1,25 +1,29 @@ -// Dapplo - building blocks for desktop applications -// Copyright (C) 2015-2016 Dapplo +#region Dapplo 2016 - GNU Lesser General Public License + +// Dapplo - building blocks for .NET applications +// Copyright (C) 2016 Dapplo // -// For more information see: http://dapplo.net/ -// Dapplo repositories are hosted on GitHub: https://github.com/dapplo +// For more information see: http://dapplo.net/ +// Dapplo repositories are hosted on GitHub: https://github.com/dapplo // -// This file is part of Dapplo.Confluence +// This file is part of Dapplo.Confluence // -// Dapplo.Confluence is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. +// Dapplo.Confluence is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // -// Dapplo.Confluence is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. +// Dapplo.Confluence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. // -// You should have a copy of the GNU Lesser General Public License -// along with Dapplo.Confluence. If not, see . +// You should have a copy of the GNU Lesser General Public License +// along with Dapplo.Confluence. If not, see . + +#endregion -#region using +#region Usings using System.Runtime.Serialization; @@ -29,20 +33,20 @@ namespace Dapplo.Confluence.Entities { /// /// Plain information, used in the description. - /// TODO: Find a better name + /// TODO: Find a better name /// See: https://docs.atlassian.com/confluence/REST/latest /// [DataContract] public class Plain { /// - /// Value of the plain description + /// Value of the plain description /// [DataMember(Name = "value")] public string Value { get; set; } /// - /// Type of representation + /// Type of representation /// [DataMember(Name = "representation")] public string Representation { get; set; } = "plain"; diff --git a/Dapplo.Confluence.Shared/Entities/Results.cs b/Dapplo.Confluence.Shared/Entities/Results.cs index d9cda70..0c6af26 100644 --- a/Dapplo.Confluence.Shared/Entities/Results.cs +++ b/Dapplo.Confluence.Shared/Entities/Results.cs @@ -1,25 +1,29 @@ -// Dapplo - building blocks for desktop applications -// Copyright (C) 2015-2016 Dapplo +#region Dapplo 2016 - GNU Lesser General Public License + +// Dapplo - building blocks for .NET applications +// Copyright (C) 2016 Dapplo // -// For more information see: http://dapplo.net/ -// Dapplo repositories are hosted on GitHub: https://github.com/dapplo +// For more information see: http://dapplo.net/ +// Dapplo repositories are hosted on GitHub: https://github.com/dapplo // -// This file is part of Dapplo.Confluence +// This file is part of Dapplo.Confluence // -// Dapplo.Confluence is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. +// Dapplo.Confluence is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // -// Dapplo.Confluence is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. +// Dapplo.Confluence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. // -// You should have a copy of the GNU Lesser General Public License -// along with Dapplo.Confluence. If not, see . +// You should have a copy of the GNU Lesser General Public License +// along with Dapplo.Confluence. If not, see . + +#endregion -#region using +#region Usings using System.Collections.Generic; using System.Runtime.Serialization; @@ -36,31 +40,31 @@ namespace Dapplo.Confluence.Entities public class Result { /// - /// The result is limited by + /// The result is limited by /// [DataMember(Name = "limit")] public int Limit { get; set; } /// - /// Different links for this entity, depending on the entry + /// Different links for this entity, depending on the entry /// [DataMember(Name = "_links")] public Links Links { get; set; } /// - /// The actual requested information + /// The actual requested information /// [DataMember(Name = "results")] public IList Results { get; set; } /// - /// How many elements + /// How many elements /// [DataMember(Name = "size")] public int Size { get; set; } /// - /// The start of the elements, this is used for paging + /// The start of the elements, this is used for paging /// [DataMember(Name = "start")] public int Start { get; set; } diff --git a/Dapplo.Confluence.Shared/Entities/Space.cs b/Dapplo.Confluence.Shared/Entities/Space.cs index d130e91..8547be5 100644 --- a/Dapplo.Confluence.Shared/Entities/Space.cs +++ b/Dapplo.Confluence.Shared/Entities/Space.cs @@ -1,25 +1,29 @@ -// Dapplo - building blocks for desktop applications -// Copyright (C) 2015-2016 Dapplo +#region Dapplo 2016 - GNU Lesser General Public License + +// Dapplo - building blocks for .NET applications +// Copyright (C) 2016 Dapplo // -// For more information see: http://dapplo.net/ -// Dapplo repositories are hosted on GitHub: https://github.com/dapplo +// For more information see: http://dapplo.net/ +// Dapplo repositories are hosted on GitHub: https://github.com/dapplo // -// This file is part of Dapplo.Confluence +// This file is part of Dapplo.Confluence // -// Dapplo.Confluence is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. +// Dapplo.Confluence is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // -// Dapplo.Confluence is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. +// Dapplo.Confluence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. // -// You should have a copy of the GNU Lesser General Public License -// along with Dapplo.Confluence. If not, see . +// You should have a copy of the GNU Lesser General Public License +// along with Dapplo.Confluence. If not, see . + +#endregion -#region using +#region Usings using System.Collections.Generic; using System.Runtime.Serialization; @@ -37,54 +41,54 @@ namespace Dapplo.Confluence.Entities public class Space { /// - /// The values that are expandable + /// The values that are expandable /// [DataMember(Name = "_expandable")] public IDictionary Expandables { get; set; } /// - /// Icon for the space + /// Icon for the space /// [DataMember(Name = "icon")] public Picture Icon { get; set; } /// - /// Id for the space + /// Id for the space /// [DataMember(Name = "id")] public string Id { get; set; } /// - /// Test if this space is a personal space, this is true when the Key starts with a ~ + /// Test if this space is a personal space, this is true when the Key starts with a ~ /// public bool IsPersonal => true == Key?.StartsWith("~"); /// - /// Key for the space + /// Key for the space /// [DataMember(Name = "key")] public string Key { get; set; } /// - /// Different links for this entity, depending on the entry + /// Different links for this entity, depending on the entry /// [DataMember(Name = "_links")] public Links Links { get; set; } /// - /// The name of the space + /// The name of the space /// [DataMember(Name = "name")] public string Name { get; set; } /// - /// Type for the space, e.g. Team space or Knowledge Base space etc + /// Type for the space, e.g. Team space or Knowledge Base space etc /// [DataMember(Name = "type")] public string Type { get; set; } /// - /// Description + /// Description /// [DataMember(Name = "description")] public Description Description { get; set; } diff --git a/Dapplo.Confluence.Shared/Entities/User.cs b/Dapplo.Confluence.Shared/Entities/User.cs index e8894b4..bd229ed 100644 --- a/Dapplo.Confluence.Shared/Entities/User.cs +++ b/Dapplo.Confluence.Shared/Entities/User.cs @@ -1,25 +1,29 @@ -// Dapplo - building blocks for desktop applications -// Copyright (C) 2015-2016 Dapplo +#region Dapplo 2016 - GNU Lesser General Public License + +// Dapplo - building blocks for .NET applications +// Copyright (C) 2016 Dapplo // -// For more information see: http://dapplo.net/ -// Dapplo repositories are hosted on GitHub: https://github.com/dapplo +// For more information see: http://dapplo.net/ +// Dapplo repositories are hosted on GitHub: https://github.com/dapplo // -// This file is part of Dapplo.Confluence +// This file is part of Dapplo.Confluence // -// Dapplo.Confluence is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. +// Dapplo.Confluence is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // -// Dapplo.Confluence is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. +// Dapplo.Confluence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. // -// You should have a copy of the GNU Lesser General Public License -// along with Dapplo.Confluence. If not, see . +// You should have a copy of the GNU Lesser General Public License +// along with Dapplo.Confluence. If not, see . + +#endregion -#region using +#region Usings using System.Runtime.Serialization; @@ -35,31 +39,31 @@ namespace Dapplo.Confluence.Entities public class User { /// - /// The name which is displayed in the UI, usually "firstname lastname" + /// The name which is displayed in the UI, usually "firstname lastname" /// [DataMember(Name = "displayName")] public string DisplayName { get; set; } /// - /// Information on the profile picture + /// Information on the profile picture /// [DataMember(Name = "profilePicture")] public Picture ProfilePicture { get; set; } /// - /// Type of user + /// Type of user /// [DataMember(Name = "type")] public string Type { get; set; } /// - /// A unique key for the user + /// A unique key for the user /// [DataMember(Name = "userKey")] public string UserKey { get; set; } /// - /// The username + /// The username /// [DataMember(Name = "username")] public string Username { get; set; } diff --git a/Dapplo.Confluence.Shared/Entities/Version.cs b/Dapplo.Confluence.Shared/Entities/Version.cs index 95bba38..2e4f166 100644 --- a/Dapplo.Confluence.Shared/Entities/Version.cs +++ b/Dapplo.Confluence.Shared/Entities/Version.cs @@ -1,25 +1,29 @@ -// Dapplo - building blocks for desktop applications -// Copyright (C) 2015-2016 Dapplo +#region Dapplo 2016 - GNU Lesser General Public License + +// Dapplo - building blocks for .NET applications +// Copyright (C) 2016 Dapplo // -// For more information see: http://dapplo.net/ -// Dapplo repositories are hosted on GitHub: https://github.com/dapplo +// For more information see: http://dapplo.net/ +// Dapplo repositories are hosted on GitHub: https://github.com/dapplo // -// This file is part of Dapplo.Confluence +// This file is part of Dapplo.Confluence // -// Dapplo.Confluence is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. +// Dapplo.Confluence is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // -// Dapplo.Confluence is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. +// Dapplo.Confluence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. // -// You should have a copy of the GNU Lesser General Public License -// along with Dapplo.Confluence. If not, see . +// You should have a copy of the GNU Lesser General Public License +// along with Dapplo.Confluence. If not, see . + +#endregion -#region using +#region Usings using System; using System.Runtime.Serialization; @@ -36,31 +40,31 @@ namespace Dapplo.Confluence.Entities public class Version { /// - /// Who made this version + /// Who made this version /// [DataMember(Name = "by")] public User By { get; set; } /// - /// Is it a small version change + /// Is it a small version change /// [DataMember(Name = "minorEdit")] public bool IsMinorEdit { get; set; } /// - /// A message for the version + /// A message for the version /// [DataMember(Name = "message")] public string Message { get; set; } /// - /// Version number + /// Version number /// [DataMember(Name = "number")] public int Number { get; set; } /// - /// When was this version + /// When was this version /// [DataMember(Name = "when")] public DateTimeOffset When { get; set; } diff --git a/Dapplo.Confluence.Shared/Internals/AttachmentContainer.cs b/Dapplo.Confluence.Shared/Internals/AttachmentContainer.cs index 9fb0ed4..129ead7 100644 --- a/Dapplo.Confluence.Shared/Internals/AttachmentContainer.cs +++ b/Dapplo.Confluence.Shared/Internals/AttachmentContainer.cs @@ -1,25 +1,29 @@ -// Dapplo - building blocks for desktop applications -// Copyright (C) 2015-2016 Dapplo +#region Dapplo 2016 - GNU Lesser General Public License + +// Dapplo - building blocks for .NET applications +// Copyright (C) 2016 Dapplo // -// For more information see: http://dapplo.net/ -// Dapplo repositories are hosted on GitHub: https://github.com/dapplo +// For more information see: http://dapplo.net/ +// Dapplo repositories are hosted on GitHub: https://github.com/dapplo // -// This file is part of Dapplo.Confluence +// This file is part of Dapplo.Confluence // -// Dapplo.Confluence is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. +// Dapplo.Confluence is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // -// Dapplo.Confluence is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. +// Dapplo.Confluence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. // -// You should have a copy of the GNU Lesser General Public License -// along with Dapplo.Confluence. If not, see . +// You should have a copy of the GNU Lesser General Public License +// along with Dapplo.Confluence. If not, see . + +#endregion -#region using +#region Usings using Dapplo.HttpExtensions.Support; diff --git a/Dapplo.Confluence.Tests/ConfluenceTests.cs b/Dapplo.Confluence.Tests/ConfluenceTests.cs index 7ff1e4a..a8a4912 100644 --- a/Dapplo.Confluence.Tests/ConfluenceTests.cs +++ b/Dapplo.Confluence.Tests/ConfluenceTests.cs @@ -1,31 +1,35 @@ -// Dapplo - building blocks for desktop applications -// Copyright (C) 2015-2016 Dapplo +#region Dapplo 2016 - GNU Lesser General Public License + +// Dapplo - building blocks for .NET applications +// Copyright (C) 2016 Dapplo // -// For more information see: http://dapplo.net/ -// Dapplo repositories are hosted on GitHub: https://github.com/dapplo +// For more information see: http://dapplo.net/ +// Dapplo repositories are hosted on GitHub: https://github.com/dapplo // -// This file is part of Dapplo.Confluence +// This file is part of Dapplo.Confluence // -// Dapplo.Confluence is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. +// Dapplo.Confluence is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // -// Dapplo.Confluence is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. +// Dapplo.Confluence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. // -// You should have a copy of the GNU Lesser General Public License -// along with Dapplo.Confluence. If not, see . +// You should have a copy of the GNU Lesser General Public License +// along with Dapplo.Confluence. If not, see . -#region using +#endregion + +#region Usings -using Dapplo.Log.XUnit; -using Dapplo.Log.Facade; using System; using System.IO; using System.Threading.Tasks; +using Dapplo.Log.Facade; +using Dapplo.Log.XUnit; using Xunit; using Xunit.Abstractions; @@ -34,15 +38,10 @@ namespace Dapplo.Confluence.Tests { /// - /// Tests + /// Tests /// public class ConfluenceTests { - // Test against a well known Confluence - private static readonly Uri TestConfluenceUri = new Uri("https://greenshot.atlassian.net/wiki"); - - private readonly ConfluenceApi _confluenceApi; - public ConfluenceTests(ITestOutputHelper testOutputHelper) { LogSettings.RegisterDefaultLogger(LogLevels.Verbose, testOutputHelper); @@ -56,67 +55,14 @@ public ConfluenceTests(ITestOutputHelper testOutputHelper) } } - //[Fact] - public async Task TestSearch() - { - var searchResult = await _confluenceApi.SearchAsync("text ~ \"Test Home\""); - Assert.NotNull(searchResult); - Assert.True(searchResult.Results.Count > 0); - - foreach (var content in searchResult.Results) - { - Assert.NotNull(content.Type); - } - } - - /// - /// Test only works on Confluence 6.6 and later - /// - /// - [Fact] - public async Task TestCurrentUserAndPicture() - { - var currentUser = await _confluenceApi.GetCurrentUserAsync(); - Assert.NotNull(currentUser); - Assert.NotNull(currentUser.ProfilePicture); - - var bitmapSource = await _confluenceApi.GetPictureAsync(currentUser.ProfilePicture); - Assert.NotNull(bitmapSource); - } - - /// - /// Test GetSpacesAsync - /// - [Fact] - public async Task TestGetSpaces() - { - var spaces = await _confluenceApi.GetSpacesAsync(); - Assert.NotNull(spaces); - Assert.NotNull(spaces.Count > 0); - } - - /// - /// Test GetSpaceAsync - /// - [Fact] - public async Task TestGetSpace() - { - var space = await _confluenceApi.GetSpaceAsync("TEST"); - Assert.NotNull(space); - Assert.NotNull(space.Description); - } + // Test against a well known Confluence + private static readonly Uri TestConfluenceUri = new Uri("https://greenshot.atlassian.net/wiki"); - [Fact] - public async Task TestGetAttachments() - { - var attachments = await _confluenceApi.GetAttachmentsAsync("950274"); - Assert.NotNull(attachments); - Assert.NotNull(attachments.Results.Count > 0); - } + private readonly ConfluenceApi _confluenceApi; /// - /// Doesn't work yet, as deleting an attachment is not supported - /// See CONF-36015 + /// Doesn't work yet, as deleting an attachment is not supported + /// See CONF-36015 /// /// //[Fact] @@ -156,11 +102,10 @@ public async Task TestAttach() attachments = await _confluenceApi.GetAttachmentsAsync(testPageId); Assert.NotNull(attachments); Assert.True(attachments.Results.Count == 0); - } /// - /// Test GetContentAsync + /// Test GetContentAsync /// //[Fact] public async Task TestGetContent() @@ -171,7 +116,7 @@ public async Task TestGetContent() } /// - /// Test GetContentHistoryAsync + /// Test GetContentHistoryAsync /// //[Fact] public async Task TestGetContentHistory() @@ -193,5 +138,65 @@ public async Task TestDeleteContent() { await _confluenceApi.DeleteContentAsync("30375945"); } + + /// + /// Test only works on Confluence 6.6 and later + /// + /// + [Fact] + public async Task TestCurrentUserAndPicture() + { + var currentUser = await _confluenceApi.GetCurrentUserAsync(); + Assert.NotNull(currentUser); + Assert.NotNull(currentUser.ProfilePicture); + + var bitmapSource = await _confluenceApi.GetPictureAsync(currentUser.ProfilePicture); + Assert.NotNull(bitmapSource); + } + + [Fact] + public async Task TestGetAttachments() + { + var attachments = await _confluenceApi.GetAttachmentsAsync("950274"); + Assert.NotNull(attachments); + Assert.NotNull(attachments.Results.Count > 0); + } + + /// + /// Test GetSpaceAsync + /// + [Fact] + public async Task TestGetSpace() + { + var space = await _confluenceApi.GetSpaceAsync("TEST"); + Assert.NotNull(space); + Assert.NotNull(space.Description); + } + + /// + /// Test GetSpacesAsync + /// + [Fact] + public async Task TestGetSpaces() + { + var spaces = await _confluenceApi.GetSpacesAsync(); + Assert.NotNull(spaces); + Assert.NotNull(spaces.Count > 0); + } + + [Fact] + public async Task TestSearch() + { + ConfluenceConfig.ExpandSearch = new[] {"version", "space", "space.icon", "space.description", "space.homepage", "history.lastUpdated"}; + + var searchResult = await _confluenceApi.SearchAsync("text ~ \"Test Home\""); + Assert.NotNull(searchResult); + Assert.True(searchResult.Results.Count > 0); + + foreach (var content in searchResult.Results) + { + Assert.NotNull(content.Type); + } + } } } \ No newline at end of file diff --git a/Dapplo.Confluence.Tests/JsonParseTests.cs b/Dapplo.Confluence.Tests/JsonParseTests.cs index 8812850..274cdd5 100644 --- a/Dapplo.Confluence.Tests/JsonParseTests.cs +++ b/Dapplo.Confluence.Tests/JsonParseTests.cs @@ -1,31 +1,35 @@ -// Dapplo - building blocks for desktop applications -// Copyright (C) 2015-2016 Dapplo +#region Dapplo 2016 - GNU Lesser General Public License + +// Dapplo - building blocks for .NET applications +// Copyright (C) 2016 Dapplo // -// For more information see: http://dapplo.net/ -// Dapplo repositories are hosted on GitHub: https://github.com/dapplo +// For more information see: http://dapplo.net/ +// Dapplo repositories are hosted on GitHub: https://github.com/dapplo // -// This file is part of Dapplo.Confluence +// This file is part of Dapplo.Confluence // -// Dapplo.Confluence is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. +// Dapplo.Confluence is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // -// Dapplo.Confluence is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. +// Dapplo.Confluence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. // -// You should have a copy of the GNU Lesser General Public License -// along with Dapplo.Confluence. If not, see . +// You should have a copy of the GNU Lesser General Public License +// along with Dapplo.Confluence. If not, see . + +#endregion -#region using +#region Usings +using System.IO; using Dapplo.Confluence.Entities; using Dapplo.HttpExtensions; -using Dapplo.Log.XUnit; using Dapplo.Log.Facade; -using System.IO; +using Dapplo.Log.XUnit; using Xunit; using Xunit.Abstractions; diff --git a/Dapplo.Confluence.Tests/Properties/AssemblyInfo.cs b/Dapplo.Confluence.Tests/Properties/AssemblyInfo.cs index f70923b..a7993a0 100644 --- a/Dapplo.Confluence.Tests/Properties/AssemblyInfo.cs +++ b/Dapplo.Confluence.Tests/Properties/AssemblyInfo.cs @@ -1,25 +1,29 @@ -// Dapplo - building blocks for desktop applications -// Copyright (C) 2015-2016 Dapplo +#region Dapplo 2016 - GNU Lesser General Public License + +// Dapplo - building blocks for .NET applications +// Copyright (C) 2016 Dapplo // -// For more information see: http://dapplo.net/ -// Dapplo repositories are hosted on GitHub: https://github.com/dapplo +// For more information see: http://dapplo.net/ +// Dapplo repositories are hosted on GitHub: https://github.com/dapplo // -// This file is part of Dapplo.Confluence +// This file is part of Dapplo.Confluence // -// Dapplo.Confluence is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. +// Dapplo.Confluence is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // -// Dapplo.Confluence is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. +// Dapplo.Confluence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. // -// You should have a copy of the GNU Lesser General Public License -// along with Dapplo.Confluence. If not, see . +// You should have a copy of the GNU Lesser General Public License +// along with Dapplo.Confluence. If not, see . + +#endregion -#region using +#region Usings using System.Reflection; using System.Runtime.InteropServices; diff --git a/Dapplo.Confluence.Tests/packages.config b/Dapplo.Confluence.Tests/packages.config index 1de093f..0a04682 100644 --- a/Dapplo.Confluence.Tests/packages.config +++ b/Dapplo.Confluence.Tests/packages.config @@ -1,18 +1,19 @@  + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Dapplo.Confluence.WpfExample/App.xaml.cs b/Dapplo.Confluence.WpfExample/App.xaml.cs index 9d2e41f..5361482 100644 --- a/Dapplo.Confluence.WpfExample/App.xaml.cs +++ b/Dapplo.Confluence.WpfExample/App.xaml.cs @@ -1,27 +1,31 @@ -// Dapplo - building blocks for desktop applications -// Copyright (C) 2015-2016 Dapplo +#region Dapplo 2016 - GNU Lesser General Public License + +// Dapplo - building blocks for .NET applications +// Copyright (C) 2016 Dapplo // -// For more information see: http://dapplo.net/ -// Dapplo repositories are hosted on GitHub: https://github.com/dapplo +// For more information see: http://dapplo.net/ +// Dapplo repositories are hosted on GitHub: https://github.com/dapplo // -// This file is part of Dapplo.Confluence +// This file is part of Dapplo.Confluence // -// Dapplo.Confluence is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. +// Dapplo.Confluence is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // -// Dapplo.Confluence is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. +// Dapplo.Confluence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. // -// You should have a copy of the GNU Lesser General Public License -// along with Dapplo.Confluence. If not, see . +// You should have a copy of the GNU Lesser General Public License +// along with Dapplo.Confluence. If not, see . + +#endregion #region using -using System.Windows; + #endregion diff --git a/Dapplo.Confluence.WpfExample/MainWindow.xaml.cs b/Dapplo.Confluence.WpfExample/MainWindow.xaml.cs index fb05c34..c6d8500 100644 --- a/Dapplo.Confluence.WpfExample/MainWindow.xaml.cs +++ b/Dapplo.Confluence.WpfExample/MainWindow.xaml.cs @@ -1,25 +1,29 @@ -// Dapplo - building blocks for desktop applications -// Copyright (C) 2015-2016 Dapplo +#region Dapplo 2016 - GNU Lesser General Public License + +// Dapplo - building blocks for .NET applications +// Copyright (C) 2016 Dapplo // -// For more information see: http://dapplo.net/ -// Dapplo repositories are hosted on GitHub: https://github.com/dapplo +// For more information see: http://dapplo.net/ +// Dapplo repositories are hosted on GitHub: https://github.com/dapplo // -// This file is part of Dapplo.Confluence +// This file is part of Dapplo.Confluence // -// Dapplo.Confluence is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. +// Dapplo.Confluence is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // -// Dapplo.Confluence is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. +// Dapplo.Confluence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. // -// You should have a copy of the GNU Lesser General Public License -// along with Dapplo.Confluence. If not, see . +// You should have a copy of the GNU Lesser General Public License +// along with Dapplo.Confluence. If not, see . + +#endregion -#region using +#region Usings using System.Collections.ObjectModel; using System.Threading.Tasks; diff --git a/Dapplo.Confluence.WpfExample/Properties/AssemblyInfo.cs b/Dapplo.Confluence.WpfExample/Properties/AssemblyInfo.cs index 3ebb716..c863579 100644 --- a/Dapplo.Confluence.WpfExample/Properties/AssemblyInfo.cs +++ b/Dapplo.Confluence.WpfExample/Properties/AssemblyInfo.cs @@ -1,25 +1,29 @@ -// Dapplo - building blocks for desktop applications -// Copyright (C) 2015-2016 Dapplo +#region Dapplo 2016 - GNU Lesser General Public License + +// Dapplo - building blocks for .NET applications +// Copyright (C) 2016 Dapplo // -// For more information see: http://dapplo.net/ -// Dapplo repositories are hosted on GitHub: https://github.com/dapplo +// For more information see: http://dapplo.net/ +// Dapplo repositories are hosted on GitHub: https://github.com/dapplo // -// This file is part of Dapplo.Confluence +// This file is part of Dapplo.Confluence // -// Dapplo.Confluence is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. +// Dapplo.Confluence is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // -// Dapplo.Confluence is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. +// Dapplo.Confluence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. // -// You should have a copy of the GNU Lesser General Public License -// along with Dapplo.Confluence. If not, see . +// You should have a copy of the GNU Lesser General Public License +// along with Dapplo.Confluence. If not, see . + +#endregion -#region using +#region Usings using System.Reflection; using System.Runtime.InteropServices; @@ -57,13 +61,13 @@ [assembly: ThemeInfo( - ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located - //(used if a resource is not found in the page, - // or application resource dictionaries) - ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located - //(used if a resource is not found in the page, - // app, or any theme specific resource dictionaries) - )] + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) + )] // Version information for an assembly consists of the following four values: diff --git a/Dapplo.Confluence/Properties/AssemblyInfo.cs b/Dapplo.Confluence/Properties/AssemblyInfo.cs index 20ebf45..f278137 100644 --- a/Dapplo.Confluence/Properties/AssemblyInfo.cs +++ b/Dapplo.Confluence/Properties/AssemblyInfo.cs @@ -1,25 +1,29 @@ -// Dapplo - building blocks for desktop applications -// Copyright (C) 2015-2016 Dapplo +#region Dapplo 2016 - GNU Lesser General Public License + +// Dapplo - building blocks for .NET applications +// Copyright (C) 2016 Dapplo // -// For more information see: http://dapplo.net/ -// Dapplo repositories are hosted on GitHub: https://github.com/dapplo +// For more information see: http://dapplo.net/ +// Dapplo repositories are hosted on GitHub: https://github.com/dapplo // -// This file is part of Dapplo.Confluence +// This file is part of Dapplo.Confluence // -// Dapplo.Confluence is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. +// Dapplo.Confluence is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // -// Dapplo.Confluence is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. +// Dapplo.Confluence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. // -// You should have a copy of the GNU Lesser General Public License -// along with Dapplo.Confluence. If not, see . +// You should have a copy of the GNU Lesser General Public License +// along with Dapplo.Confluence. If not, see . + +#endregion -#region using +#region Usings using System.Reflection; using System.Runtime.InteropServices;