forked from masastack/MASA.Utils
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Feature/cache * add caller * chore: minimal support specify Assembly * support net6.0 * chore: close gitlab package * chore: add package CI * feat: Improve DI extensions * chore: update dapr library package * Feature/cache * chore: Added support for adding Caller multiple times, and supports automatic... * add ghpackageconfig * Add GetAsync method overload * Update package_push_nuget.org.yml * Update package_push_github.yml * Update package_push_github.yml * feat: add es * Elasticsearch init * chore: add MasaElasticClient * chore: Elasticsearch init * chore: elasticsearch init * chore: Improve MasaElasticClient * chore: Add DocumentExistsAsync * chore: adjust ElasticsearchRelations * chore: Support document batch operation * chore: adjust AddElasticsearch methods * chore: add AddElasticsearchClient methods * chore: adjust GetPaginatedListAsync methods * chore: add alias * chore: add GetIndexByAliasAsync * chore: adjust GetAliasByIndexAsync methods * chore: Adjust using references * chore: add pinyin Filter * chore: adjust MASA.Utils.Data.Elasticsearch * chore: change methods name * chore: Adjustment parameters * chore: replce default IndexName * chore: add readonly * chore: Optimize the AddElasticsearch method Optimize the AddElasticsearch method * chore: Simplified parameter names Co-authored-by: zhenlei520 <[email protected]> * Update package_push_github.yml * Update nuget.config * feat: migrate old MASA.Framework to MASA.Utils * chore: add MASA.Utils.Exceptions * chore: add MASA.Utils.Exceptions * chore: adjust package * chore: add MASA.Utils.Enums、add MASA.Utils.Expressions * chore: Added MASA.Utils.Security.Cryptography, MASA.Utils.Security.Token class libraries * chore: Added MASA.Utils.Security.Cryptography * chore: add MASA.Utils.Security.Authentication * chore: remove warning * chore: remove warning * remove warning * feat: redis & caller * chore: Caller adds handling of Service exception reporting * chore: adjust GlobalException * chore: Fix redis set error * chore: Response supports null Co-authored-by: zhenlei520 <[email protected]> * chore: Fix GetAsync<TResponse> method error (masastack#7) * feat:dapr (masastack#6) * chore: add MASA.Utils.Development.Dapr * chore: dapr init * chore: Stop dapr process after project is stopped * chore: Increase get pid based on port * chore: add dapr daemon, restart dapr after dapr is shut down abnormally, Added OSX system port handling * chore: dapr supports the default AppPort obtained from ApplicationUrl by default, automatically assigns the grpc and http ports of dapr and automatically supplements environment variables Supports automatic restart after the dapr process is closed, and the configuration after restart is consistent with the last successful startup configuration Supports automatic restart of the dapr process after configuration update. Currently, there are no restrictions on HttpPort and GrpcPort. However, if the configuration update changes HttpPort and GrpcPort, the port obtained by DaprClient will be inconsistent with the actual running one. It needs to be adjusted later here. * chore: remove redundant code * chore: remove bad code * fix: Fix AddDapr method enable dapr slidecar error * feature: add dapr background options * feature: add dapr background options * feature: add dapr background options * chore: Modify log Co-authored-by: zhenlei520 <[email protected]> * Delete package_push_github.yml * update action * Update package_push_nuget.org.yml Co-authored-by: zhenlei520 <[email protected]> Co-authored-by: zhenlei520 <[email protected]> Co-authored-by: 曹尤先 <[email protected]> Co-authored-by: 王达 <[email protected]> Co-authored-by: PollosD <[email protected]> Co-authored-by: 听雨声 <[email protected]>
- Loading branch information
1 parent
af78655
commit 700ccde
Showing
235 changed files
with
9,843 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Package Push Nuget | ||
on: | ||
release: | ||
types: [ created ] | ||
|
||
jobs: | ||
packeg-build: | ||
name: packeg build and push | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: git pull | ||
uses: actions/checkout@v2 | ||
|
||
- name: run a one-line script | ||
run: env | ||
|
||
- name: setting dotnet version | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: '6.0.x' | ||
include-prerelease: true | ||
|
||
- name: restore | ||
run: dotnet restore | ||
|
||
- name: build | ||
run: dotnet build --no-restore | ||
|
||
- name: pack | ||
run: dotnet pack --include-symbols -p:PackageVersion=$GITHUB_REF_NAME | ||
|
||
- name: package push | ||
run: dotnet nuget push "**/*.symbols.nupkg" -k ${{secrets.NUGET_TOKEN}} -s https://api.nuget.org/v3/index.json | ||
|
||
|
||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<PackageId>$(AssemblyName)</PackageId> | ||
<PackageIcon>packageIcon.png</PackageIcon> | ||
<Authors>masastack</Authors> | ||
<Copyright>© masastack Corporation. All rights reserved.</Copyright> | ||
<PackageIconUrl>packageIcon.png</PackageIconUrl> | ||
<RepositoryUrl>https://github.com/masastack/MASA.Utils</RepositoryUrl> | ||
<RepositoryType>git</RepositoryType> | ||
<PublishRepositoryUrl>true</PublishRepositoryUrl> | ||
<RepositoryRoot>$(MSBuildThisFileDirectory)</RepositoryRoot> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<None Include="$(RepositoryRoot)packageIcon.png"> | ||
<Pack>True</Pack> | ||
<PackagePath></PackagePath> | ||
</None> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) MASA Stack | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<packageSources> | ||
<add key="public" value="http://proget-hz.lonsid.cn/nuget/public/v3/index.json" /> | ||
<add key="gitlab" value="http://gitlab-hz.lonsid.cn/api/v4/projects/29/packages/nuget/index.json" /> | ||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" /> | ||
</packageSources> | ||
<packageSourceCredentials> | ||
<gitlab> | ||
<add key="Username" value="masa" /> | ||
<add key="ClearTextPassword" value="2oVCQ7KBG5AsB2s_mFhd" /> | ||
</gitlab> | ||
</packageSourceCredentials> | ||
</configuration> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions
21
src/Caching/MASA.Utils.Caching.Core/DependencyInjection/CachingBuilder.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
namespace MASA.Utils.Caching.Core.DependencyInjection; | ||
|
||
public class CachingBuilder : ICachingBuilder | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="CachingBuilder"/> class. | ||
/// </summary> | ||
/// <param name="services">The <see cref="IServiceCollection"/> to add services to.</param> | ||
/// <param name="name"></param> | ||
public CachingBuilder(IServiceCollection services, string name) | ||
{ | ||
Services = services; | ||
Name = name; | ||
} | ||
|
||
/// <inheritdoc /> | ||
public IServiceCollection Services { get; private set; } | ||
|
||
/// <inheritdoc /> | ||
public string Name { get; private set; } | ||
} |
30 changes: 30 additions & 0 deletions
30
...ng/MASA.Utils.Caching.Core/DependencyInjection/DistributedCacheClientBuilderExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
namespace MASA.Utils.Caching.Core.DependencyInjection; | ||
|
||
/// <summary> | ||
/// Extension methods for configuring an <see cref="ICachingBuilder"/> | ||
/// </summary> | ||
public static class DistributedCacheClientBuilderExtensions | ||
{ | ||
/// <summary> | ||
/// Adds a delegate that will be used to configure a named <see cref="IDistributedCacheClient"/>. | ||
/// </summary> | ||
/// <param name="builder">The <see cref="ICachingBuilder"/>.</param> | ||
/// <param name="configureOptions">A delegate that is used to configure an <see cref="IDistributedCacheClient"/>.</param> | ||
/// <returns>An <see cref="ICachingBuilder"/> that can be used to configure the client.</returns> | ||
public static ICachingBuilder ConfigureDistributedCacheClient<TOptions>(this ICachingBuilder builder, Action<TOptions> configureOptions) where TOptions : class | ||
{ | ||
if (builder == null) | ||
{ | ||
throw new ArgumentNullException(nameof(builder)); | ||
} | ||
|
||
if (configureOptions == null) | ||
{ | ||
throw new ArgumentNullException(nameof(configureOptions)); | ||
} | ||
|
||
builder.Services.Configure(builder.Name, configureOptions); | ||
|
||
return builder; | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
src/Caching/MASA.Utils.Caching.Core/DependencyInjection/ICachingBuilder.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
namespace MASA.Utils.Caching.Core.DependencyInjection; | ||
|
||
/// <summary> | ||
/// A builder for configuring named <see cref="ICachingBuilder"/> instances. | ||
/// </summary> | ||
public interface ICachingBuilder | ||
{ | ||
/// <summary> | ||
/// Gets the application service collection. | ||
/// </summary> | ||
IServiceCollection Services { get; } | ||
|
||
/// <summary> | ||
/// Gets the name of the client configured by this builder. | ||
/// </summary> | ||
string Name { get; } | ||
} |
Oops, something went wrong.