Skip to content

Commit aaf24a1

Browse files
committed
Rebuilt template.
1 parent ff4178f commit aaf24a1

File tree

1,371 files changed

+201162
-9694
lines changed

Some content is hidden

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

1,371 files changed

+201162
-9694
lines changed

src/AbpZeroSample.Application/AbpZeroSample.Application.csproj renamed to src/AbpCompanyName.AbpProjectName.Application/AbpCompanyName.AbpProjectName.Application.csproj

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
<ProjectGuid>{EDF5D964-4C0F-4F19-B674-58A38A5E5401}</ProjectGuid>
88
<OutputType>Library</OutputType>
99
<AppDesignerFolder>Properties</AppDesignerFolder>
10-
<RootNamespace>AbpZeroSample</RootNamespace>
11-
<AssemblyName>AbpZeroSample.Application</AssemblyName>
10+
<RootNamespace>AbpCompanyName.AbpProjectName</RootNamespace>
11+
<AssemblyName>AbpCompanyName.AbpProjectName.Application</AssemblyName>
1212
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
1414
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
@@ -32,12 +32,16 @@
3232
<WarningLevel>4</WarningLevel>
3333
</PropertyGroup>
3434
<ItemGroup>
35-
<Reference Include="Abp, Version=0.6.1.1, Culture=neutral, processorArchitecture=MSIL">
36-
<HintPath>..\packages\Abp.0.6.1.1\lib\net451\Abp.dll</HintPath>
35+
<Reference Include="Abp, Version=0.6.3.1, Culture=neutral, processorArchitecture=MSIL">
36+
<HintPath>..\packages\Abp.0.6.3.1\lib\net451\Abp.dll</HintPath>
3737
<Private>True</Private>
3838
</Reference>
39-
<Reference Include="Abp.AutoMapper, Version=0.6.1.1, Culture=neutral, processorArchitecture=MSIL">
40-
<HintPath>..\packages\Abp.AutoMapper.0.6.1.1\lib\net451\Abp.AutoMapper.dll</HintPath>
39+
<Reference Include="Abp.AutoMapper, Version=0.6.3.0, Culture=neutral, processorArchitecture=MSIL">
40+
<HintPath>..\packages\Abp.AutoMapper.0.6.3.0\lib\net451\Abp.AutoMapper.dll</HintPath>
41+
<Private>True</Private>
42+
</Reference>
43+
<Reference Include="Abp.Zero, Version=0.6.4.0, Culture=neutral, processorArchitecture=MSIL">
44+
<HintPath>..\packages\Abp.Zero.0.6.4.0\lib\net451\Abp.Zero.dll</HintPath>
4145
<Private>True</Private>
4246
</Reference>
4347
<Reference Include="AutoMapper">
@@ -58,6 +62,10 @@
5862
<SpecificVersion>False</SpecificVersion>
5963
<HintPath>..\packages\Castle.Windsor.3.3.0\lib\net45\Castle.Windsor.dll</HintPath>
6064
</Reference>
65+
<Reference Include="Microsoft.AspNet.Identity.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
66+
<HintPath>..\packages\Microsoft.AspNet.Identity.Core.2.2.1\lib\net45\Microsoft.AspNet.Identity.Core.dll</HintPath>
67+
<Private>True</Private>
68+
</Reference>
6169
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
6270
<SpecificVersion>False</SpecificVersion>
6371
<HintPath>..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
@@ -85,21 +93,25 @@
8593
<Reference Include="System.Xml" />
8694
</ItemGroup>
8795
<ItemGroup>
88-
<Compile Include="AbpZeroSampleApplicationModule.cs" />
89-
<Compile Include="AbpZeroSampleAppServiceBase.cs" />
96+
<Compile Include="AbpProjectNameApplicationModule.cs" />
97+
<Compile Include="AbpProjectNameAppServiceBase.cs" />
9098
<Compile Include="Properties\AssemblyInfo.cs" />
99+
<Compile Include="Sessions\Dto\GetCurrentLoginInformationsOutput.cs" />
100+
<Compile Include="Sessions\Dto\TenantLoginInfoDto.cs" />
101+
<Compile Include="Sessions\Dto\UserLoginInfoDto.cs" />
102+
<Compile Include="Sessions\ISessionAppService.cs" />
103+
<Compile Include="Sessions\SessionAppService.cs" />
91104
</ItemGroup>
92105
<ItemGroup>
93106
<None Include="app.config" />
94107
<None Include="packages.config" />
95108
</ItemGroup>
96109
<ItemGroup>
97-
<ProjectReference Include="..\AbpZeroSample.Core\AbpZeroSample.Core.csproj">
98-
<Project>{17298EA0-AF73-4F30-B6F1-2066100D7D74}</Project>
99-
<Name>AbpZeroSample.Core</Name>
110+
<ProjectReference Include="..\AbpCompanyName.AbpProjectName.Core\AbpCompanyName.AbpProjectName.Core.csproj">
111+
<Project>{17298ea0-af73-4f30-b6f1-2066100d7d74}</Project>
112+
<Name>AbpCompanyName.AbpProjectName.Core</Name>
100113
</ProjectReference>
101114
</ItemGroup>
102-
<ItemGroup />
103115
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
104116
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
105117
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
using System;
2+
using System.Threading.Tasks;
3+
using Abp.Application.Services;
4+
using Abp.Runtime.Session;
5+
using AbpCompanyName.AbpProjectName.MultiTenancy;
6+
using AbpCompanyName.AbpProjectName.Users;
7+
8+
namespace AbpCompanyName.AbpProjectName
9+
{
10+
/// <summary>
11+
/// Derive your application services from this class.
12+
/// </summary>
13+
public abstract class AbpProjectNameAppServiceBase : ApplicationService
14+
{
15+
public TenantManager TenantManager { get; set; }
16+
17+
public UserManager UserManager { get; set; }
18+
19+
protected AbpProjectNameAppServiceBase()
20+
{
21+
LocalizationSourceName = AbpProjectNameConsts.LocalizationSourceName;
22+
}
23+
24+
protected virtual Task<User> GetCurrentUserAsync()
25+
{
26+
var user = UserManager.FindByIdAsync(AbpSession.GetUserId());
27+
if (user == null)
28+
{
29+
throw new ApplicationException("There is no current user!");
30+
}
31+
32+
return user;
33+
}
34+
35+
protected virtual Task<Tenant> GetCurrentTenantAsync()
36+
{
37+
return TenantManager.GetByIdAsync(AbpSession.GetTenantId());
38+
}
39+
}
40+
}

