Skip to content

Commit 3202b68

Browse files
authored
Pushed premise changes down (#68)
1 parent 07304f9 commit 3202b68

File tree

118 files changed

+1108
-1102
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+1108
-1102
lines changed

.gitattributes

Lines changed: 59 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,63 @@
1-
*.doc diff=astextplain
2-
*.DOC diff=astextplain
3-
*.docx diff=astextplain
4-
*.DOCX diff=astextplain
5-
*.dot diff=astextplain
6-
*.DOT diff=astextplain
7-
*.pdf diff=astextplain
8-
*.PDF diff=astextplain
9-
*.rtf diff=astextplain
10-
*.RTF diff=astextplain
1+
###############################################################################
2+
# Set default behavior to automatically normalize line endings.
3+
###############################################################################
4+
* text=auto
115

12-
*.jpg binary
13-
*.png binary
14-
*.gif binary
6+
###############################################################################
7+
# Set default behavior for command prompt diff.
8+
#
9+
# This is need for earlier builds of msysgit that does not have it on by
10+
# default for csharp files.
11+
# Note: This is only used by command line
12+
###############################################################################
13+
#*.cs diff=csharp
1514

16-
*.cs text=auto diff=csharp eol=crlf
17-
*.vb text=auto eol=crlf
18-
*.resx text=auto
19-
*.html text=auto
20-
*.htm text=auto
21-
*.css text=auto
22-
*.scss text=auto
23-
*.sass text=auto
24-
*.less text=auto
25-
*.js text=auto
26-
*.sql text=auto eol=crlf
15+
###############################################################################
16+
# Set the merge driver for project and solution files
17+
#
18+
# Merging from the command prompt will add diff markers to the files if there
19+
# are conflicts (Merging from VS is not affected by the settings below, in VS
20+
# the diff markers are never inserted). Diff markers may cause the following
21+
# file extensions to fail to load in VS. An alternative would be to treat
22+
# these files as binary and thus will always conflict and require user
23+
# intervention with every merge. To do so, just uncomment the entries below
24+
###############################################################################
25+
#*.sln merge=binary
26+
#*.csproj merge=binary
27+
#*.vbproj merge=binary
28+
#*.vcxproj merge=binary
29+
#*.vcproj merge=binary
30+
#*.dbproj merge=binary
31+
#*.fsproj merge=binary
32+
#*.lsproj merge=binary
33+
#*.wixproj merge=binary
34+
#*.modelproj merge=binary
35+
#*.sqlproj merge=binary
36+
#*.wwaproj merge=binary
2737

28-
*.csproj text=auto eol=crlf
29-
*.vbproj text=auto eol=crlf
30-
*.fsproj text=auto eol=crlf
31-
*.dbproj text=auto eol=crlf
32-
*.sln text=auto eol=crlf
38+
###############################################################################
39+
# behavior for image files
40+
#
41+
# image files are treated as binary by default.
42+
###############################################################################
43+
#*.jpg binary
44+
#*.png binary
45+
#*.gif binary
3346

34-
*.sh eol=lf
47+
###############################################################################
48+
# diff behavior for common document formats
49+
#
50+
# Convert binary document formats to text before diffing them. This feature
51+
# is only available from the command line. Turn it on by uncommenting the
52+
# entries below.
53+
###############################################################################
54+
#*.doc diff=astextplain
55+
#*.DOC diff=astextplain
56+
#*.docx diff=astextplain
57+
#*.DOCX diff=astextplain
58+
#*.dot diff=astextplain
59+
#*.DOT diff=astextplain
60+
#*.pdf diff=astextplain
61+
#*.PDF diff=astextplain
62+
#*.rtf diff=astextplain
63+
#*.RTF diff=astextplain

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ _ReSharper*/
3333
src/Tools/MarkdownToNamespaceDoc/packages/*/
3434
src/Tools/TsGenerator/.vs/*
3535
src/Help/*
36+
**/.vs/*
3637
src/Server/Coderr.Server.Web.Tests/applicationhost.config
3738
/src/Server/Coderr.Server.Web/node_modules/*
38-
/src/Server/Coderr.Server.Web/wwwroot/dist**
39+
/src/Server/Coderr.Server.Web/wwwroot/dist/**
40+
/src/Server/Coderr.Server.Web/npm-shrinkwrap.json
41+
/src/Server/node_modules/**

src/Server/Coderr.Server.Abstractions/Boot/IConfigurationSection.cs

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

44
namespace Coderr.Server.Abstractions.Boot
55
{
6+
/// <summary>
7+
/// Abstraction for the .NET Core configuration files.
8+
/// </summary>
69
public interface IConfigurationSection
710
{
811
string this[string name] { get; }

src/Server/Coderr.Server.Abstractions/Coderr.Server.Abstractions.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</ItemGroup>
1010

1111
<ItemGroup>
12-
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="2.0.0" />
12+
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="2.2.0" />
1313
</ItemGroup>
1414

1515

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using Coderr.Server.Api.Core.Incidents.Queries;
4+
5+
namespace Coderr.Server.Abstractions.Incidents
6+
{
7+
public class HighlightedContextDataProviderContext
8+
{
9+
private readonly IList<HighlightedContextData> _items;
10+
11+
public HighlightedContextDataProviderContext(IList<HighlightedContextData> items)
12+
{
13+
_items = items ?? throw new ArgumentNullException(nameof(items));
14+
Tags = new string[0];
15+
}
16+
17+
public int ApplicationId { get; set; }
18+
public string Description { get; set; }
19+
20+
/// <summary>
21+
/// Namespace + name of exception
22+
/// </summary>
23+
public string FullName { get; set; }
24+
25+
public int IncidentId { get; set; }
26+
27+
public IEnumerable<HighlightedContextData> Items => _items;
28+
29+
public string StackTrace { get; set; }
30+
public string[] Tags { get; set; }
31+
32+
public void AddValue(HighlightedContextData contextData)
33+
{
34+
if (contextData == null) throw new ArgumentNullException(nameof(contextData));
35+
_items.Add(contextData);
36+
}
37+
}
38+
}

src/Server/Coderr.Server.Abstractions/Incidents/IHighlightedContextDataProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ namespace Coderr.Server.Abstractions.Incidents
66
{
77
public interface IHighlightedContextDataProvider
88
{
9-
Task CollectAsync(int incidentId, ICollection<HighlightedContextData> data);
9+
Task CollectAsync(HighlightedContextDataProviderContext context);
1010
}
1111
}

src/Server/Coderr.Server.Abstractions/Incidents/ISolutionProvider.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@
44

55
namespace Coderr.Server.Abstractions.Incidents
66
{
7+
/// <summary>
8+
/// Checks if there is a solution available for the current incident.
9+
/// </summary>
710
public interface ISolutionProvider
811
{
9-
Task SuggestSolutionAsync(int incidentId, ICollection<SuggestedIncidentSolution> suggestedSolutions);
12+
Task SuggestSolutionAsync(SolutionProviderContext context);
1013
}
1114
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using Coderr.Server.Api.Core.Incidents.Queries;
4+
5+
namespace Coderr.Server.Abstractions.Incidents
6+
{
7+
public class SolutionProviderContext
8+
{
9+
private readonly List<SuggestedIncidentSolution> _possibleSolutions;
10+
11+
public SolutionProviderContext(List<SuggestedIncidentSolution> possibleSolutions)
12+
{
13+
_possibleSolutions = possibleSolutions;
14+
}
15+
16+
public int ApplicationId { get; set; }
17+
public string Description { get; set; }
18+
19+
/// <summary>
20+
/// Namespace + name of exception
21+
/// </summary>
22+
public string FullName { get; set; }
23+
24+
public int IncidentId { get; set; }
25+
26+
public string StackTrace { get; set; }
27+
public string[] Tags { get; set; }
28+
29+
public void AddSuggestion(string suggestion, string motivation)
30+
{
31+
if (suggestion == null) throw new ArgumentNullException(nameof(suggestion));
32+
if (motivation == null) throw new ArgumentNullException(nameof(motivation));
33+
_possibleSolutions.Add(new SuggestedIncidentSolution {Reason = motivation, SuggestedSolution = suggestion});
34+
}
35+
}
36+
}

src/Server/Coderr.Server.Abstractions/Security/ClaimsExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public static string ToFriendlyString(this IPrincipal principal)
149149
return "Anonymous";
150150
}
151151

152-
string str = cc.Identity.Name + " [";
152+
string str = cc.Identity.Name + " Claims[";
153153
foreach (var claim in cc.Claims)
154154
{
155155
var pos = claim.Type.LastIndexOf('/');

src/Server/Coderr.Server.Abstractions/Security/CoderrClaims.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ namespace Coderr.Server.Abstractions.Security
44
{
55
public class CoderrClaims
66
{
7-
public const string Application = "http://coderrapp.com/claims/application";
8-
public const string ApplicationAdmin = "http://coderrapp.com/claims/application/admin";
7+
public const string Application = "http://coderr/claims/application";
8+
public const string ApplicationAdmin = "http://coderr/claims/application/admin";
99

1010
public static readonly ClaimsPrincipal SystemPrincipal = new ClaimsPrincipal(new ClaimsIdentity(new[]
1111
{

0 commit comments

Comments
 (0)