cosmetics

This commit is contained in:
UbitUmarov
2024-12-22 23:29:34 +00:00
parent 1edd874055
commit 4088b5d165
6 changed files with 13 additions and 15 deletions

View File

@@ -75,7 +75,6 @@ namespace OpenSim.ConsoleClient
Requester.MakeRequest("http://"+m_Host+":"+m_Port.ToString()+"/StartSession/", String.Format("USER={0}&PASS={1}", m_User, m_Pass), LoginReply);
string pidFile = serverConfig.GetString("PIDFile", String.Empty);
while (m_Server.Running)
{
@@ -83,7 +82,8 @@ namespace OpenSim.ConsoleClient
MainConsole.Instance.Prompt();
}
if (pidFile != String.Empty)
string pidFile = serverConfig.GetString("PIDFile", string.Empty);
if (pidFile.Length > 0)
File.Delete(pidFile);
Environment.Exit(0);

View File

@@ -122,8 +122,7 @@ namespace OpenSim.Data.MySQL
public bool Store(AuthenticationData data)
{
if (data.Data.ContainsKey("UUID"))
data.Data.Remove("UUID");
data.Data.Remove("UUID");
string[] fields = new List<string>(data.Data.Keys).ToArray();

View File

@@ -372,7 +372,7 @@ namespace OpenSim.Framework.Servers.HttpServer
public void RemoveWebSocketHandler(string servicepath)
{
m_WebSocketHandlers.TryRemove(servicepath, out WebSocketRequestDelegate dummy);
m_WebSocketHandlers.TryRemove(servicepath, out _);
}
public List<string> GetStreamHandlerKeys()
@@ -526,7 +526,7 @@ namespace OpenSim.Framework.Servers.HttpServer
public void RemoveIndexPHPMethodHandler(string key)
{
m_indexPHPmethods.TryRemove(key, out SimpleStreamMethod sh);
m_indexPHPmethods.TryRemove(key, out _);
}
public SimpleStreamMethod TryGetIndexPHPMethodHandler(string key)
@@ -543,7 +543,7 @@ namespace OpenSim.Framework.Servers.HttpServer
public void RemoveGlobalPMethodHandler(string key)
{
m_globalMethods.TryRemove(key, out SimpleStreamMethod sh);
m_globalMethods.TryRemove(key, out _);
}
public bool TryGetGlobalMethodHandler(string key, out SimpleStreamMethod sh)

View File

@@ -61,12 +61,11 @@ namespace OSHttpServer
private void OnFreeContext(object sender, DisconnectedEventArgs e)
{
var imp = sender as HttpClientContext;
if (imp == null || imp.contextID < 0)
return;
m_activeContexts.TryRemove(imp.contextID, out HttpClientContext dummy);
imp.Close();
if (sender is HttpClientContext imp && imp.contextID >= 0)
{
m_activeContexts.TryRemove(imp.contextID, out _);
imp.Close();
}
}

View File

@@ -620,7 +620,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
// Trim off the file portion if we aren't already dealing with a directory path
if (TarArchiveReader.TarEntryType.TYPE_DIRECTORY != entryType)
path = path.Remove(path.LastIndexOf("/") + 1);
path = path.Remove(path.LastIndexOf('/') + 1);
InventoryFolderBase foundFolder
= ReplicateArchivePathToUserInventory(