Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
com.akaver.sportmap
SportMap-ASPNET
Commits
2e314c36
Commit
2e314c36
authored
May 15, 2020
by
Andres Käver
Browse files
nuget
parent
c055e5c7
Pipeline
#824
passed with stages
in 1 minute and 54 seconds
Changes
62
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Domain.Base/DomainEntityId.cs
View file @
2e314c36
using
System
;
using
Contracts.Domain
;
using
com.akaver.sportmap.Contracts.Domain
;
namespace
Domain.Base
{
public
abstract
class
DomainEntityId
:
DomainEntityId
<
Guid
>,
IDomainEntityId
...
...
Domain.Base/DomainEntityIdMetadata.cs
View file @
2e314c36
using
System
;
using
System.ComponentModel.DataAnnotations
;
using
System.Text.Json.Serialization
;
using
Contracts.Domain
;
using
com.akaver.sportmap.
Contracts.Domain
;
namespace
Domain.Base
{
...
...
Domain.Base/DomainEntityIdMetadataUser.cs
View file @
2e314c36
using
System
;
using
System.Text.Json.Serialization
;
using
Contracts.Domain
;
using
com.akaver.sportmap.
Contracts.Domain
;
using
Microsoft.AspNetCore.Identity
;
namespace
Domain.Base
...
...
Domain.Base/DomainEntityIdUser.cs
View file @
2e314c36
using
System
;
using
System.Text.Json.Serialization
;
using
Contracts.Domain
;
using
com.akaver.sportmap.
Contracts.Domain
;
using
Microsoft.AspNetCore.Identity
;
namespace
Domain.Base
...
...
PublicApi.DTO.v1/CultureDTO.cs
0 → 100644
View file @
2e314c36
namespace
PublicApi.DTO.v1
{
public
class
CultureDTO
{
public
string
Code
{
get
;
set
;
}
=
default
!;
public
string
Name
{
get
;
set
;
}
=
default
!;
}
}
\ No newline at end of file
PublicApi.DTO.v1/GpsLocation.cs
View file @
2e314c36
using
System
;
using
Contracts.DAL.Base
;
using
Contracts.Domain
;
using
com.akaver.sportmap.
Contracts.Domain
;
using
PublicApi.DTO.v1.Identity
;
namespace
PublicApi.DTO.v1
...
...
PublicApi.DTO.v1/GpsLocationType.cs
View file @
2e314c36
using
System
;
using
System.ComponentModel.DataAnnotations
;
using
Contracts.DAL.Base
;
using
Contracts.Domain
;
using
com.akaver.sportmap.
Contracts.Domain
;
namespace
PublicApi.DTO.v1
{
...
...
PublicApi.DTO.v1/GpsSession.cs
View file @
2e314c36
...
...
@@ -2,7 +2,7 @@
using
System.Collections.Generic
;
using
System.ComponentModel.DataAnnotations
;
using
Contracts.DAL.Base
;
using
Contracts.Domain
;
using
com.akaver.sportmap.
Contracts.Domain
;
using
PublicApi.DTO.v1.Identity
;
namespace
PublicApi.DTO.v1
...
...
PublicApi.DTO.v1/GpsSessionType.cs
View file @
2e314c36
using
System
;
using
System.Collections.Generic
;
using
Contracts.Domain
;
using
com.akaver.sportmap.
Contracts.Domain
;
namespace
PublicApi.DTO.v1
{
...
...
PublicApi.DTO.v1/Identity/AppRole.cs
View file @
2e314c36
using
System
;
using
System.ComponentModel.DataAnnotations
;
using
Contracts.DAL.Base
;
using
Contracts.Domain
;
using
com.akaver.sportmap.
Contracts.Domain
;
namespace
PublicApi.DTO.v1.Identity
{
...
...
PublicApi.DTO.v1/Identity/AppUser.cs
View file @
2e314c36
using
System
;
using
System.ComponentModel.DataAnnotations
;
using
Contracts.DAL.Base
;
using
Contracts.Domain
;
using
com.akaver.sportmap.
Contracts.Domain
;
namespace
PublicApi.DTO.v1.Identity
{
...
...
PublicApi.DTO.v1/PublicApi.DTO.v1.csproj
View file @
2e314c36
...
...
@@ -6,13 +6,14 @@
<ItemGroup>
<PackageReference Include="AutoMapper" Version="9.0.0" />
<PackageReference Include="com.akaver.sportmap.Contracts.Domain" Version="1.0.0" />
<PackageReference Include="System.ComponentModel.Annotations" Version="4.7.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BLL.App.DTO\BLL.App.DTO.csproj" />
<ProjectReference Include="..\Contracts.DAL.Base\Contracts.DAL.Base.csproj" />
<ProjectReference Include="..\Contracts.Domain\Contracts.Domain.csproj" />
<ProjectReference Include="..\DAL.Base\DAL.Base.csproj" />
</ItemGroup>
...
...
PublicApi.DTO.v1/Track.cs
View file @
2e314c36
...
...
@@ -2,7 +2,7 @@ using System;
using
System.Collections.Generic
;
using
System.ComponentModel.DataAnnotations
;
using
BLL.App.DTO
;
using
Contracts.Domain
;
using
com.akaver.sportmap.
Contracts.Domain
;
namespace
PublicApi.DTO.v1
{
...
...
PublicApi.DTO.v1/TrackPoint.cs
View file @
2e314c36
using
System
;
using
System.Collections.Generic
;
using
Contracts.Domain
;
using
com.akaver.sportmap.
Contracts.Domain
;
namespace
PublicApi.DTO.v1
{
...
...
Resources/Views/Shared/_Layout.ru.resx
View file @
2e314c36
...
...
@@ -19,13 +19,13 @@
<value>
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
</value>
</resheader>
<data
name=
"Home"
>
<value>
Home
</value>
<value>
Glavnaja
</value>
</data>
<data
name=
"Privacy"
>
<value>
Priva
cy
</value>
<value>
Priva
tnost
</value>
</data>
<data
name=
"GpsSessions"
>
<value>
Gps Sessi
ons
</value>
<value>
Gps Sessi
i
</value>
</data>
<data
name=
"Admin"
>
<value>
Admin
</value>
...
...
WebApp/ApiControllers/1.0/CulturesController.cs
0 → 100644
View file @
2e314c36
using
System.Collections
;
using
System.Collections.Generic
;
using
System.Globalization
;
using
System.Linq
;
using
System.Threading
;
using
Microsoft.AspNetCore.Builder
;
using
Microsoft.AspNetCore.Http
;
using
Microsoft.AspNetCore.Mvc
;
using
Microsoft.Extensions.Localization
;
using
Microsoft.Extensions.Options
;
using
PublicApi.DTO.v1
;
namespace
WebApp.ApiControllers._1._0
{
/// <summary>
/// Culture info
/// </summary>
[
Route
(
"api/v{version:apiVersion}/[controller]"
)]
[
ApiController
]
[
ApiVersion
(
"1.0"
)]
public
class
CulturesController
:
ControllerBase
{
private
readonly
IOptions
<
RequestLocalizationOptions
>
_localizationOptions
;
/// <summary>
/// Constructor
/// </summary>
/// <param name="localizationOptions"></param>
public
CulturesController
(
IOptions
<
RequestLocalizationOptions
>
localizationOptions
)
{
_localizationOptions
=
localizationOptions
;
}
/// <summary>
/// Get the list of supported cultures
/// </summary>
/// <returns></returns>
[
HttpGet
]
[
Produces
(
"application/json"
)]
[
Consumes
(
"application/json"
)]
[
ProducesResponseType
(
StatusCodes
.
Status200OK
,
Type
=
typeof
(
IEnumerable
<
CultureDTO
>))]
public
ActionResult
<
IEnumerable
<
CultureDTO
>>
GetCultures
()
{
var
result
=
_localizationOptions
.
Value
.
SupportedUICultures
.
Select
(
c
=>
new
CultureDTO
()
{
Code
=
c
.
Name
,
Name
=
c
.
NativeName
,
}).
ToList
();
return
Ok
(
result
);
}
/// <summary>
/// Get the resource strings and keys
/// </summary>
/// <returns></returns>
[
HttpGet
(
"resources"
)]
public
ActionResult
<
IEnumerable
<
string
>>
GetResources
()
{
var
res
=
new
List
<
CultureDTO
>();
var
resourceSet
=
Resources
.
Views
.
Shared
.
_Layout
.
ResourceManager
.
GetResourceSet
(
Thread
.
CurrentThread
.
CurrentUICulture
,
true
,
true
);
if
(
resourceSet
==
null
)
{
return
Ok
(
res
);
}
foreach
(
DictionaryEntry
?
entry
in
resourceSet
)
{
if
(
entry
==
null
)
continue
;
res
.
Add
(
new
CultureDTO
()
{
Name
=
entry
.
Value
.
Value
!.
ToString
()!,
Code
=
entry
.
Value
.
Key
.
ToString
()!});
}
return
Ok
(
res
);
}
}
}
\ No newline at end of file
WebApp/Areas/Admin/Views/LangStrTranslations/Delete.cshtml
View file @
2e314c36
...
...
@@ -27,7 +27,7 @@
@Html.DisplayNameFor(model => model.LangStr)
</dt>
<dd
class =
"col-sm-10"
>
@Html.DisplayFor(model => model.LangStr.Id)
@Html.DisplayFor(model => model.LangStr
!
.Id)
</dd>
<dt
class =
"col-sm-2"
>
@Html.DisplayNameFor(model => model.CreatedBy)
...
...
WebApp/Areas/Admin/Views/LangStrTranslations/Details.cshtml
View file @
2e314c36
...
...
@@ -26,7 +26,7 @@
@Html.DisplayNameFor(model => model.LangStr)
</dt>
<dd
class =
"col-sm-10"
>
@Html.DisplayFor(model => model.LangStr.Id)
@Html.DisplayFor(model => model.LangStr
!
.Id)
</dd>
<dt
class =
"col-sm-2"
>
@Html.DisplayNameFor(model => model.CreatedBy)
...
...
WebApp/Areas/Admin/Views/LangStrTranslations/Index.cshtml
View file @
2e314c36
...
...
@@ -35,7 +35,7 @@
@Html.DisplayFor(modelItem => item.Value)
</td>
<td>
@Html.DisplayFor(modelItem => item.LangStr.Id)
@Html.DisplayFor(modelItem => item.LangStr
!
.Id)
</td>
<td>
...
...
WebApp/Startup.cs
View file @
2e314c36
...
...
@@ -97,16 +97,14 @@ namespace WebApp
};
});
var
supportedCultures
=
Configuration
.
GetSection
(
"SupportedCultures"
)
.
GetChildren
()
.
Select
(
x
=>
new
CultureInfo
(
x
.
Value
))
.
ToArray
();
services
.
Configure
<
RequestLocalizationOptions
>(
options
=>
{
// TODO: Move to configuration
var
supportedCultures
=
new
[]
{
new
CultureInfo
(
"en-GB"
),
new
CultureInfo
(
"et-EE"
),
new
CultureInfo
(
"ru-RU"
),
};
// datetime and currency support
options
.
SupportedCultures
=
supportedCultures
;
// UI translated strings
...
...
Prev
1
2
3
4
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment