Skip to content

Commit

Permalink
Merge pull request #10238 from abpframework/auto-merge/rel-5-0/570
Browse files Browse the repository at this point in the history
Merge branch dev with rel-5.0
  • Loading branch information
bnymncoskuner committed Oct 5, 2021
2 parents 0059580 + e1c63bf commit d92fd16
Show file tree
Hide file tree
Showing 233 changed files with 27,018 additions and 49,454 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/auto-pr.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
name: Merge branch dev with rel-4.4
name: Merge branch dev with rel-5.0
on:
push:
branches:
- rel-4.4
- rel-5.0
jobs:
merge-dev-with-rel-4-4:
merge-dev-with-rel-5-0:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: dev
- name: Reset promotion branch
run: |
git fetch origin rel-4.4:rel-4.4
git reset --hard rel-4.4
git fetch origin rel-5.0:rel-5.0
git reset --hard rel-5.0
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
branch: auto-merge/rel-4-4/${{github.run_number}}
title: Merge branch dev with rel-4.4
body: This PR generated automatically to merge dev with rel-4.4. Please review the changed files before merging to prevent any errors that may occur.
branch: auto-merge/rel-5-0/${{github.run_number}}
title: Merge branch dev with rel-5.0
body: This PR generated automatically to merge dev with rel-5.0. Please review the changed files before merging to prevent any errors that may occur.
reviewers: ${{github.actor}}
token: ${{ github.token }}
2 changes: 1 addition & 1 deletion common.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>5.0.0</Version>
<Version>5.0.0-beta.1</Version>
<NoWarn>$(NoWarn);CS1591;CS0436</NoWarn>
<PackageIconUrl>https://abp.io/assets/abp_nupkg.png</PackageIconUrl>
<PackageProjectUrl>https://abp.io/</PackageProjectUrl>
Expand Down
5 changes: 5 additions & 0 deletions docs/en/Modules/Cms-Kit/Index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,16 @@ All features are individually usable. If you disable a feature, it completely di

## How to Install

> This module is depends on [BlobStoring](../../Blob-Storing.md) module, please install `BlobStoring` module first and add a provider. For more information, check the [documentation](../../Blob-Storing.md).
[ABP CLI](../../CLI.md) allows installing a module to a solution using the `add-module` command. You can install the CMS Kit module in a command-line terminal with the following command:

```bash
abp add-module Volo.CmsKit
```

> By default, Cms-Kit is disabled by `GlobalFeature`. Because of that the initial migration will be empty. So you can skip the migration by adding `--skip-db-migrations` to command when installing if you are using Entity Framework Core. After enabling Cms-Kit global feture, please add new migration.
After the installation process, open the `GlobalFeatureConfigurator` class in the `Domain.Shared` project of your solution and place the following code into the `Configure` method to enable all the features in the CMS Kit module.

