Browse Source

upgrade abp framework to 8.2.1

pull/986/head
colin 1 year ago
parent
commit
bbc83a9a26
  1. 6
      Directory.Packages.props
  2. 6
      apps/vue/src/api/caching-management/cache/index.ts
  3. 7
      apps/vue/src/api/text-templating/contents/index.ts
  4. 33
      apps/vue/src/views/feature-management/definitions/features/components/FeatureDefinitionTable.vue
  5. 30
      apps/vue/src/views/permission-management/definitions/permissions/components/PermissionDefinitionTable.vue
  6. 32
      apps/vue/src/views/permission-management/definitions/permissions/datas/TableData.ts
  7. 26
      apps/vue/src/views/realtime/notifications/definitions/notifications/components/NotificationDefinitionTable.vue
  8. 8
      apps/vue/src/views/realtime/notifications/definitions/notifications/components/NotificationSendModal.vue
  9. 22
      aspnet-core/framework/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/AbpCAPConsumerServiceSelector.cs
  10. 15
      aspnet-core/framework/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/AbpCAPEventBusModule.cs
  11. 13
      aspnet-core/framework/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/AbpCAPEventBusOptions.cs
  12. 13
      aspnet-core/framework/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/AbpCAPExecutionFailedException.cs
  13. 7
      aspnet-core/framework/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/AbpCAPHeaders.cs
  14. 13
      aspnet-core/framework/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/AbpCAPMessageExtensions.cs
  15. 27
      aspnet-core/framework/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/AbpCAPSubscribeInvoker.cs
  16. 7
      aspnet-core/framework/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/AbpCapSerializer.cs
  17. 17
      aspnet-core/framework/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/CAPDistributedEventBus.cs
  18. 7
      aspnet-core/framework/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/CustomDistributedEventSubscriber.cs
  19. 9
      aspnet-core/framework/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/FailedThresholdCallbackNotifier.cs
  20. 13
      aspnet-core/framework/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/ICustomDistributedEventSubscriber.cs
  21. 7
      aspnet-core/framework/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/IFailedThresholdCallbackNotifier.cs
  22. 32
      aspnet-core/framework/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/Internal/AwaitableInfo.cs
  23. 11
      aspnet-core/framework/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/Internal/CoercedAwaitableInfo.cs
  24. 82
      aspnet-core/framework/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/Internal/ObjectMethodExecutor.cs
  25. 19
      aspnet-core/framework/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/Internal/ObjectMethodExecutorAwaitable.cs
  26. 43
      aspnet-core/framework/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/Internal/ObjectMethodExecutorFSharpSupport.cs
  27. 13
      aspnet-core/framework/common/LINGYUN.Abp.EventBus.CAP/Microsoft/Extensions/DependencyInjection/ServiceCollectionExtensions.cs
  28. 4
      common.props

6
Directory.Packages.props

@ -1,9 +1,9 @@
<Project>
<PropertyGroup>
<DotNetCoreCAPPackageVersion>8.1.1</DotNetCoreCAPPackageVersion>
<DotNetCoreCAPPackageVersion>8.2.0</DotNetCoreCAPPackageVersion>
<ElsaPackageVersion>2.14.1</ElsaPackageVersion>
<VoloAbpPackageVersion>8.2.0</VoloAbpPackageVersion>
<LINGYUNAbpPackageVersion>8.2.0</LINGYUNAbpPackageVersion>
<VoloAbpPackageVersion>8.2.1</VoloAbpPackageVersion>
<LINGYUNAbpPackageVersion>8.2.1</LINGYUNAbpPackageVersion>
<MicrosoftExtensionsPackageVersion>8.0.0</MicrosoftExtensionsPackageVersion>
<MicrosoftAspNetCorePackageVersion>8.0.0</MicrosoftAspNetCorePackageVersion>
<MicrosoftEntityFrameworkCorePackageVersion>8.0.0</MicrosoftEntityFrameworkCorePackageVersion>

6
apps/vue/src/api/caching-management/cache/index.ts

@ -8,14 +8,14 @@ import {
export const getKeys = (input: GetCacheKeysRequest) => {
return defHttp.get<CacheKeys>({
url: '/api/caching-management/cache',
url: '/api/caching-management/cache/keys',
params: input,
});
};
export const getValue = (key: string) => {
return defHttp.get<CacheValue>({
url: `/api/caching-management/cache?key=${key}`,
url: `/api/caching-management/cache/value?key=${key}`,
});
};
@ -28,6 +28,6 @@ export const refresh = (input: CacheRefreshRequest) => {
export const remove = (key: string) => {
return defHttp.delete<void>({
url: `/api/caching-management/cache?key=${key}`,
url: `/api/caching-management/cache/remove?key=${key}`,
});
};

7
apps/vue/src/api/text-templating/contents/index.ts

@ -7,9 +7,12 @@ import {
} from './model';
export const GetAsyncByInput = (input: TextTemplateContentGetInput) => {
let url = `/api/text-templating/templates/content/${input.name}`;
if (input.culture) {
url = `/api/text-templating/templates/content/${input.culture}/${input.name}`;
}
return defHttp.get<TextTemplateContentDto>({
url: `/api/text-templating/templates/content`,
params: input,
url,
});
};

33
apps/vue/src/views/feature-management/definitions/features/components/FeatureDefinitionTable.vue

@ -17,19 +17,13 @@
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'displayName'">
<span>{{ getGroupDisplayName(record.displayName) }}</span>
<span>{{ getDisplayName(record.displayName) }}</span>
</template>
</template>
<template #expandedRowRender="{ record }">
<BasicTable @register="registerSubTable" :data-source="record.features">
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'groupName'">
<span>{{ getGroupDisplayName(record.groupName) }}</span>
</template>
<template v-else-if="column.key === 'parentName'">
<span>{{ getDisplayName(record.parentName) }}</span>
</template>
<template v-else-if="column.key === 'displayName'">
<template v-if="column.key === 'displayName'">
<span>{{ getDisplayName(record.displayName) }}</span>
</template>
<template v-else-if="column.key === 'description'">
@ -92,7 +86,6 @@
import { getList, deleteByName } from '/@/api/feature-management/definitions/features';
import { getSearchFormSchemas } from '../datas/ModalData';
import { listToTree } from '/@/utils/helper/treeHelper';
import { groupBy } from '/@/utils/array';
import { sorter } from '/@/utils/table';
import FeatureDefinitionModal from './FeatureDefinitionModal.vue';
@ -181,14 +174,6 @@
};
});
});
const getGroupDisplayName = computed(() => {
return (groupName: string) => {
const group = state.groups.find((x) => x.name === groupName);
if (!group) return groupName;
const info = deserialize(group.displayName);
return Lr(info.resourceName, info.name);
};
});
const getDisplayName = computed(() => {
return (displayName?: string) => {
if (!displayName) return displayName;
@ -198,8 +183,7 @@
});
onMounted(() => {
fetch();
fetchGroups();
fetchGroups().then(fetch);
});
function fetch() {
@ -210,15 +194,14 @@
var input = form.getFieldsValue();
getList(input)
.then((res) => {
const featureGroup = groupBy(res.items, 'groupName');
const featureGroupData: FeatureGroup[] = [];
Object.keys(featureGroup).forEach((gk) => {
state.groups.forEach((group) => {
const groupData: FeatureGroup = {
name: gk,
displayName: gk,
name: group.name,
displayName: group.displayName,
features: [],
};
const featureTree = listToTree(featureGroup[gk], {
const featureTree = listToTree(res.items.filter((item) => item.groupName === group.name), {
id: 'name',
pid: 'parentName',
});
@ -236,7 +219,7 @@
}
function fetchGroups() {
getGroupDefinitions({}).then((res) => {
return getGroupDefinitions({}).then((res) => {
state.groups = res.items;
});
}

30
apps/vue/src/views/permission-management/definitions/permissions/components/PermissionDefinitionTable.vue

@ -17,16 +17,13 @@
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'displayName'">
<span>{{ getGroupDisplayName(record.displayName) }}</span>
<span>{{ getDisplayName(record.displayName) }}</span>
</template>
</template>
<template #expandedRowRender="{ record }">
<BasicTable @register="registerSubTable" :data-source="record.permissions">
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'groupName'">
<span>{{ getGroupDisplayName(record.groupName) }}</span>
</template>
<template v-else-if="column.key === 'displayName'">
<template v-if="column.key === 'displayName'">
<span>{{ getDisplayName(record.displayName) }}</span>
</template>
<template v-else-if="column.key === 'multiTenancySide'">
@ -94,7 +91,6 @@
import { multiTenancySidesMap, providersMap } from '../../typing';
import { getSearchFormSchemas } from '../datas/ModalData';
import { listToTree } from '/@/utils/helper/treeHelper';
import { groupBy } from '/@/utils/array';
import { sorter } from '/@/utils/table';
import PermissionDefinitionModal from './PermissionDefinitionModal.vue';
@ -180,14 +176,6 @@
};
});
});
const getGroupDisplayName = computed(() => {
return (groupName: string) => {
const group = state.groups.find((x) => x.name === groupName);
if (!group) return groupName;
const info = deserialize(group.displayName);
return Lr(info.resourceName, info.name);
};
});
const getDisplayName = computed(() => {
return (displayName?: string) => {
if (!displayName) return displayName;
@ -197,8 +185,7 @@
});
onMounted(() => {
fetch();
fetchGroups();
fetchGroups().then(fetch);
});
function fetch() {
@ -209,15 +196,14 @@
var input = form.getFieldsValue();
GetListAsyncByInput(input)
.then((res) => {
const permissionGroup = groupBy(res.items, 'groupName');
const permissionGroupData: PermissionGroup[] = [];
Object.keys(permissionGroup).forEach((gk) => {
state.groups.forEach((group) => {
const groupData: PermissionGroup = {
name: gk,
displayName: gk,
name: group.name,
displayName: group.displayName,
permissions: [],
};
const permissionTree = listToTree(permissionGroup[gk], {
const permissionTree = listToTree(res.items.filter((item) => item.groupName === group.name), {
id: 'name',
pid: 'parentName',
});
@ -235,7 +221,7 @@
}
function fetchGroups() {
getGroupDefinitions({}).then((res) => {
return getGroupDefinitions({}).then((res) => {
state.groups = res.items;
});
}

32
apps/vue/src/views/permission-management/definitions/permissions/datas/TableData.ts

@ -15,22 +15,6 @@ export function getDataColumns(): BasicColumn[] {
defaultHidden: true,
sorter: (a, b) => sorter(a, b, 'isEnabled'),
},
{
title: L('DisplayName:MultiTenancySide'),
dataIndex: 'multiTenancySide',
align: 'left',
width: 80,
resizable: true,
sorter: (a, b) => sorter(a, b, 'multiTenancySide'),
},
{
title: L('DisplayName:Providers'),
dataIndex: 'providers',
align: 'left',
width: 80,
resizable: true,
sorter: (a, b) => sorter(a, b, 'providers'),
},
{
title: L('DisplayName:Name'),
dataIndex: 'name',
@ -47,6 +31,22 @@ export function getDataColumns(): BasicColumn[] {
resizable: true,
sorter: (a, b) => sorter(a, b, 'displayName'),
},
{
title: L('DisplayName:MultiTenancySide'),
dataIndex: 'multiTenancySide',
align: 'left',
width: 80,
resizable: true,
sorter: (a, b) => sorter(a, b, 'multiTenancySide'),
},
{
title: L('DisplayName:Providers'),
dataIndex: 'providers',
align: 'left',
width: 80,
resizable: true,
sorter: (a, b) => sorter(a, b, 'providers'),
},
{
title: L('DisplayName:IsStatic'),
dataIndex: 'isStatic',

26
apps/vue/src/views/realtime/notifications/definitions/notifications/components/NotificationDefinitionTable.vue

@ -33,7 +33,7 @@
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'displayName'">
<span>{{ getGroupDisplayName(record.displayName) }}</span>
<span>{{ getDisplayName(record.displayName) }}</span>
</template>
</template>
<template #expandedRowRender="{ record }">
@ -123,7 +123,6 @@
} from '/@/api/realtime/notifications/definitions/notifications';
import { NotificationDefinitionDto } from '/@/api/realtime/notifications/definitions/notifications/model';
import { getSearchFormSchemas } from '../datas/ModalData';
import { groupBy } from '/@/utils/array';
import { sorter } from '/@/utils/table';
import NotificationDefinitionModal from './NotificationDefinitionModal.vue';
import NotificationSendModal from './NotificationSendModal.vue';
@ -209,14 +208,6 @@
};
});
});
const getGroupDisplayName = computed(() => {
return (groupName: string) => {
const group = state.groups.find((x) => x.name === groupName);
if (!group) return groupName;
const info = deserialize(group.displayName);
return Lr(info.resourceName, info.name);
};
});
const getDisplayName = computed(() => {
return (displayName?: string) => {
if (!displayName) return displayName;
@ -226,8 +217,7 @@
});
onMounted(() => {
fetch();
fetchGroups();
fetchGroups().then(fetch);
});
function fetch() {
@ -238,18 +228,16 @@
var input = form.getFieldsValue();
GetListAsyncByInput(input)
.then((res) => {
const definitionGroup = groupBy(res.items, 'groupName');
const definitionGroupData: NotificationGroup[] = [];
Object.keys(definitionGroup).forEach((gk) => {
state.groups.forEach((group) => {
const groupData: NotificationGroup = {
name: gk,
displayName: gk,
name: group.name,
displayName: group.displayName,
notifications: [],
};
groupData.notifications.push(...definitionGroup[gk]);
groupData.notifications.push(...res.items.filter((item) => item.groupName === group.name));
definitionGroupData.push(groupData);
});
console.log(definitionGroupData);
setTableData(definitionGroupData);
})
.finally(() => {
@ -259,7 +247,7 @@
}
function fetchGroups() {
getGroupDefinitions({}).then((res) => {
return getGroupDefinitions({}).then((res) => {
state.groups = res.items;
});
}

8
apps/vue/src/views/realtime/notifications/definitions/notifications/components/NotificationSendModal.vue

@ -267,12 +267,19 @@
const formEl = unref(formRef);
formEl?.validate().then(() => {
let input: NotificationSendDto;
let toUsers: { userId: string }[] = [];
if (state.entity.toUsers && Array.isArray(state.entity.toUsers)) {
toUsers = state.entity.toUsers.map((id) => {
return { userId: id };
});
}
if (getIsTemplate.value) {
input = {
name: state.notification!.template!,
severity: state.entity.severity,
culture: state.entity.culture,
data: state.entity.data,
toUsers: toUsers,
};
changeOkLoading(true);
sendTemplate(input)
@ -320,6 +327,7 @@
formUser: getApplication.currentUser.userName,
createTime: formatToDateTime(new Date()),
},
toUsers: toUsers,
};
changeOkLoading(true);
send(input)

22
aspnet-core/framework/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/AbpCAPConsumerServiceSelector.cs

@ -11,16 +11,16 @@ using Volo.Abp.DependencyInjection;
using Volo.Abp.EventBus;
using Volo.Abp.EventBus.Distributed;
namespace LINGYUN.Abp.EventBus.CAP
{
/// <summary>
/// 消费者查找器
/// </summary>
[Dependency(ServiceLifetime.Singleton, ReplaceServices = true)]
[ExposeServices(typeof(IConsumerServiceSelector), typeof(AbpCAPConsumerServiceSelector))]
namespace LINGYUN.Abp.EventBus.CAP;
public class AbpCAPConsumerServiceSelector : ConsumerServiceSelector
{
/// <summary>
/// 消费者查找器
/// </summary>
[Dependency(ServiceLifetime.Singleton, ReplaceServices = true)]
[ExposeServices(typeof(IConsumerServiceSelector), typeof(AbpCAPConsumerServiceSelector))]
public class AbpCAPConsumerServiceSelector : ConsumerServiceSelector
{
/// <summary>
/// CAP配置
/// </summary>
@ -53,8 +53,7 @@ namespace LINGYUN.Abp.EventBus.CAP
/// <returns></returns>
protected override IEnumerable<ConsumerExecutorDescriptor> FindConsumersFromInterfaceTypes(IServiceProvider provider)
{
var executorDescriptorList =
base.FindConsumersFromInterfaceTypes(provider).ToList();
var executorDescriptorList = base.FindConsumersFromInterfaceTypes(provider).ToList();
//handlers
var handlers = AbpDistributedEventBusOptions.Handlers;
var logger = provider.GetRequiredService<ILogger<AbpCAPConsumerServiceSelector>>();
@ -152,5 +151,4 @@ namespace LINGYUN.Abp.EventBus.CAP
return descriptor;
}
}
}

15
aspnet-core/framework/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/AbpCAPEventBusModule.cs

@ -4,14 +4,14 @@ using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.EventBus;
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.EventBus.CAP
namespace LINGYUN.Abp.EventBus.CAP;
/// <summary>
/// AbpCAPEventBusModule
/// </summary>
[DependsOn(typeof(AbpEventBusModule))]
public class AbpCAPEventBusModule : AbpModule
{
/// <summary>
/// AbpCAPEventBusModule
/// </summary>
[DependsOn(typeof(AbpEventBusModule))]
public class AbpCAPEventBusModule : AbpModule
{
/// <summary>
/// ConfigureServices
/// </summary>
@ -48,5 +48,4 @@ namespace LINGYUN.Abp.EventBus.CAP
}
});
}
}
}

13
aspnet-core/framework/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/AbpCAPEventBusOptions.cs

@ -1,14 +1,13 @@
namespace LINGYUN.Abp.EventBus.CAP
namespace LINGYUN.Abp.EventBus.CAP;
/// <summary>
/// 过期消息清理配置项
/// </summary>
public class AbpCAPEventBusOptions
{
/// <summary>
/// 过期消息清理配置项
/// </summary>
public class AbpCAPEventBusOptions
{
/// <summary>
/// 发布消息处理失败通知
/// default: false
/// </summary>
public bool NotifyFailedCallback { get; set; } = false;
}
}

13
aspnet-core/framework/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/AbpCAPExecutionFailedException.cs

@ -2,13 +2,13 @@
using System;
using Volo.Abp;
namespace LINGYUN.Abp.EventBus.CAP
namespace LINGYUN.Abp.EventBus.CAP;
/// <summary>
/// AbpECAPExecutionFailedException
/// </summary>
public class AbpCAPExecutionFailedException : AbpException
{
/// <summary>
/// AbpECAPExecutionFailedException
/// </summary>
public class AbpCAPExecutionFailedException : AbpException
{
/// <summary>
/// MessageType
/// </summary>
@ -52,5 +52,4 @@ namespace LINGYUN.Abp.EventBus.CAP
MessageType = messageType;
Origin = origin;
}
}
}

7
aspnet-core/framework/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/AbpCAPHeaders.cs

@ -1,7 +1,7 @@
namespace LINGYUN.Abp.EventBus.CAP
namespace LINGYUN.Abp.EventBus.CAP;
public static class AbpCAPHeaders
{
public static class AbpCAPHeaders
{
public static string ClientId { get; set; } = "cap-abp-client-id";
public static string UserId { get; set; } = "cap-abp-user-id";
@ -9,5 +9,4 @@
public static string TenantId { get; set; } = "cap-abp-tenant-id";
public static string MessageId { get; set; } = "cap-abp-message-id";
}
}

13
aspnet-core/framework/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/AbpCAPMessageExtensions.cs

@ -1,13 +1,13 @@
using DotNetCore.CAP.Messages;
using System;
namespace LINGYUN.Abp.EventBus.CAP
namespace LINGYUN.Abp.EventBus.CAP;
/// <summary>
/// CAP消息扩展
/// </summary>
public static class AbpCAPMessageExtensions
{
/// <summary>
/// CAP消息扩展
/// </summary>
public static class AbpCAPMessageExtensions
{
/// <summary>
/// 尝试获取消息标头中的租户标识
/// </summary>
@ -43,5 +43,4 @@ namespace LINGYUN.Abp.EventBus.CAP
}
return null;
}
}
}

27
aspnet-core/framework/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/AbpCAPSubscribeInvoker.cs

@ -8,19 +8,20 @@ using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Volo.Abp.MultiTenancy;
namespace LINGYUN.Abp.EventBus.CAP
namespace LINGYUN.Abp.EventBus.CAP;
/// <summary>
/// 重写 ISubscribeInvoker 实现 Abp 租户集成
/// </summary>
public class AbpCAPSubscribeInvoker : ISubscribeInvoker
{
/// <summary>
/// 重写 ISubscribeInvoker 实现 Abp 租户集成
/// </summary>
public class AbpCAPSubscribeInvoker : ISubscribeInvoker
{
private readonly ICurrentTenant _currentTenant;
private readonly ILogger _logger;
@ -183,7 +184,18 @@ namespace LINGYUN.Abp.EventBus.CAP
}
}
return new ConsumerExecutedResult(resultObj, message.GetId(), message.GetCallbackName());
var callbackName = message.GetCallbackName();
if (string.IsNullOrEmpty(callbackName))
{
return new ConsumerExecutedResult(resultObj, message.GetId(), null, null);
}
else
{
var capHeader = executeParameters.FirstOrDefault(x => x is CapHeader) as CapHeader;
IDictionary<string, string> callbackHeader = null;
// TODO: CapHeader.ResponseHeader
return new ConsumerExecutedResult(resultObj, message.GetId(), callbackName, callbackHeader);
}
}
}
/// <summary>
@ -249,5 +261,4 @@ namespace LINGYUN.Abp.EventBus.CAP
return executor.Execute(@class, parameter);
}
}
}

7
aspnet-core/framework/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/AbpCapSerializer.cs

@ -9,10 +9,10 @@ using System.Threading.Tasks;
using Volo.Abp.Json;
using Volo.Abp.Json.SystemTextJson;
namespace LINGYUN.Abp.EventBus.CAP
namespace LINGYUN.Abp.EventBus.CAP;
public class AbpCapSerializer : ISerializer
{
public class AbpCapSerializer : ISerializer
{
private readonly IJsonSerializer _jsonSerializer;
private readonly AbpSystemTextJsonSerializerOptions _jsonSerializerOptions;
@ -85,5 +85,4 @@ namespace LINGYUN.Abp.EventBus.CAP
{
return jsonObject is JsonElement;
}
}
}

17
aspnet-core/framework/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/CAPDistributedEventBus.cs

@ -22,15 +22,15 @@ using Volo.Abp.Tracing;
using Volo.Abp.Uow;
using Volo.Abp.Users;
namespace LINGYUN.Abp.EventBus.CAP
namespace LINGYUN.Abp.EventBus.CAP;
/// <summary>
/// CAP分布式事件总线
/// </summary>
[Dependency(ServiceLifetime.Singleton, ReplaceServices = true)]
[ExposeServices(typeof(IDistributedEventBus), typeof(CAPDistributedEventBus))]
public class CAPDistributedEventBus : DistributedEventBusBase, IDistributedEventBus
{
/// <summary>
/// CAP分布式事件总线
/// </summary>
[Dependency(ServiceLifetime.Singleton, ReplaceServices = true)]
[ExposeServices(typeof(IDistributedEventBus), typeof(CAPDistributedEventBus))]
public class CAPDistributedEventBus : DistributedEventBusBase, IDistributedEventBus
{
/// <summary>
/// CAP消息发布接口
/// </summary>
@ -273,5 +273,4 @@ namespace LINGYUN.Abp.EventBus.CAP
CancellationTokenProvider.FallbackToProvider());
}
}
}
}

7
aspnet-core/framework/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/CustomDistributedEventSubscriber.cs

@ -13,10 +13,10 @@ using Volo.Abp.EventBus;
using Volo.Abp.EventBus.Distributed;
using Volo.Abp.Threading;
namespace LINGYUN.Abp.EventBus.CAP
namespace LINGYUN.Abp.EventBus.CAP;
internal class CustomDistributedEventSubscriber : ICustomDistributedEventSubscriber, ISingletonDependency
{
internal class CustomDistributedEventSubscriber : ICustomDistributedEventSubscriber, ISingletonDependency
{
protected CapOptions CapOptions { get; }
protected IConsumerClientFactory ConsumerClientFactory { get; }
@ -133,5 +133,4 @@ namespace LINGYUN.Abp.EventBus.CAP
return descriptor;
}
}
}

9
aspnet-core/framework/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/FailedThresholdCallbackNotifier.cs

@ -3,11 +3,11 @@ using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
using Volo.Abp.ExceptionHandling;
namespace LINGYUN.Abp.EventBus.CAP
namespace LINGYUN.Abp.EventBus.CAP;
[DisableConventionalRegistration]
public class FailedThresholdCallbackNotifier : IFailedThresholdCallbackNotifier
{
[DisableConventionalRegistration]
public class FailedThresholdCallbackNotifier : IFailedThresholdCallbackNotifier
{
protected AbpCAPEventBusOptions Options { get; }
protected IExceptionNotifier ExceptionNotifier { get; }
@ -27,5 +27,4 @@ namespace LINGYUN.Abp.EventBus.CAP
await ExceptionNotifier.NotifyAsync(exception);
}
}
}
}

13
aspnet-core/framework/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/ICustomDistributedEventSubscriber.cs

@ -1,13 +1,13 @@
using System;
using Volo.Abp.EventBus;
namespace LINGYUN.Abp.EventBus.CAP
namespace LINGYUN.Abp.EventBus.CAP;
/// <summary>
/// 自定义事件订阅者
/// </summary>
public interface ICustomDistributedEventSubscriber
{
/// <summary>
/// 自定义事件订阅者
/// </summary>
public interface ICustomDistributedEventSubscriber
{
/// <summary>
/// 订阅事件
/// </summary>
@ -20,5 +20,4 @@ namespace LINGYUN.Abp.EventBus.CAP
/// <param name="eventType"></param>
/// <param name="factory"></param>
void UnSubscribe(Type eventType, IEventHandlerFactory factory);
}
}

7
aspnet-core/framework/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/IFailedThresholdCallbackNotifier.cs

@ -1,9 +1,8 @@
using System.Threading.Tasks;
namespace LINGYUN.Abp.EventBus.CAP
namespace LINGYUN.Abp.EventBus.CAP;
public interface IFailedThresholdCallbackNotifier
{
public interface IFailedThresholdCallbackNotifier
{
Task NotifyAsync(AbpCAPExecutionFailedException exception);
}
}

32
aspnet-core/framework/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/Internal/AwaitableInfo.cs

@ -6,10 +6,10 @@ using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
namespace LINGYUN.Abp.EventBus.CAP.Internal
namespace LINGYUN.Abp.EventBus.CAP.Internal;
internal readonly struct AwaitableInfo
{
internal struct AwaitableInfo
{
public Type AwaiterType { get; }
public PropertyInfo AwaiterIsCompletedProperty { get; }
public MethodInfo AwaiterGetResultMethod { get; }
@ -47,7 +47,7 @@ namespace LINGYUN.Abp.EventBus.CAP.Internal
&& m.ReturnType != null);
if (getAwaiterMethod == null)
{
awaitableInfo = default(AwaitableInfo);
awaitableInfo = default;
return false;
}
@ -60,7 +60,7 @@ namespace LINGYUN.Abp.EventBus.CAP.Internal
&& p.GetMethod != null);
if (isCompletedProperty == null)
{
awaitableInfo = default(AwaitableInfo);
awaitableInfo = default;
return false;
}
@ -69,40 +69,29 @@ namespace LINGYUN.Abp.EventBus.CAP.Internal
var implementsINotifyCompletion = awaiterInterfaces.Any(t => t == typeof(INotifyCompletion));
if (!implementsINotifyCompletion)
{
awaitableInfo = default(AwaitableInfo);
awaitableInfo = default;
return false;
}
// INotifyCompletion supplies a method matching "void OnCompleted(Action action)"
var iNotifyCompletionMap = awaiterType
.GetTypeInfo()
.GetRuntimeInterfaceMap(typeof(INotifyCompletion));
var onCompletedMethod = iNotifyCompletionMap.InterfaceMethods.Single(m =>
var onCompletedMethod = typeof(INotifyCompletion).GetRuntimeMethods().Single(m =>
m.Name.Equals("OnCompleted", StringComparison.OrdinalIgnoreCase)
&& m.ReturnType == typeof(void)
&& m.GetParameters().Length == 1
&& m.GetParameters()[0].ParameterType == typeof(Action));
// Awaiter optionally implements ICriticalNotifyCompletion
var implementsICriticalNotifyCompletion =
awaiterInterfaces.Any(t => t == typeof(ICriticalNotifyCompletion));
var implementsICriticalNotifyCompletion = awaiterInterfaces.Any(t => t == typeof(ICriticalNotifyCompletion));
MethodInfo unsafeOnCompletedMethod;
if (implementsICriticalNotifyCompletion)
{
// ICriticalNotifyCompletion supplies a method matching "void UnsafeOnCompleted(Action action)"
var iCriticalNotifyCompletionMap = awaiterType
.GetTypeInfo()
.GetRuntimeInterfaceMap(typeof(ICriticalNotifyCompletion));
unsafeOnCompletedMethod = iCriticalNotifyCompletionMap.InterfaceMethods.Single(m =>
unsafeOnCompletedMethod = typeof(ICriticalNotifyCompletion).GetRuntimeMethods().Single(m =>
m.Name.Equals("UnsafeOnCompleted", StringComparison.OrdinalIgnoreCase)
&& m.ReturnType == typeof(void)
&& m.GetParameters().Length == 1
&& m.GetParameters()[0].ParameterType == typeof(Action));
}
else
{
unsafeOnCompletedMethod = null;
}
// Awaiter must have method matching "void GetResult" or "T GetResult()"
var getResultMethod = awaiterType.GetRuntimeMethods().FirstOrDefault(m =>
@ -110,7 +99,7 @@ namespace LINGYUN.Abp.EventBus.CAP.Internal
&& m.GetParameters().Length == 0);
if (getResultMethod == null)
{
awaitableInfo = default(AwaitableInfo);
awaitableInfo = default;
return false;
}
@ -124,5 +113,4 @@ namespace LINGYUN.Abp.EventBus.CAP.Internal
getAwaiterMethod);
return true;
}
}
}

11
aspnet-core/framework/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/Internal/CoercedAwaitableInfo.cs

@ -4,10 +4,10 @@
using System;
using System.Linq.Expressions;
namespace LINGYUN.Abp.EventBus.CAP.Internal
namespace LINGYUN.Abp.EventBus.CAP.Internal;
internal readonly struct CoercedAwaitableInfo
{
internal struct CoercedAwaitableInfo
{
public AwaitableInfo AwaitableInfo { get; }
public Expression CoercerExpression { get; }
public Type CoercerResultType { get; }
@ -41,16 +41,13 @@ namespace LINGYUN.Abp.EventBus.CAP.Internal
if (ObjectMethodExecutorFSharpSupport.TryBuildCoercerFromFSharpAsyncToAwaitable(type,
out var coercerExpression,
out var coercerResultType))
{
if (AwaitableInfo.IsTypeAwaitable(coercerResultType, out var coercedAwaitableInfo))
{
info = new CoercedAwaitableInfo(coercerExpression, coercerResultType, coercedAwaitableInfo);
return true;
}
}
info = default(CoercedAwaitableInfo);
info = default;
return false;
}
}
}

82
aspnet-core/framework/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/Internal/ObjectMethodExecutor.cs

@ -1,16 +1,18 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#nullable enable
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq.Expressions;
using System.Reflection;
namespace LINGYUN.Abp.EventBus.CAP.Internal
namespace LINGYUN.Abp.EventBus.CAP.Internal;
internal class ObjectMethodExecutor
{
internal class ObjectMethodExecutor
{
// ReSharper disable once InconsistentNaming
private static readonly ConstructorInfo _objectMethodExecutorAwaitableConstructor =
typeof(ObjectMethodExecutorAwaitable).GetConstructor(new[]
{
@ -20,18 +22,15 @@ namespace LINGYUN.Abp.EventBus.CAP.Internal
typeof(Func<object, object>), // getResultMethod
typeof(Action<object, Action>), // onCompletedMethod
typeof(Action<object, Action>) // unsafeOnCompletedMethod
});
})!;
private readonly MethodExecutor _executor;
private readonly MethodExecutorAsync _executorAsync;
private readonly object[] _parameterDefaultValues;
private readonly MethodExecutor? _executor;
private readonly MethodExecutorAsync? _executorAsync;
private readonly object?[]? _parameterDefaultValues;
private ObjectMethodExecutor(MethodInfo methodInfo, TypeInfo targetTypeInfo, object[] parameterDefaultValues)
private ObjectMethodExecutor(MethodInfo methodInfo, TypeInfo targetTypeInfo, object?[]? parameterDefaultValues)
{
if (methodInfo == null)
{
throw new ArgumentNullException(nameof(methodInfo));
}
if (methodInfo == null) throw new ArgumentNullException(nameof(methodInfo));
MethodInfo = methodInfo;
MethodParameters = methodInfo.GetParameters();
@ -48,10 +47,7 @@ namespace LINGYUN.Abp.EventBus.CAP.Internal
// and await it without the extra heap allocations involved in the _executorAsync code path.
_executor = GetExecutor(methodInfo, targetTypeInfo);
if (IsMethodAsync)
{
_executorAsync = GetExecutorAsync(methodInfo, targetTypeInfo, coercedAwaitableInfo);
}
if (IsMethodAsync) _executorAsync = GetExecutorAsync(methodInfo, targetTypeInfo, coercedAwaitableInfo);
_parameterDefaultValues = parameterDefaultValues;
}
@ -62,7 +58,7 @@ namespace LINGYUN.Abp.EventBus.CAP.Internal
public TypeInfo TargetTypeInfo { get; }
public Type AsyncResultType { get; }
public Type? AsyncResultType { get; }
// This field is made internal set because it is set in unit tests.
public Type MethodReturnType { get; internal set; }
@ -75,12 +71,9 @@ namespace LINGYUN.Abp.EventBus.CAP.Internal
}
public static ObjectMethodExecutor Create(MethodInfo methodInfo, TypeInfo targetTypeInfo,
object[] parameterDefaultValues)
{
if (parameterDefaultValues == null)
object?[] parameterDefaultValues)
{
throw new ArgumentNullException(nameof(parameterDefaultValues));
}
if (parameterDefaultValues == null) throw new ArgumentNullException(nameof(parameterDefaultValues));
return new ObjectMethodExecutor(methodInfo, targetTypeInfo, parameterDefaultValues);
}
@ -100,8 +93,9 @@ namespace LINGYUN.Abp.EventBus.CAP.Internal
/// <param name="target">The object whose method is to be executed.</param>
/// <param name="parameters">Parameters to pass to the method.</param>
/// <returns>The method return value.</returns>
public object Execute(object target, params object[] parameters)
public object? Execute(object target, object?[]? parameters)
{
Debug.Assert(_executor != null, "Sync execution is not supported.");
return _executor(target, parameters);
}
@ -124,23 +118,19 @@ namespace LINGYUN.Abp.EventBus.CAP.Internal
/// <param name="target">The object whose method is to be executed.</param>
/// <param name="parameters">Parameters to pass to the method.</param>
/// <returns>An object that you can "await" to get the method return value.</returns>
public ObjectMethodExecutorAwaitable ExecuteAsync(object target, params object[] parameters)
public ObjectMethodExecutorAwaitable ExecuteAsync(object target, object?[]? parameters)
{
Debug.Assert(_executorAsync != null, "Async execution is not supported.");
return _executorAsync(target, parameters);
}
public object GetDefaultValueForParameter(int index)
public object? GetDefaultValueForParameter(int index)
{
if (_parameterDefaultValues == null)
{
throw new InvalidOperationException(
$"Cannot call {nameof(GetDefaultValueForParameter)}, because no parameter default values were supplied.");
}
if (index < 0 || index > MethodParameters.Length - 1)
{
throw new ArgumentOutOfRangeException(nameof(index));
}
if (index < 0 || index > MethodParameters.Length - 1) throw new ArgumentOutOfRangeException(nameof(index));
return _parameterDefaultValues[index];
}
@ -149,11 +139,11 @@ namespace LINGYUN.Abp.EventBus.CAP.Internal
{
// Parameters to executor
var targetParameter = Expression.Parameter(typeof(object), "target");
var parametersParameter = Expression.Parameter(typeof(object[]), "parameters");
var parametersParameter = Expression.Parameter(typeof(object?[]), "parameters");
// Build parameter list
var parameters = new List<Expression>();
var paramInfos = methodInfo.GetParameters();
var parameters = new List<Expression>(paramInfos.Length);
for (var i = 0; i < paramInfos.Length; i++)
{
var paramInfo = paramInfos[i];
@ -187,7 +177,7 @@ namespace LINGYUN.Abp.EventBus.CAP.Internal
private static MethodExecutor WrapVoidMethod(VoidMethodExecutor executor)
{
return delegate (object target, object[] parameters)
return delegate (object target, object?[]? parameters)
{
executor(target, parameters);
return null;
@ -204,8 +194,8 @@ namespace LINGYUN.Abp.EventBus.CAP.Internal
var parametersParameter = Expression.Parameter(typeof(object[]), "parameters");
// Build parameter list
var parameters = new List<Expression>();
var paramInfos = methodInfo.GetParameters();
var parameters = new List<Expression>(paramInfos.Length);
for (var i = 0; i < paramInfos.Length; i++)
{
var paramInfo = paramInfos[i];
@ -250,7 +240,11 @@ namespace LINGYUN.Abp.EventBus.CAP.Internal
var getResultParam = Expression.Parameter(typeof(object), "awaiter");
Func<object, object> getResultFunc;
if (awaitableInfo.ResultType == typeof(void))
{
// var getResultFunc = (object awaiter) =>
// {
// ((CustomAwaiterType)awaiter).GetResult(); // We need to invoke this to surface any exceptions
// return (object)null;
// };
getResultFunc = Expression.Lambda<Func<object, object>>(
Expression.Block(
Expression.Call(
@ -259,9 +253,9 @@ namespace LINGYUN.Abp.EventBus.CAP.Internal
Expression.Constant(null)
),
getResultParam).Compile();
}
else
{
// var getResultFunc = (object awaiter) =>
// (object)((CustomAwaiterType)awaiter).GetResult();
getResultFunc = Expression.Lambda<Func<object, object>>(
Expression.Convert(
Expression.Call(
@ -269,7 +263,6 @@ namespace LINGYUN.Abp.EventBus.CAP.Internal
awaitableInfo.AwaiterGetResultMethod),
typeof(object)),
getResultParam).Compile();
}
// var onCompletedFunc = (object awaiter, Action continuation) => {
// ((CustomAwaiterType)awaiter).OnCompleted(continuation);
@ -284,7 +277,7 @@ namespace LINGYUN.Abp.EventBus.CAP.Internal
onCompletedParam1,
onCompletedParam2).Compile();
Action<object, Action> unsafeOnCompletedFunc = null;
Action<object, Action>? unsafeOnCompletedFunc = null;
if (awaitableInfo.AwaiterUnsafeOnCompletedMethod != null)
{
// var unsafeOnCompletedFunc = (object awaiter, Action continuation) => {
@ -328,10 +321,9 @@ namespace LINGYUN.Abp.EventBus.CAP.Internal
return lambda.Compile();
}
private delegate ObjectMethodExecutorAwaitable MethodExecutorAsync(object target, params object[] parameters);
private delegate ObjectMethodExecutorAwaitable MethodExecutorAsync(object target, object?[]? parameters);
private delegate object MethodExecutor(object target, params object[] parameters);
private delegate object? MethodExecutor(object target, object?[]? parameters);
private delegate void VoidMethodExecutor(object target, object[] parameters);
}
private delegate void VoidMethodExecutor(object target, object?[]? parameters);
}

19
aspnet-core/framework/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/Internal/ObjectMethodExecutorAwaitable.cs

@ -1,15 +1,15 @@
using System;
using System.Runtime.CompilerServices;
namespace LINGYUN.Abp.EventBus.CAP.Internal
namespace LINGYUN.Abp.EventBus.CAP.Internal;
/// <summary>
/// Provides a common awaitable structure that <see cref="ObjectMethodExecutor.ExecuteAsync" /> can
/// return, regardless of whether the underlying value is a System.Task, an FSharpAsync, or an
/// application-defined custom awaitable.
/// </summary>
internal readonly struct ObjectMethodExecutorAwaitable
{
/// <summary>
/// Provides a common awaitable structure that <see cref="ObjectMethodExecutor.ExecuteAsync" /> can
/// return, regardless of whether the underlying value is a System.Task, an FSharpAsync, or an
/// application-defined custom awaitable.
/// </summary>
internal struct ObjectMethodExecutorAwaitable
{
private readonly object _customAwaitable;
private readonly Func<object, object> _getAwaiterMethod;
private readonly Func<object, bool> _isCompletedMethod;
@ -58,7 +58,7 @@ namespace LINGYUN.Abp.EventBus.CAP.Internal
_unsafeOnCompletedMethod);
}
public struct Awaiter : ICriticalNotifyCompletion
public readonly struct Awaiter : ICriticalNotifyCompletion
{
private readonly object _customAwaiter;
private readonly Func<object, bool> _isCompletedMethod;
@ -111,5 +111,4 @@ namespace LINGYUN.Abp.EventBus.CAP.Internal
underlyingMethodToUse(_customAwaiter, continuation);
}
}
}
}

43
aspnet-core/framework/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/Internal/ObjectMethodExecutorFSharpSupport.cs

@ -8,20 +8,20 @@ using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
namespace LINGYUN.Abp.EventBus.CAP.Internal
namespace LINGYUN.Abp.EventBus.CAP.Internal;
/// <summary>
/// Helper for detecting whether a given type is FSharpAsync`1, and if so, supplying
/// an <see cref="Expression" /> for mapping instances of that type to a C# awaitable.
/// </summary>
/// <remarks>
/// The main design goal here is to avoid taking a compile-time dependency on
/// FSharp.Core.dll, because non-F# applications wouldn't use it. So all the references
/// to FSharp types have to be constructed dynamically at runtime.
/// </remarks>
internal static class ObjectMethodExecutorFSharpSupport
{
/// <summary>
/// Helper for detecting whether a given type is FSharpAsync`1, and if so, supplying
/// an <see cref="Expression" /> for mapping instances of that type to a C# awaitable.
/// </summary>
/// <remarks>
/// The main design goal here is to avoid taking a compile-time dependency on
/// FSharp.Core.dll, because non-F# applications wouldn't use it. So all the references
/// to FSharp types have to be constructed dynamically at runtime.
/// </remarks>
internal static class ObjectMethodExecutorFSharpSupport
{
private static readonly object _fsharpValuesCacheLock = new object();
private static readonly object _fsharpValuesCacheLock = new();
private static Assembly _fsharpCoreAssembly;
private static MethodInfo _fsharpAsyncStartAsTaskGenericMethod;
private static PropertyInfo _fsharpOptionOfTaskCreationOptionsNoneProperty;
@ -73,17 +73,16 @@ namespace LINGYUN.Abp.EventBus.CAP.Internal
{
var typeFullName = possibleFSharpAsyncGenericType?.FullName;
if (!string.Equals(typeFullName, "Microsoft.FSharp.Control.FSharpAsync`1", StringComparison.Ordinal))
{
return false;
}
lock (_fsharpValuesCacheLock)
{
if (_fsharpCoreAssembly != null)
{
// Since we've already found the real FSharpAsync.Core assembly, we just have
// to check that the supplied FSharpAsync`1 type is the one from that assembly.
return possibleFSharpAsyncGenericType.Assembly == _fsharpCoreAssembly;
}
// We'll keep trying to find the FSharp types/values each time any type called
// FSharpAsync`1 is supplied.
return TryPopulateFSharpValueCaches(possibleFSharpAsyncGenericType);
}
}
@ -94,23 +93,18 @@ namespace LINGYUN.Abp.EventBus.CAP.Internal
var fsharpOptionType = assembly.GetType("Microsoft.FSharp.Core.FSharpOption`1");
var fsharpAsyncType = assembly.GetType("Microsoft.FSharp.Control.FSharpAsync");
if (fsharpOptionType == null || fsharpAsyncType == null)
{
return false;
}
if (fsharpOptionType == null || fsharpAsyncType == null) return false;
// Get a reference to FSharpOption<TaskCreationOptions>.None
var fsharpOptionOfTaskCreationOptionsType = fsharpOptionType
.MakeGenericType(typeof(TaskCreationOptions));
_fsharpOptionOfTaskCreationOptionsNoneProperty = fsharpOptionOfTaskCreationOptionsType
.GetTypeInfo()
.GetRuntimeProperty("None");
// Get a reference to FSharpOption<CancellationToken>.None
var fsharpOptionOfCancellationTokenType = fsharpOptionType
.MakeGenericType(typeof(CancellationToken));
_fsharpOptionOfCancellationTokenNoneProperty = fsharpOptionOfCancellationTokenType
.GetTypeInfo()
.GetRuntimeProperty("None");
// Get a reference to FSharpAsync.StartAsTask<>
@ -141,5 +135,4 @@ namespace LINGYUN.Abp.EventBus.CAP.Internal
&& string.Equals(type1.Namespace, type2.Namespace, StringComparison.Ordinal)
&& string.Equals(type1.Name, type2.Name, StringComparison.Ordinal);
}
}
}

13
aspnet-core/framework/common/LINGYUN.Abp.EventBus.CAP/Microsoft/Extensions/DependencyInjection/ServiceCollectionExtensions.cs

@ -4,13 +4,13 @@ using DotNetCore.CAP.Serialization;
using LINGYUN.Abp.EventBus.CAP;
using System;
namespace Microsoft.Extensions.DependencyInjection
namespace Microsoft.Extensions.DependencyInjection;
/// <summary>
/// CAP ServiceCollectionExtensions
/// </summary>
public static class ServiceCollectionExtensions
{
/// <summary>
/// CAP ServiceCollectionExtensions
/// </summary>
public static class ServiceCollectionExtensions
{
/// <summary>
/// Adds and configures the consistence services for the consistency.
/// </summary>
@ -25,5 +25,4 @@ namespace Microsoft.Extensions.DependencyInjection
services.AddSingleton<ISerializer, AbpCapSerializer>();
return services;
}
}
}

4
common.props

@ -1,12 +1,12 @@
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>8.2.0</Version>
<Version>8.2.1</Version>
<Authors>colin</Authors>
<NoWarn>$(NoWarn);CS1591;CS0436;CS8618;NU1803</NoWarn>
<PackageProjectUrl>https://github.com/colinin/abp-next-admin</PackageProjectUrl>
<PackageOutputPath>$(SolutionDir)LocalNuget</PackageOutputPath>
<PackageVersion>8.2.0</PackageVersion>
<PackageVersion>8.2.1</PackageVersion>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/colinin/abp-next-admin</RepositoryUrl>

Loading…
Cancel
Save