Adds style cop (#109)

This commit is contained in:
Kamron Batman 2020-04-26 00:16:02 -07:00 committed by GitHub
parent 3e715bcb60
commit 556a17aba8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1725 changed files with 33831 additions and 38046 deletions

View file

@ -1,3 +1,4 @@
using System;
using System.Collections.Generic;
using System.Xml;
@ -5,31 +6,31 @@ namespace Server.Gumps
{
public interface IGoNode
{
ParentNode Parent{ get; }
string Name{ get; }
ParentNode Parent { get; }
string Name { get; }
}
public class ParentNode : IGoNode
{
public ParentNode(XmlTextReader xml, ParentNode parent)
{
Parent = parent;
Parse(xml);
}
public ParentNode Parent{ get; }
public ParentNode Parent { get; }
public IGoNode[] Children{ get; private set; }
public IGoNode[] Children { get; private set; }
public string Name{ get; private set; }
public string Name { get; private set; }
private void Parse(XmlTextReader xml)
{
Name = xml.MoveToAttribute("name") ? xml.Value : "empty";
if (xml.IsEmptyElement)
Children = new IGoNode[0];
Children = Array.Empty<IGoNode>();
else
{
List<IGoNode> children = new List<IGoNode>();
@ -49,4 +50,4 @@ namespace Server.Gumps
}
}
}
}
}