19 changed files with 131 additions and 132 deletions
@ -0,0 +1,3 @@ |
|||||
|
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
||||
|
<ConfigureAwait ContinueOnCapturedContext="false" /> |
||||
|
</Weavers> |
||||
@ -0,0 +1,30 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> |
||||
|
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. --> |
||||
|
<xs:element name="Weavers"> |
||||
|
<xs:complexType> |
||||
|
<xs:all> |
||||
|
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1"> |
||||
|
<xs:complexType> |
||||
|
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" /> |
||||
|
</xs:complexType> |
||||
|
</xs:element> |
||||
|
</xs:all> |
||||
|
<xs:attribute name="VerifyAssembly" type="xs:boolean"> |
||||
|
<xs:annotation> |
||||
|
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation> |
||||
|
</xs:annotation> |
||||
|
</xs:attribute> |
||||
|
<xs:attribute name="VerifyIgnoreCodes" type="xs:string"> |
||||
|
<xs:annotation> |
||||
|
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation> |
||||
|
</xs:annotation> |
||||
|
</xs:attribute> |
||||
|
<xs:attribute name="GenerateXsd" type="xs:boolean"> |
||||
|
<xs:annotation> |
||||
|
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation> |
||||
|
</xs:annotation> |
||||
|
</xs:attribute> |
||||
|
</xs:complexType> |
||||
|
</xs:element> |
||||
|
</xs:schema> |
||||
@ -0,0 +1,16 @@ |
|||||
|
<Project Sdk="Microsoft.NET.Sdk"> |
||||
|
|
||||
|
<Import Project="..\..\..\configureawait.props" /> |
||||
|
<Import Project="..\..\..\common.props" /> |
||||
|
|
||||
|
<PropertyGroup> |
||||
|
<TargetFramework>net6.0</TargetFramework> |
||||
|
<RootNamespace /> |
||||
|
</PropertyGroup> |
||||
|
|
||||
|
<ItemGroup> |
||||
|
<ProjectReference Include="..\..\common\LINGYUN.Abp.Wrapper\LINGYUN.Abp.Wrapper.csproj" /> |
||||
|
<ProjectReference Include="..\LINGYUN.Abp.Dapr.Actors.AspNetCore\LINGYUN.Abp.Dapr.Actors.AspNetCore.csproj" /> |
||||
|
</ItemGroup> |
||||
|
|
||||
|
</Project> |
||||
@ -0,0 +1,20 @@ |
|||||
|
using Dapr.Actors; |
||||
|
using LINGYUN.Abp.Wrapper; |
||||
|
using Volo.Abp.Modularity; |
||||
|
|
||||
|
namespace LINGYUN.Abp.Dapr.Actors.AspNetCore.Wrapper |
||||
|
{ |
||||
|
[DependsOn( |
||||
|
typeof(AbpDaprActorsAspNetCoreModule), |
||||
|
typeof(AbpWrapperModule))] |
||||
|
public class AbpDaprActorsAspNetCoreWrapperModule : AbpModule |
||||
|
{ |
||||
|
public override void ConfigureServices(ServiceConfigurationContext context) |
||||
|
{ |
||||
|
Configure<AbpWrapperOptions>(options => |
||||
|
{ |
||||
|
options.IgnoredInterfaces.TryAdd<IActor>(); |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -1,14 +0,0 @@ |
|||||
using Volo.Abp.Http.Client; |
|
||||
|
|
||||
namespace LINGYUN.Abp.Dapr.Actors |
|
||||
{ |
|
||||
public class AbpDaprRemoteServiceOptions |
|
||||
{ |
|
||||
public RemoteServiceConfigurationDictionary RemoteServices { get; set; } |
|
||||
|
|
||||
public AbpDaprRemoteServiceOptions() |
|
||||
{ |
|
||||
RemoteServices = new RemoteServiceConfigurationDictionary(); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,12 +0,0 @@ |
|||||
namespace LINGYUN.Abp.Dapr.Client |
|
||||
{ |
|
||||
public class AbpDaprRemoteServiceOptions |
|
||||
{ |
|
||||
public DaprRemoteServiceConfigurationDictionary RemoteServices { get; set; } |
|
||||
|
|
||||
public AbpDaprRemoteServiceOptions() |
|
||||
{ |
|
||||
RemoteServices = new DaprRemoteServiceConfigurationDictionary(); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,30 +0,0 @@ |
|||||
using System.Collections.Generic; |
|
||||
using Volo.Abp.Http.Client; |
|
||||
|
|
||||
namespace LINGYUN.Abp.Dapr.Client |
|
||||
{ |
|
||||
public class DaprRemoteServiceConfiguration : RemoteServiceConfiguration |
|
||||
{ |
|
||||
/// <summary>
|
|
||||
/// Base AppId.
|
|
||||
/// </summary>
|
|
||||
public string AppId |
|
||||
{ |
|
||||
get => this.GetOrDefault(nameof(AppId)); |
|
||||
set => this[nameof(AppId)] = value; |
|
||||
} |
|
||||
|
|
||||
public DaprRemoteServiceConfiguration() |
|
||||
{ |
|
||||
} |
|
||||
|
|
||||
public DaprRemoteServiceConfiguration( |
|
||||
string appId, |
|
||||
string baseUil, |
|
||||
string version) |
|
||||
: base(baseUil, version) |
|
||||
{ |
|
||||
this[nameof(AppId)] = appId; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,32 +0,0 @@ |
|||||
using JetBrains.Annotations; |
|
||||
using System.Collections.Generic; |
|
||||
using Volo.Abp; |
|
||||
|
|
||||
namespace LINGYUN.Abp.Dapr.Client |
|
||||
{ |
|
||||
public class DaprRemoteServiceConfigurationDictionary : Dictionary<string, DaprRemoteServiceConfiguration> |
|
||||
{ |
|
||||
public const string DefaultName = "Default"; |
|
||||
|
|
||||
public DaprRemoteServiceConfiguration Default |
|
||||
{ |
|
||||
get => this.GetOrDefault(DefaultName); |
|
||||
set => this[DefaultName] = value; |
|
||||
} |
|
||||
|
|
||||
[NotNull] |
|
||||
public DaprRemoteServiceConfiguration GetConfigurationOrDefault(string name) |
|
||||
{ |
|
||||
return this.GetOrDefault(name) |
|
||||
?? Default |
|
||||
?? throw new AbpException($"Dapr remote service '{name}' was not found and there is no default configuration."); |
|
||||
} |
|
||||
|
|
||||
[CanBeNull] |
|
||||
public DaprRemoteServiceConfiguration GetConfigurationOrDefaultOrNull(string name) |
|
||||
{ |
|
||||
return this.GetOrDefault(name) |
|
||||
?? Default; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -0,0 +1,25 @@ |
|||||
|
using JetBrains.Annotations; |
||||
|
using System.Collections.Generic; |
||||
|
using Volo.Abp; |
||||
|
using Volo.Abp.Http.Client; |
||||
|
|
||||
|
namespace LINGYUN.Abp.Dapr.Client; |
||||
|
|
||||
|
public static class DaprRemoteServiceConfigurationExtensions |
||||
|
{ |
||||
|
public const string AppId = "AppId"; |
||||
|
|
||||
|
[NotNull] |
||||
|
public static string GetAppId([NotNull] this RemoteServiceConfiguration configuration) |
||||
|
{ |
||||
|
Check.NotNullOrEmpty(configuration, nameof(configuration)); |
||||
|
|
||||
|
return configuration.GetOrDefault(AppId) ?? throw new AbpException($"Could not get AppId for RemoteServices Configuration."); |
||||
|
} |
||||
|
|
||||
|
public static RemoteServiceConfiguration SetAppId([NotNull] this RemoteServiceConfiguration configuration, [CanBeNull] string value) |
||||
|
{ |
||||
|
configuration[AppId] = value; |
||||
|
return configuration; |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue