Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
CAP
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
CAP
Commits
27b59b8c
Commit
27b59b8c
authored
Oct 27, 2017
by
Savorboard
Committed by
GitHub
Oct 27, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update README.md
parent
e50ec84d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
61 additions
and
62 deletions
+61
-62
README.md
README.md
+61
-62
No files found.
README.md
View file @
27b59b8c
...
@@ -60,7 +60,7 @@ First,You need to config CAP in your Startup.cs:
...
@@ -60,7 +60,7 @@ First,You need to config CAP in your Startup.cs:
```
cs
```
cs
public
void
ConfigureServices
(
IServiceCollection
services
)
public
void
ConfigureServices
(
IServiceCollection
services
)
{
{
......
//
......
services
.
AddDbContext
<
AppDbContext
>();
services
.
AddDbContext
<
AppDbContext
>();
...
@@ -85,7 +85,7 @@ public void ConfigureServices(IServiceCollection services)
...
@@ -85,7 +85,7 @@ public void ConfigureServices(IServiceCollection services)
public
void
Configure
(
IApplicationBuilder
app
)
public
void
Configure
(
IApplicationBuilder
app
)
{
{
.....
//
.....
app
.
UseCap
();
app
.
UseCap
();
}
}
...
@@ -148,7 +148,7 @@ public class PublishController : Controller
...
@@ -148,7 +148,7 @@ public class PublishController : Controller
If your subscribe method is not in the Controller,then your subscribe class need to Inheritance
`ICapSubscribe`
:
If your subscribe method is not in the Controller,then your subscribe class need to Inheritance
`ICapSubscribe`
:
```
c
s
```
c
#
namespace
xxx.Service
namespace
xxx.Service
{
{
...
@@ -163,7 +163,6 @@ namespace xxx.Service
...
@@ -163,7 +163,6 @@ namespace xxx.Service
[
CapSubscribe
(
"xxx.services.account.check"
)]
[
CapSubscribe
(
"xxx.services.account.check"
)]
public
void
CheckReceivedMessage
(
Person
person
)
public
void
CheckReceivedMessage
(
Person
person
)
{
{
}
}
}
}
}
}
...
@@ -172,7 +171,7 @@ namespace xxx.Service
...
@@ -172,7 +171,7 @@ namespace xxx.Service
Then inject your
`ISubscriberService`
class in Startup.cs
Then inject your
`ISubscriberService`
class in Startup.cs
```
c
s
```
c
#
public
void
ConfigureServices
(
IServiceCollection
services
)
public
void
ConfigureServices
(
IServiceCollection
services
)
{
{
services
.
AddTransient
<
ISubscriberService
,
SubscriberService
>();
services
.
AddTransient
<
ISubscriberService
,
SubscriberService
>();
...
...
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