Skip to content

Commit

Permalink
Merge pull request #39 from EasyAbp/fix-naming
Browse files Browse the repository at this point in the history
Fix classes naming
  • Loading branch information
gdlcf88 committed Dec 13, 2022
2 parents 21f7702 + d5ca775 commit d708c78
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class AsyncLocalOptionsResolveContributor : IWeChatOfficialOptionsResolve

public string Name => ContributorName;

public void Resolve(WeChatOfficialResolveContext context)
public void Resolve(WeChatOfficialOptionsResolveContext context)
{
var asyncLocal = context.ServiceProvider.GetRequiredService<IWeChatOfficialAsyncLocalAccessor>();

Expand All @@ -23,7 +23,7 @@ public void Resolve(WeChatOfficialResolveContext context)
}
}

public ValueTask ResolveAsync(WeChatOfficialResolveContext context)
public ValueTask ResolveAsync(WeChatOfficialOptionsResolveContext context)
{
var asyncLocal = context.ServiceProvider.GetRequiredService<IWeChatOfficialAsyncLocalAccessor>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ public class ConfigurationOptionsResolveContributor : IWeChatOfficialOptionsReso
public const string ContributorName = "Configuration";
public string Name => ContributorName;

public void Resolve(WeChatOfficialResolveContext context)
public void Resolve(WeChatOfficialOptionsResolveContext context)
{
context.Options = context.ServiceProvider.GetRequiredService<IOptions<AbpWeChatOfficialOptions>>().Value;
}

public ValueTask ResolveAsync(WeChatOfficialResolveContext context)
public ValueTask ResolveAsync(WeChatOfficialOptionsResolveContext context)
{
context.Options = context.ServiceProvider.GetRequiredService<IOptions<AbpWeChatOfficialOptions>>().Value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ public interface IWeChatOfficialOptionsResolveContributor
string Name { get; }

[Obsolete("Please use asynchronous method.")]
void Resolve(WeChatOfficialResolveContext context);
void Resolve(WeChatOfficialOptionsResolveContext context);

ValueTask ResolveAsync(WeChatOfficialResolveContext context);
ValueTask ResolveAsync(WeChatOfficialOptionsResolveContext context);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

namespace EasyAbp.Abp.WeChat.Official.Infrastructure.OptionsResolve
{
public class WeChatOfficialResolveContext : IServiceProviderAccessor
public class WeChatOfficialOptionsResolveContext : IServiceProviderAccessor
{
public IWeChatOfficialOptions Options { get; set; }

public IServiceProvider ServiceProvider { get; }

public WeChatOfficialResolveContext(IServiceProvider serviceProvider)
public WeChatOfficialOptionsResolveContext(IServiceProvider serviceProvider)
{
ServiceProvider = serviceProvider;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public IWeChatOfficialOptions Resolve()
{
using (var serviceScope = _serviceProvider.CreateScope())
{
var context = new WeChatOfficialResolveContext(serviceScope.ServiceProvider);
var context = new WeChatOfficialOptionsResolveContext(serviceScope.ServiceProvider);

foreach (var resolver in _options.WeChatOfficialOptionsResolveContributors)
{
Expand All @@ -43,7 +43,7 @@ public virtual async ValueTask<IWeChatOfficialOptions> ResolveAsync()
{
using (var scope = _serviceProvider.CreateScope())
{
var context = new WeChatOfficialResolveContext(scope.ServiceProvider);
var context = new WeChatOfficialOptionsResolveContext(scope.ServiceProvider);

foreach (var contributor in _options.WeChatOfficialOptionsResolveContributors)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class AsyncLocalOptionsResolveContributor : IWeChatThirdPartyPlatformOpti

public string Name => ContributorName;

public void Resolve(WeChatOpenPlatformResolveContext context)
public void Resolve(WeChatThirdPartyPlatformOptionsResolveContext context)
{
var asyncLocal = context.ServiceProvider.GetRequiredService<IWeChatThirdPartyPlatformAsyncLocalAccessor>();

Expand All @@ -23,7 +23,7 @@ public void Resolve(WeChatOpenPlatformResolveContext context)
}
}

public ValueTask ResolveAsync(WeChatOpenPlatformResolveContext context)
public ValueTask ResolveAsync(WeChatThirdPartyPlatformOptionsResolveContext context)
{
var asyncLocal = context.ServiceProvider.GetRequiredService<IWeChatThirdPartyPlatformAsyncLocalAccessor>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ public class ConfigurationOptionsResolveContributor : IWeChatThirdPartyPlatformO
public const string ContributorName = "Configuration";
public string Name => ContributorName;

public void Resolve(WeChatOpenPlatformResolveContext context)
public void Resolve(WeChatThirdPartyPlatformOptionsResolveContext context)
{
context.Options = context.ServiceProvider.GetRequiredService<IOptions<AbpWeChatThirdPartyPlatformOptions>>().Value;
}

public ValueTask ResolveAsync(WeChatOpenPlatformResolveContext context)
public ValueTask ResolveAsync(WeChatThirdPartyPlatformOptionsResolveContext context)
{
context.Options = context.ServiceProvider.GetRequiredService<IOptions<AbpWeChatThirdPartyPlatformOptions>>().Value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public interface IWeChatThirdPartyPlatformOptionsResolveContributor
string Name { get; }

[Obsolete("Please use asynchronous method.")]
void Resolve(WeChatOpenPlatformResolveContext context);
void Resolve(WeChatThirdPartyPlatformOptionsResolveContext context);

ValueTask ResolveAsync(WeChatOpenPlatformResolveContext context);
ValueTask ResolveAsync(WeChatThirdPartyPlatformOptionsResolveContext context);
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

namespace EasyAbp.Abp.WeChat.OpenPlatform.Infrastructure.ThirdPartyPlatform.OptionsResolve;

public class WeChatOpenPlatformResolveContext : IServiceProviderAccessor
public class WeChatThirdPartyPlatformOptionsResolveContext : IServiceProviderAccessor
{
public IWeChatThirdPartyPlatformOptions Options { get; set; }

public IServiceProvider ServiceProvider { get; }

public WeChatOpenPlatformResolveContext(IServiceProvider serviceProvider)
public WeChatThirdPartyPlatformOptionsResolveContext(IServiceProvider serviceProvider)
{
ServiceProvider = serviceProvider;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public IWeChatThirdPartyPlatformOptions Resolve()
{
using (var serviceScope = _serviceProvider.CreateScope())
{
var context = new WeChatOpenPlatformResolveContext(serviceScope.ServiceProvider);
var context = new WeChatThirdPartyPlatformOptionsResolveContext(serviceScope.ServiceProvider);

foreach (var resolver in _options.WeChatThirdPartyPlatformOptionsResolveContributors)
{
Expand All @@ -43,7 +43,7 @@ public virtual async ValueTask<IWeChatThirdPartyPlatformOptions> ResolveAsync()
{
using (var scope = _serviceProvider.CreateScope())
{
var context = new WeChatOpenPlatformResolveContext(scope.ServiceProvider);
var context = new WeChatThirdPartyPlatformOptionsResolveContext(scope.ServiceProvider);

foreach (var contributor in _options.WeChatThirdPartyPlatformOptionsResolveContributors)
{
Expand Down

0 comments on commit d708c78

Please sign in to comment.