Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
CacheManagement
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
CacheManagement
Commits
45e15216
Commit
45e15216
authored
Mar 25, 2020
by
Super
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove sample.
parent
9a2aaca3
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
1 addition
and
122 deletions
+1
-122
ISampleAppService.cs
...acts/EasyAbp/CacheManagement/Samples/ISampleAppService.cs
+0
-12
SampleDto.cs
...on.Contracts/EasyAbp/CacheManagement/Samples/SampleDto.cs
+0
-7
SampleAppService.cs
...ation/EasyAbp/CacheManagement/Samples/SampleAppService.cs
+0
-29
SampleController.cs
...tpApi/EasyAbp/CacheManagement/Samples/SampleController.cs
+0
-33
EasyAbp.CacheManagement.Application.Tests.csproj
...on.Tests/EasyAbp.CacheManagement.Application.Tests.csproj
+1
-1
SampleAppService_Tests.cs
...ement.Application.Tests/Samples/SampleAppService_Tests.cs
+0
-30
ClientDemoService.cs
...gement.HttpApi.Client.ConsoleTestApp/ClientDemoService.cs
+0
-10
No files found.
src/EasyAbp.CacheManagement.Application.Contracts/EasyAbp/CacheManagement/Samples/ISampleAppService.cs
deleted
100644 → 0
View file @
9a2aaca3
using
System.Threading.Tasks
;
using
Volo.Abp.Application.Services
;
namespace
EasyAbp.CacheManagement.Samples
{
public
interface
ISampleAppService
:
IApplicationService
{
Task
<
SampleDto
>
GetAsync
();
Task
<
SampleDto
>
GetAuthorizedAsync
();
}
}
src/EasyAbp.CacheManagement.Application.Contracts/EasyAbp/CacheManagement/Samples/SampleDto.cs
deleted
100644 → 0
View file @
9a2aaca3
namespace
EasyAbp.CacheManagement.Samples
{
public
class
SampleDto
{
public
int
Value
{
get
;
set
;
}
}
}
\ No newline at end of file
src/EasyAbp.CacheManagement.Application/EasyAbp/CacheManagement/Samples/SampleAppService.cs
deleted
100644 → 0
View file @
9a2aaca3
using
System.Threading.Tasks
;
using
Microsoft.AspNetCore.Authorization
;
namespace
EasyAbp.CacheManagement.Samples
{
public
class
SampleAppService
:
CacheManagementAppService
,
ISampleAppService
{
public
Task
<
SampleDto
>
GetAsync
()
{
return
Task
.
FromResult
(
new
SampleDto
{
Value
=
42
}
);
}
[
Authorize
]
public
Task
<
SampleDto
>
GetAuthorizedAsync
()
{
return
Task
.
FromResult
(
new
SampleDto
{
Value
=
42
}
);
}
}
}
\ No newline at end of file
src/EasyAbp.CacheManagement.HttpApi/EasyAbp/CacheManagement/Samples/SampleController.cs
deleted
100644 → 0
View file @
9a2aaca3
using
System.Threading.Tasks
;
using
Microsoft.AspNetCore.Authorization
;
using
Microsoft.AspNetCore.Mvc
;
using
Volo.Abp
;
namespace
EasyAbp.CacheManagement.Samples
{
[
RemoteService
]
[
Route
(
"api/CacheManagement/sample"
)]
public
class
SampleController
:
CacheManagementController
,
ISampleAppService
{
private
readonly
ISampleAppService
_sampleAppService
;
public
SampleController
(
ISampleAppService
sampleAppService
)
{
_sampleAppService
=
sampleAppService
;
}
[
HttpGet
]
public
async
Task
<
SampleDto
>
GetAsync
()
{
return
await
_sampleAppService
.
GetAsync
();
}
[
HttpGet
]
[
Route
(
"authorized"
)]
[
Authorize
]
public
async
Task
<
SampleDto
>
GetAuthorizedAsync
()
{
return
await
_sampleAppService
.
GetAsync
();
}
}
}
test/EasyAbp.CacheManagement.Application.Tests/EasyAbp.CacheManagement.Application.Tests.csproj
View file @
45e15216
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
...
...
test/EasyAbp.CacheManagement.Application.Tests/Samples/SampleAppService_Tests.cs
deleted
100644 → 0
View file @
9a2aaca3
using
System.Threading.Tasks
;
using
Shouldly
;
using
Xunit
;
namespace
EasyAbp.CacheManagement.Samples
{
public
class
SampleAppService_Tests
:
CacheManagementApplicationTestBase
{
private
readonly
ISampleAppService
_sampleAppService
;
public
SampleAppService_Tests
()
{
_sampleAppService
=
GetRequiredService
<
ISampleAppService
>();
}
[
Fact
]
public
async
Task
GetAsync
()
{
var
result
=
await
_sampleAppService
.
GetAsync
();
result
.
Value
.
ShouldBe
(
42
);
}
[
Fact
]
public
async
Task
GetAuthorizedAsync
()
{
var
result
=
await
_sampleAppService
.
GetAuthorizedAsync
();
result
.
Value
.
ShouldBe
(
42
);
}
}
}
test/EasyAbp.CacheManagement.HttpApi.Client.ConsoleTestApp/ClientDemoService.cs
View file @
45e15216
...
...
@@ -3,7 +3,6 @@ using System.Net.Http;
using
System.Threading.Tasks
;
using
IdentityModel.Client
;
using
Microsoft.Extensions.Configuration
;
using
EasyAbp.CacheManagement.Samples
;
using
Volo.Abp.DependencyInjection
;
using
Volo.Abp.IdentityModel
;
...
...
@@ -11,16 +10,13 @@ namespace EasyAbp.CacheManagement
{
public
class
ClientDemoService
:
ITransientDependency
{
private
readonly
ISampleAppService
_sampleAppService
;
private
readonly
IIdentityModelAuthenticationService
_authenticationService
;
private
readonly
IConfiguration
_configuration
;
public
ClientDemoService
(
ISampleAppService
sampleAppService
,
IIdentityModelAuthenticationService
authenticationService
,
IConfiguration
configuration
)
{
_sampleAppService
=
sampleAppService
;
_authenticationService
=
authenticationService
;
_configuration
=
configuration
;
}
...
...
@@ -40,12 +36,6 @@ namespace EasyAbp.CacheManagement
{
Console
.
WriteLine
();
Console
.
WriteLine
(
$"*****
{
nameof
(
TestWithDynamicProxiesAsync
)}
*****"
);
var
result
=
await
_sampleAppService
.
GetAsync
();
Console
.
WriteLine
(
"Result: "
+
result
.
Value
);
result
=
await
_sampleAppService
.
GetAuthorizedAsync
();
Console
.
WriteLine
(
"Result (authorized): "
+
result
.
Value
);
}
/* Shows how to use HttpClient to perform a request to the HTTP API.
...
...
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