Formatting FIxes (#58)
This commit is contained in:
parent
57fb9fb525
commit
096d39609e
1318 changed files with 11633 additions and 22129 deletions
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue