Formatting FIxes (#58)

This commit is contained in:
Kamron Batman 2019-10-04 23:08:13 -07:00 • committed by GitHub
parent 57fb9fb525
commit 096d39609e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1318 changed files with 11633 additions and 22129 deletions

View file

@ -21,10 +21,7 @@ namespace Server.Accounting
EventSink.WorldSave += Save;
}
public static ICollection<IAccount> GetAccounts()
{
return m_Accounts.Values;
}
public static ICollection<IAccount> GetAccounts() => m_Accounts.Values;
public static IAccount GetAccount(string username)
{
@ -75,24 +72,22 @@ namespace Server.Accounting
string filePath = Path.Combine("Saves/Accounts", "accounts.xml");
using (StreamWriter op = new StreamWriter(filePath))
{
XmlTextWriter xml = new XmlTextWriter(op) { Formatting = Formatting.Indented, IndentChar = '\t', Indentation = 1 };
using StreamWriter op = new StreamWriter(filePath);
XmlTextWriter xml = new XmlTextWriter(op) { Formatting = Formatting.Indented, IndentChar = '\t', Indentation = 1 };
xml.WriteStartDocument(true);
xml.WriteStartDocument(true);
xml.WriteStartElement("accounts");
xml.WriteStartElement("accounts");
xml.WriteAttributeString("count", m_Accounts.Count.ToString());
xml.WriteAttributeString("count", m_Accounts.Count.ToString());
foreach (Account a in GetAccounts())
a.Save(xml);
foreach (Account a in GetAccounts())
a.Save(xml);
xml.WriteEndElement();
xml.WriteEndElement();
xml.Close();
}
xml.Close();
}
}
}