```csharp
Expand Down
54 changes: 27 additions & 27 deletions docs/en/SignalR-Integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,41 +52,41 @@ Client side installation depends on your UI framework / client type.

Run the following command in the root folder of your web project:

````bash
```bash
yarn add @abp/signalr
````
```

> This requires to [install yarn](https://yarnpkg.com/) if you haven't install before.
This will add the `@abp/signalr` to the dependencies in the `package.json` of your project:

````json
```json
{
...
"dependencies": {
...
"@abp/signalr": "~2.7.0"
}
}
````
```

Run the following [ABP CLI](CLI.md) command in the root folder of your web project:

````bash
```bash
abp install-libs
````
```

This will copy the SignalR JavaScript files into your project:

![signal-js-file](images/signal-js-file.png)

Finally, add the following code to your page/view to include the `signalr.js` file
Finally, add the following code to your page/view to include the `signalr.js` file

````xml
```xml
@section scripts {
<abp-script type="typeof(SignalRBrowserScriptContributor)" />
}
````
```

It requires to add `@using Volo.Abp.AspNetCore.Mvc.UI.Packages.SignalR` to your page/view.

Expand All @@ -108,35 +108,35 @@ ABP automatically registers all the hubs to the [dependency injection](Dependenc

Example:

````csharp
```csharp
public class MessagingHub : Hub
{
//...
}
````
```

The hub route will be `/signalr-hubs/messaging` for the `MessagingHub`:

* Adding a standard `/signalr-hubs/` prefix
* Continue with the **camel case** hub name, without the `Hub` suffix.
- Adding a standard `/signalr-hubs/` prefix
- Continue with the **kebab-case** hub name, without the `Hub` suffix.

If you want to specify the route, you can use the `HubRoute` attribute:

````csharp
```csharp
[HubRoute("/my-messaging-hub")]
public class MessagingHub : Hub
{
//...
}
````
```

### AbpHub Base Classes

Instead of the standard `Hub` and `Hub<T>` classes, you can inherit from the `AbpHub` or `AbpHub<T>` which have useful base properties like `CurrentUser`.

Example:

````csharp
```csharp
public class MessagingHub : AbpHub
{
public async Task SendMessage(string targetUserName, string message)
Expand All @@ -145,25 +145,25 @@ public class MessagingHub : AbpHub
var txt = L["MyText"]; //Localization
}
}
````
```

> While you could inject the same properties into your hub constructor, this way simplifies your hub class.
### Manual Registration / Mapping

ABP automatically registers all the hubs to the [dependency injection](Dependency-Injection.md) as a **transient service**. If you want to **disable auto dependency injection** registration for your hub class, just add a `DisableConventionalRegistration` attribute. You can still register your hub class to dependency injection in the `ConfigureServices` method of your module if you like:

````csharp
```csharp
context.Services.AddTransient<MessagingHub>();
````
```

When **you or ABP** register the class to the dependency injection, it is automatically mapped to the endpoint route configuration just as described in the previous sections. You can use `DisableAutoHubMap` attribute if you want to manually map your hub class.

For manual mapping, you have two options:

1. Use the `AbpSignalROptions` to add your map configuration (in the `ConfigureServices` method of your [module](Module-Development-Basics.md)), so ABP still performs the endpoint mapping for your hub:

````csharp
```csharp
Configure<AbpSignalROptions>(options =>
{
options.Hubs.Add(
Expand All @@ -178,13 +178,13 @@ Configure<AbpSignalROptions>(options =>
)
);
});
````
```

This is a good way to provide additional SignalR options.

If you don't want to disable auto hub map, but still want to perform additional SignalR configuration, use the `options.Hubs.AddOrUpdate(...)` method:

````csharp
```csharp
Configure<AbpSignalROptions>(options =>
{
options.Hubs.AddOrUpdate(
Expand All @@ -200,21 +200,21 @@ Configure<AbpSignalROptions>(options =>
}
);
});
````
```

This is the way you can modify the options of a hub class defined in a depended module (where you don't have the source code access).

2. Change `app.UseConfiguredEndpoints` in the `OnApplicationInitialization` method of your [module](Module-Development-Basics.md) as shown below (added a lambda method as the parameter).

````csharp
```csharp
app.UseConfiguredEndpoints(endpoints =>
{
endpoints.MapHub<MessagingHub>("/my-messaging-hub", options =>
{
options.LongPolling.PollTimeout = TimeSpan.FromSeconds(30);
});
});
````
```

### UserIdProvider

Expand All @@ -234,5 +234,5 @@ Refer to the Microsoft's documentation to [host and scale](https://docs.microsof

## See Also

* [Microsoft SignalR documentation](https://docs.microsoft.com/en-us/aspnet/core/signalr/introduction)
* [Real-Time Messaging In A Distributed Architecture Using ABP, SingalR & RabbitMQ](https://volosoft.com/blog/RealTime-Messaging-Distributed-Architecture-Abp-SingalR-RabbitMQ)
- [Microsoft SignalR documentation](https://docs.microsoft.com/en-us/aspnet/core/signalr/introduction)
- [Real-Time Messaging In A Distributed Architecture Using ABP, SingalR & RabbitMQ](https://volosoft.com/blog/RealTime-Messaging-Distributed-Architecture-Abp-SingalR-RabbitMQ)
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "asp.net",
"private": true,
"dependencies": {
"@abp/aspnetcore.mvc.ui.theme.shared": "^4.4.2",
"@abp/aspnetcore.mvc.ui.theme.shared": "^5.0.0-beta.1",
"highlight.js": "^9.13.1"
},
"devDependencies": {}
Expand Down

This file was deleted.

0 comments on commit d92fd16

Please sign in to comment.