Skip to content

Commit afaff69

Browse files
committed
v1.1
1 parent 404552d commit afaff69

File tree

15 files changed

+78
-303
lines changed

15 files changed

+78
-303
lines changed

src/Server/Coderr.Server.Api.Client.Tests/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 39 deletions
This file was deleted.
Lines changed: 24 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,25 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4-
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<ProjectGuid>{62989500-31BC-44FA-97CA-84F484C6F1AA}</ProjectGuid>
8-
<OutputType>Library</OutputType>
9-
<AppDesignerFolder>Properties</AppDesignerFolder>
10-
<RootNamespace>codeRR.Server.Api.Client.Tests</RootNamespace>
11-
<AssemblyName>Coderr.Server.Api.Client.Tests</AssemblyName>
12-
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
13-
<FileAlignment>512</FileAlignment>
14-
</PropertyGroup>
15-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
16-
<DebugSymbols>true</DebugSymbols>
17-
<DebugType>full</DebugType>
18-
<Optimize>false</Optimize>
19-
<OutputPath>bin\Debug\</OutputPath>
20-
<DefineConstants>DEBUG;TRACE</DefineConstants>
21-
<ErrorReport>prompt</ErrorReport>
22-
<WarningLevel>4</WarningLevel>
23-
</PropertyGroup>
24-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
25-
<DebugType>pdbonly</DebugType>
26-
<Optimize>true</Optimize>
27-
<OutputPath>bin\Release\</OutputPath>
28-
<DefineConstants>TRACE</DefineConstants>
29-
<ErrorReport>prompt</ErrorReport>
30-
<WarningLevel>4</WarningLevel>
31-
</PropertyGroup>
32-
<ItemGroup>
33-
<Reference Include="DotNetCqs, Version=2.0.3.8, Culture=neutral, processorArchitecture=MSIL">
34-
<HintPath>..\packages\DotNetCqs.2.0.3.8\lib\net452\DotNetCqs.dll</HintPath>
35-
</Reference>
36-
<Reference Include="FluentAssertions, Version=4.19.4.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
37-
<HintPath>..\packages\FluentAssertions.4.19.4\lib\net45\FluentAssertions.dll</HintPath>
38-
</Reference>
39-
<Reference Include="FluentAssertions.Core, Version=4.19.4.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
40-
<HintPath>..\packages\FluentAssertions.4.19.4\lib\net45\FluentAssertions.Core.dll</HintPath>
41-
</Reference>
42-
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
43-
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
44-
</Reference>
45-
<Reference Include="System" />
46-
<Reference Include="System.Core" />
47-
<Reference Include="System.Xml.Linq" />
48-
<Reference Include="System.Data.DataSetExtensions" />
49-
<Reference Include="Microsoft.CSharp" />
50-
<Reference Include="System.Data" />
51-
<Reference Include="System.Net.Http" />
52-
<Reference Include="System.Xml" />
53-
<Reference Include="xunit.abstractions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
54-
<HintPath>..\packages\xunit.abstractions.2.0.1\lib\net35\xunit.abstractions.dll</HintPath>
55-
</Reference>
56-
<Reference Include="xunit.assert, Version=2.2.0.3545, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
57-
<HintPath>..\packages\xunit.assert.2.2.0\lib\netstandard1.1\xunit.assert.dll</HintPath>
58-
</Reference>
59-
<Reference Include="xunit.core, Version=2.2.0.3545, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
60-
<HintPath>..\packages\xunit.extensibility.core.2.2.0\lib\netstandard1.1\xunit.core.dll</HintPath>
61-
</Reference>
62-
<Reference Include="xunit.execution.desktop, Version=2.2.0.3545, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
63-
<HintPath>..\packages\xunit.extensibility.execution.2.2.0\lib\net452\xunit.execution.desktop.dll</HintPath>
64-
</Reference>
65-
</ItemGroup>
66-
<ItemGroup>
67-
<Compile Include="TryTheClient.cs" />
68-
<Compile Include="Properties\AssemblyInfo.cs" />
69-
</ItemGroup>
70-
<ItemGroup>
71-
<None Include="packages.config">
72-
<SubType>Designer</SubType>
73-
</None>
74-
</ItemGroup>
75-
<ItemGroup>
76-
<ProjectReference Include="..\Coderr.Server.Api.Client\codeRR.Server.Api.Client.csproj">
77-
<Project>{017F8863-3DE0-4AD2-9ED3-5ACB87BBBCD0}</Project>
78-
<Name>codeRR.Server.Api.Client</Name>
79-
</ProjectReference>
80-
<ProjectReference Include="..\Coderr.Server.Api\codeRR.Server.Api.csproj">
81-
<Project>{fc331a95-fca4-4764-8004-0884665dd01f}</Project>
82-
<Name>codeRR.Server.Api</Name>
83-
</ProjectReference>
84-
</ItemGroup>
85-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
86-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
87-
Other similar extension points exist, see Microsoft.Common.targets.
88-
<Target Name="BeforeBuild">
89-
</Target>
90-
<Target Name="AfterBuild">
91-
</Target>
92-
-->
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<TargetFramework>net452</TargetFramework>
4+
<RootNamespace>codeRR.Server.Api.Client.Tests</RootNamespace>
5+
<AssemblyName>Coderr.Server.Api.Client.Tests</AssemblyName>
6+
</PropertyGroup>
7+
<ItemGroup>
8+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
9+
<PackageReference Include="xunit" Version="2.2.0" />
10+
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
11+
<PackageReference Include="FluentAssertions" Version="4.19.4" />
12+
<PackageReference Include="NSubstitute" Version="2.0.3" />
13+
14+
</ItemGroup>
15+
<ItemGroup>
16+
<ProjectReference Include="..\Coderr.Server.Api.Client\codeRR.Server.Api.Client.csproj" />
17+
</ItemGroup>
18+
<ItemGroup>
19+
<Reference Include="System.Configuration" />
20+
</ItemGroup>
21+
<ItemGroup>
22+
<Folder Include="Properties\" />
23+
</ItemGroup>
24+
9325
</Project>

