Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Server/Hotfix/Handler/DBSaveBatchRequestHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ protected override async void Run(Session session, DBSaveBatchRequest message, A
{
DBCacheComponent dbCacheComponent = Game.Scene.GetComponent<DBCacheComponent>();

if (message.CollectionName == "")
if (string.IsNullOrEmpty(message.CollectionName)
{
message.CollectionName = message.Disposers[0].GetType().Name;
}
Expand All @@ -36,4 +36,4 @@ protected override async void Run(Session session, DBSaveBatchRequest message, A
}
}
}
}
}
6 changes: 3 additions & 3 deletions Server/Model/Component/DBCacheComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public Task<bool> Add(Disposer disposer, string collectionName = "")

this.AddToCache(disposer, collectionName);

if (collectionName == "")
if (string.IsNullOrEmpty(collectionName))
{
collectionName = disposer.GetType().Name;
}
Expand All @@ -57,7 +57,7 @@ public Task<bool> AddBatch(List<Disposer> disposers, string collectionName)

public void AddToCache(Disposer disposer, string collectionName = "")
{
if (collectionName == "")
if (string.IsNullOrEmpty(collectionName))
{
collectionName = disposer.GetType().Name;
}
Expand Down Expand Up @@ -147,4 +147,4 @@ public Task<List<Disposer>> GetJson(string collectionName, string json)
return tcs.Task;
}
}
}
}