Skip to content

Commit 3bf37c5

Browse files
committed
chore: 更新 License 信息
1 parent 46bea10 commit 3bf37c5

12 files changed

Lines changed: 44 additions & 15 deletions

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ csharp_preserve_single_line_blocks = true
216216
visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async:suggestion
217217
[*.cs]
218218
# Add file header
219-
file_header_template = Copyright (c) Argo Zhang (argo@163.com). All rights reserved.\nLicensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\nWebsite: https://www.blazor.zone or https://argozhang.github.io/
219+
file_header_template = Copyright (c) BootstrapBlazor & Argo Zhang (argo@live.ca). All rights reserved.\nLicensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\nWebsite: https://www.blazor.zone or https://argozhang.github.io/
220220
csharp_style_namespace_declarations = file_scoped:suggestion
221221
csharp_style_expression_bodied_local_functions = true:silent
222222
csharp_using_directive_placement = outside_namespace:silent

src/extensions/BootstrapBlazor.TcpSocket/BootstrapBlazor.TcpSocket.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<Version>9.0.0</Version>
4+
<Version>9.0.1-beta01</Version>
55
</PropertyGroup>
66

77
<PropertyGroup>

src/extensions/BootstrapBlazor.TcpSocket/DefaultTcpSocketClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
1+
// Copyright (c) BootstrapBlazor & Argo Zhang (argo@live.ca). All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33
// Website: https://www.blazor.zone or https://argozhang.github.io/
44

src/extensions/BootstrapBlazor.TcpSocket/DefaultTcpSocketClientProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
1+
// Copyright (c) BootstrapBlazor & Argo Zhang (argo@live.ca). All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33
// Website: https://www.blazor.zone or https://argozhang.github.io/
44

src/extensions/BootstrapBlazor.TcpSocket/DefaultTcpSocketFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
1+
// Copyright (c) BootstrapBlazor & Argo Zhang (argo@live.ca). All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33
// Website: https://www.blazor.zone or https://argozhang.github.io/
44

src/extensions/BootstrapBlazor.TcpSocket/Extensions/ITcpSocketClientExtensions.cs

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
// Licensed to the .NET Foundation under one or more agreements.
2-
// The .NET Foundation licenses this file to you under the Apache 2.0 License
3-
// See the LICENSE file in the project root for more information.
4-
// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone
1+
// Copyright (c) BootstrapBlazor & Argo Zhang (argo@live.ca). All rights reserved.
2+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3+
// Website: https://www.blazor.zone or https://argozhang.github.io/
54

65
using Microsoft.Extensions.DependencyInjection;
76
using Microsoft.Extensions.Options;
@@ -78,6 +77,21 @@ public static void SetDataPackageAdapter(this ITcpSocketClient client, IDataPack
7877
adapter.ReceivedCallBack = buffer => callback(buffer);
7978
}
8079

80+
/// <summary>
81+
/// 通过指定 <see cref="IDataPackageHandler"/> 数据处理实例,设置数据适配器并配置回调方法
82+
/// </summary>
83+
/// <param name="client"><see cref="ITcpSocketClient"/> 实例</param>
84+
/// <param name="handler"><see cref="IDataPackageHandler"/> 数据处理实例</param>
85+
/// <param name="callback">回调方法</param>
86+
public static void SetDataPackageAdapter(this ITcpSocketClient client, IDataPackageHandler handler, Func<ReadOnlyMemory<byte>, ValueTask> callback)
87+
{
88+
var adapter = new DataPackageAdapter
89+
{
90+
DataPackageHandler = handler
91+
};
92+
client.SetDataPackageAdapter(adapter, callback);
93+
}
94+
8195
/// <summary>
8296
/// Configures the specified <see cref="ITcpSocketClient"/> to use a data package adapter and a callback function
8397
/// for processing received data.
@@ -163,6 +177,21 @@ public static void SetDataPackageAdapter<TEntity>(this ITcpSocketClient client,
163177
}
164178
}
165179

180+
/// <summary>
181+
/// 通过指定 <see cref="IDataPackageHandler"/> 数据处理实例,设置数据适配器并配置回调方法
182+
/// </summary>
183+
/// <param name="client"><see cref="ITcpSocketClient"/> 实例</param>
184+
/// <param name="handler"><see cref="IDataPackageHandler"/> 数据处理实例</param>
185+
/// <param name="callback">回调方法</param>
186+
public static void SetDataPackageAdapter<TEntity>(this ITcpSocketClient client, IDataPackageHandler handler, Func<TEntity?, Task> callback)
187+
{
188+
var adapter = new DataPackageAdapter
189+
{
190+
DataPackageHandler = handler
191+
};
192+
client.SetDataPackageAdapter(adapter, callback);
193+
}
194+
166195
private static void SetDataAdapterCallback<TEntity>(this IDataPackageAdapter adapter, IDataConverter<TEntity> converter, Func<TEntity?, Task> callback)
167196
{
168197
adapter.ReceivedCallBack = async buffer =>

src/extensions/BootstrapBlazor.TcpSocket/Extensions/TcpSocketExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
1+
// Copyright (c) BootstrapBlazor & Argo Zhang (argo@live.ca). All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33
// Website: https://www.blazor.zone or https://argozhang.github.io/
44

src/extensions/BootstrapBlazor.TcpSocket/Extensions/TcpSocketUtility.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
1+
// Copyright (c) BootstrapBlazor & Argo Zhang (argo@live.ca). All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33
// Website: https://www.blazor.zone or https://argozhang.github.io/
44

src/extensions/BootstrapBlazor.TcpSocket/ITcpSocketClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
1+
// Copyright (c) BootstrapBlazor & Argo Zhang (argo@live.ca). All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33
// Website: https://www.blazor.zone or https://argozhang.github.io/
44

src/extensions/BootstrapBlazor.TcpSocket/ITcpSocketClientProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
1+
// Copyright (c) BootstrapBlazor & Argo Zhang (argo@live.ca). All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33
// Website: https://www.blazor.zone or https://argozhang.github.io/
44

0 commit comments

Comments
 (0)