src/Server/Coderr.Server.Api/CommandAttribute.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
namespace codeRR.Server.Api
22
{
3+
/// <summary>
4+
/// Marker attribute to tell which DTOs are commands
5+
/// </summary>
36
public class CommandAttribute : MessageAttribute
47
{
58

src/Server/Coderr.Server.Api/Core/Accounts/Commands/RequestPasswordReset.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@ namespace codeRR.Server.Api.Core.Accounts.Commands
77
/// <summary>
88
/// Request a password reset (i.e. lock account, email an activation link to the user and wait for activation).
99
/// </summary>
10-
/// <remarks>
11-
/// <para>
12-
/// <see cref="ResetPassword" /> will be exeucted when the user clicks on the link.
13-
/// </para>
14-
/// </remarks>
1510
[Message]
1611
public class RequestPasswordReset
1712
{

src/Server/Coderr.Server.Api/Core/ApiKeys/Events/ApiKeyRemoved.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
namespace codeRR.Server.Api.Core.ApiKeys.Events
22
{
3-
[Message]
3+
/// <summary>
4+
/// A API key was removed from the system
5+
/// </summary>
6+
[Event]
47
public class ApiKeyRemoved
58
{
69
}

src/Server/Coderr.Server.Api/EventAttribute.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
namespace codeRR.Server.Api
22
{
3+
/// <summary>
4+
/// Marks a DTO as an event.
5+
/// </summary>
36
public class EventAttribute : MessageAttribute
47
{
58

src/Server/Coderr.Server.Api/MessageAttribute.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
namespace codeRR.Server.Api
66
{
7+
/// <summary>
8+
/// Used to mark classes as DTOs (to be able to index and process them)
9+
/// </summary>
710
public class MessageAttribute : Attribute
811
{
912
}

src/Server/Coderr.Server.Api/codeRR.Server.Api.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<PackageLicenseUrl>https://raw.githubusercontent.com/coderr/codeRR.Server/master/LICENSE</PackageLicenseUrl>
2222
<PackageProjectUrl>https://coderrapp.com</PackageProjectUrl>
2323
</PropertyGroup>
24-
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netstandard2.0|AnyCPU'">
24+
<PropertyGroup>
2525
<NoWarn>1701;1702;1705;1591</NoWarn>
2626
</PropertyGroup>
2727
<ItemGroup>

src/Server/Coderr.Server.App/Core/Applications/CommandHandlers/DeleteApplicationHandler.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System.Security.Claims;
22
using System.Threading.Tasks;
3+
using codeRR.Server.Api.Core.ApiKeys.Commands;
34
using codeRR.Server.Api.Core.Applications.Commands;
45
using codeRR.Server.Api.Core.Applications.Events;
56
using codeRR.Server.Infrastructure.Security;

src/Server/Coderr.Server.SqlServer/Schema/Update.v8.sql

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,15 @@ IF @ConstraintName IS NOT NULL
2222
EXEC('ALTER TABLE incidents DROP CONSTRAINT ' + @ConstraintName)
2323
alter table incidents drop column IgnoreReports;
2424

25+
-- ApiKey module deletes relations manually.
26+
DECLARE @ConstraintName nvarchar(200)
27+
SELECT @ConstraintName = Name FROM SYS.DEFAULT_CONSTRAINTS
28+
WHERE PARENT_OBJECT_ID = OBJECT_ID('incidents')
29+
AND PARENT_COLUMN_ID = (SELECT column_id FROM sys.columns
30+
WHERE NAME = N'ApplicationId'
31+
AND object_id = OBJECT_ID(N'ApiKeyApplications'))
32+
IF @ConstraintName IS NOT NULL
33+
EXEC('ALTER TABLE ApiKeyApplications DROP CONSTRAINT ' + @ConstraintName)
34+
35+
2536
UPDATE DatabaseSchema SET Version = 8;

0 commit comments

Comments
 (0)