Merge pull request #1022 from yileicn/master
optimize naming, ConfigureAwait
This commit is contained in:
commit
49d615a6a7
|
|
@ -19,7 +19,7 @@ public abstract class AgentHookBase : IAgentHook
|
||||||
_settings = settings;
|
_settings = settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetAget(Agent agent)
|
public void SetAgent(Agent agent)
|
||||||
{
|
{
|
||||||
_agent = agent;
|
_agent = agent;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ public interface IAgentHook
|
||||||
/// </summary>
|
/// </summary>
|
||||||
string SelfId { get; }
|
string SelfId { get; }
|
||||||
Agent Agent { get; }
|
Agent Agent { get; }
|
||||||
void SetAget(Agent agent);
|
void SetAgent(Agent agent);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Triggered when agent is loading.
|
/// Triggered when agent is loading.
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ public partial class AgentService
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
hook.SetAget(agent);
|
hook.SetAgent(agent);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(agent.Instruction))
|
if (!string.IsNullOrEmpty(agent.Instruction))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ public static class Utilities
|
||||||
{
|
{
|
||||||
// Clear whole cache.
|
// Clear whole cache.
|
||||||
var sharpCache = new SharpCacheAttribute(0);
|
var sharpCache = new SharpCacheAttribute(0);
|
||||||
sharpCache.ClearCacheAsync().ConfigureAwait(false).GetAwaiter().GetResult();
|
sharpCache.ClearCacheAsync().GetAwaiter().GetResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string HideMiddleDigits(string input, bool isEmail = false)
|
public static string HideMiddleDigits(string input, bool isEmail = false)
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ public class RealtimeChatSession : IDisposable
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
await _clientEventSemaphore.WaitAsync().ConfigureAwait(false);
|
await _clientEventSemaphore.WaitAsync();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue