Some small documentation fix, and fixed an issue with not being able to run BenchmarkDotNet while PdbGit is loaded. (Caused because the project name does not contain test)

This commit is contained in:
Robin Krom 2019-02-25 22:54:05 +01:00
commit 2404bafa60
3 changed files with 102 additions and 26 deletions

View file

@ -15,11 +15,11 @@
<FileVersion>1.0.0</FileVersion> <FileVersion>1.0.0</FileVersion>
<AssemblySearchPaths Condition="'$(TargetFramework)' == 'net472'">{HintPathFromItem};{TargetFrameworkDirectory};{RawFileName};{GAC};</AssemblySearchPaths> <AssemblySearchPaths Condition="'$(TargetFramework)' == 'net472'">{HintPathFromItem};{TargetFrameworkDirectory};{RawFileName};{GAC};</AssemblySearchPaths>
<UseWPF>true</UseWPF> <UseWPF>true</UseWPF>
<UseWindowsForms>false</UseWindowsForms> <UseWindowsForms>true</UseWindowsForms>
<OsProductName>$(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion@ProductName)</OsProductName> <OsProductName>$(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion@ProductName)</OsProductName>
<!--RuntimeIdentifiers>win10-x64;win10-x86;win-x64;win-x86</RuntimeIdentifiers--> <!--RuntimeIdentifiers>win10-x64;win10-x86;win-x64;win-x86</RuntimeIdentifiers-->
<ExtrasEnableWpfProjectSetup>true</ExtrasEnableWpfProjectSetup> <ExtrasEnableWpfProjectSetup>true</ExtrasEnableWpfProjectSetup>
<ExtrasEnableWinFormsProjectSetup>false</ExtrasEnableWinFormsProjectSetup> <ExtrasEnableWinFormsProjectSetup>true</ExtrasEnableWinFormsProjectSetup>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' != 'Debug' And !$(MSBuildProjectName.Contains('Test')) And !$(MSBuildProjectName.Contains('Demo'))"> <PropertyGroup Condition="'$(Configuration)' != 'Debug' And !$(MSBuildProjectName.Contains('Test')) And !$(MSBuildProjectName.Contains('Demo'))">
@ -48,7 +48,7 @@
<DebugSymbols>True</DebugSymbols> <DebugSymbols>True</DebugSymbols>
</PropertyGroup> </PropertyGroup>
<!--<ItemGroup Condition="!$(MSBuildProjectName.Contains('Tests'))"> <ItemGroup Condition="!$(MSBuildProjectName.Contains('Tests')) And $(MSBuildProjectName.StartsWith('Greenshot'))">
<PackageReference Include="Nerdbank.GitVersioning" Version="2.3.105"> <PackageReference Include="Nerdbank.GitVersioning" Version="2.3.105">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
@ -57,7 +57,7 @@
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference> </PackageReference>
</ItemGroup>--> </ItemGroup>
<Target Name="PostBuild" BeforeTargets="PostBuildEvent" Condition="$(MSBuildProjectName.Contains('Addon.')) And !$(MSBuildProjectName.Contains('Test')) And !$(MSBuildProjectName.Contains('Demo'))"> <Target Name="PostBuild" BeforeTargets="PostBuildEvent" Condition="$(MSBuildProjectName.Contains('Addon.')) And !$(MSBuildProjectName.Contains('Test')) And !$(MSBuildProjectName.Contains('Demo'))">
<Exec Command=" <Exec Command="

View file

@ -1,4 +1,27 @@
using System; #region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
//
// For more information see: http://getgreenshot.org/
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 1 of the License, or
// (at your option) any later version.
//
// This program 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 General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System;
using System.Collections.Generic; using System.Collections.Generic;
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Converters; using Newtonsoft.Json.Converters;
@ -10,33 +33,63 @@ namespace Greenshot.Addon.Imgur.Entities
/// </summary> /// </summary>
public class ImgurData public class ImgurData
{ {
/// <summary>
/// Id of the image
/// </summary>
[JsonProperty("id")] [JsonProperty("id")]
public string Id { get; set; } public string Id { get; set; }
/// <summary>
/// Title of the image
/// </summary>
[JsonProperty("title")] [JsonProperty("title")]
public string Title { get; set; } public string Title { get; set; }
/// <summary>
/// Description of the image
/// </summary>
[JsonProperty("description")] [JsonProperty("description")]
public string Description { get; set; } public string Description { get; set; }
/// <summary>
/// Date created
/// </summary>
[JsonProperty("datetime"), JsonConverter(typeof(UnixDateTimeConverter))] [JsonProperty("datetime"), JsonConverter(typeof(UnixDateTimeConverter))]
public DateTime Datetime { get; set; } public DateTime Datetime { get; set; }
/// <summary>
/// Type of image
/// </summary>
[JsonProperty("type")] [JsonProperty("type")]
public string Type { get; set; } public string Type { get; set; }
/// <summary>
/// Specifies if the image is animated
/// </summary>
[JsonProperty("animated")] [JsonProperty("animated")]
public bool Animated { get; set; } public bool Animated { get; set; }
/// <summary>
/// The width of the image
/// </summary>
[JsonProperty("width")] [JsonProperty("width")]
public long Width { get; set; } public long Width { get; set; }
/// <summary>
/// The height of the image
/// </summary>
[JsonProperty("height")] [JsonProperty("height")]
public long Height { get; set; } public long Height { get; set; }
/// <summary>
/// The size of the image
/// </summary>
[JsonProperty("size")] [JsonProperty("size")]
public long Size { get; set; } public long Size { get; set; }
/// <summary>
/// How many times is this image viewed
/// </summary>
[JsonProperty("views")] [JsonProperty("views")]
public long Views { get; set; } public long Views { get; set; }

View file

@ -1,23 +1,46 @@
using System.Windows.Media; #region Greenshot GNU General Public License
using Newtonsoft.Json;
// Greenshot - a free and open source screenshot tool
namespace Greenshot.Addon.Imgur.Entities // Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
{ //
// For more information see: http://getgreenshot.org/
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 1 of the License, or
// (at your option) any later version.
//
// This program 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 General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System.Windows.Media;
using Newtonsoft.Json;
namespace Greenshot.Addon.Imgur.Entities
{
/// <summary> /// <summary>
/// Information on the imgur image /// Information on the imgur image
/// </summary> /// </summary>
public class ImgurImage public class ImgurImage
{ {
[JsonIgnore] [JsonIgnore]
public ImageSource Image { get; set; } public ImageSource Image { get; set; }
[JsonProperty("data")] [JsonProperty("data")]
public ImgurData Data { get; set; } public ImgurData Data { get; set; }
[JsonProperty("success")] [JsonProperty("success")]
public bool Success { get; set; } public bool Success { get; set; }
[JsonProperty("status")] [JsonProperty("status")]
public long Status { get; set; } public long Status { get; set; }
} }
} }