src/AbpZeroSample.Application/AbpZeroSampleApplicationModule.cs renamed to src/AbpCompanyName.AbpProjectName.Application/AbpProjectNameApplicationModule.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
using System.Reflection;
2+
using Abp.AutoMapper;
23
using Abp.Modules;
34

4-
namespace AbpZeroSample
5+
namespace AbpCompanyName.AbpProjectName
56
{
6-
[DependsOn(typeof(AbpZeroSampleCoreModule))]
7-
public class AbpZeroSampleApplicationModule : AbpModule
7+
[DependsOn(typeof(AbpProjectNameCoreModule), typeof(AbpAutoMapperModule))]
8+
public class AbpProjectNameApplicationModule : AbpModule
89
{
910
public override void Initialize()
1011
{

src/AbpZeroSample.Application/Properties/AssemblyInfo.cs renamed to src/AbpCompanyName.AbpProjectName.Application/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
// General Information about an assembly is controlled through the following
66
// set of attributes. Change these attribute values to modify the information
77
// associated with an assembly.
8-
[assembly: AssemblyTitle("AbpZeroSample.Application")]
8+
[assembly: AssemblyTitle("AbpCompanyName.AbpProjectName.Application")]
99
[assembly: AssemblyDescription("")]
1010
[assembly: AssemblyConfiguration("")]
1111
[assembly: AssemblyCompany("")]
12-
[assembly: AssemblyProduct("AbpZeroSample.Application")]
12+
[assembly: AssemblyProduct("AbpCompanyName.AbpProjectName.Application")]
1313
[assembly: AssemblyCopyright("Copyright © 2014")]
1414
[assembly: AssemblyTrademark("")]
1515
[assembly: AssemblyCulture("")]
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
using Abp.Application.Services.Dto;
2+
3+
namespace AbpCompanyName.AbpProjectName.Sessions.Dto
4+
{
5+
public class GetCurrentLoginInformationsOutput : IOutputDto
6+
{
7+
public UserLoginInfoDto User { get; set; }
8+
9+
public TenantLoginInfoDto Tenant { get; set; }
10+
}
11+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using Abp.Application.Services.Dto;
2+
using Abp.AutoMapper;
3+
using AbpCompanyName.AbpProjectName.MultiTenancy;
4+
5+
namespace AbpCompanyName.AbpProjectName.Sessions.Dto
6+
{
7+
[AutoMapFrom(typeof(Tenant))]
8+
public class TenantLoginInfoDto : EntityDto
9+
{
10+
public string TenancyName { get; set; }
11+
12+
public string Name { get; set; }
13+
}
14+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using Abp.Application.Services.Dto;
2+
using Abp.AutoMapper;
3+
using AbpCompanyName.AbpProjectName.Users;
4+
5+
namespace AbpCompanyName.AbpProjectName.Sessions.Dto
6+
{
7+
[AutoMapFrom(typeof(User))]
8+
public class UserLoginInfoDto : EntityDto<long>
9+
{
10+
public string Name { get; set; }
11+
12+
public string Surname { get; set; }
13+
14+
public string UserName { get; set; }
15+
16+
public string EmailAddress { get; set; }
17+
}
18+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
using Abp.Application.Services;
7+
using AbpCompanyName.AbpProjectName.Sessions.Dto;
8+
9+
namespace AbpCompanyName.AbpProjectName.Sessions
10+
{
11+
public interface ISessionAppService : IApplicationService
12+
{
13+
Task<GetCurrentLoginInformationsOutput> GetCurrentLoginInformations();
14+
}
15+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
using System.Threading.Tasks;
2+
using Abp.Auditing;
3+
using Abp.Authorization;
4+
using Abp.AutoMapper;
5+
using AbpCompanyName.AbpProjectName.Sessions.Dto;
6+
7+
namespace AbpCompanyName.AbpProjectName.Sessions
8+
{
9+
[AbpAuthorize]
10+
public class SessionAppService : AbpProjectNameAppServiceBase, ISessionAppService
11+
{
12+
[DisableAuditing]
13+
public async Task<GetCurrentLoginInformationsOutput> GetCurrentLoginInformations()
14+
{
15+
var output = new GetCurrentLoginInformationsOutput
16+
{
17+
User = (await GetCurrentUserAsync()).MapTo<UserLoginInfoDto>()
18+
};
19+
20+
if (AbpSession.TenantId.HasValue)
21+
{
22+
output.Tenant = (await GetCurrentTenantAsync()).MapTo<TenantLoginInfoDto>();
23+
}
24+
25+
return output;
26+
}
27+
}
28+
}

src/AbpZeroSample.Application/app.config renamed to src/AbpCompanyName.AbpProjectName.Application/app.config

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
<assemblyIdentity name="AutoMapper" publicKeyToken="be96cd2c38ef1005" culture="neutral" />
1515
<bindingRedirect oldVersion="0.0.0.0-3.3.0.0" newVersion="3.3.0.0" />
1616
</dependentAssembly>
17+
<dependentAssembly>
18+
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
19+
<bindingRedirect oldVersion="0.0.0.0-4.5.0.0" newVersion="4.5.0.0" />
20+
</dependentAssembly>
1721
</assemblyBinding>
1822
</runtime>
1923
</configuration>

0 commit comments

Comments
 (0)