Exemplo n.º 1
0
        private void ParseLevels(Wing wing, XmlNodeList levelNodes)
        {
            foreach (var node in levelNodes)
            {
                XmlElement levelNode = (XmlElement)node;

                Level lvl = new Level();

                lvl.Name = levelNode.GetAttribute("Name");

                ParseRooms(lvl, levelNode.GetElementsByTagName("Room"));

                wing.Level.Add(lvl);
            }
        }
 /// <summary>
 /// Create a new Wing object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="name">Initial value of the Name property.</param>
 public static Wing CreateWing(global::System.Int32 id, global::System.String name)
 {
     Wing wing = new Wing();
     wing.Id = id;
     wing.Name = name;
     return wing;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the WingSet EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToWingSet(Wing wing)
 {
     base.AddObject("WingSet", wing);
 }
Exemplo n.º 4
0
 public DesignDataService()
 {
     Wings = new Wing[0];
     Levels = new Level[0];
     Rooms = new Room[0];
 }
Exemplo n.º 5
0
        private void ParseWings(XmlNodeList wingNodes)
        {
            foreach (var node in wingNodes)
            {
                XmlElement wingNode = (XmlElement)node;

                Wing wing = new Wing();

                wing.Name = wingNode.GetAttribute("Name");

                ParseLevels(wing, wingNode.GetElementsByTagName("Level"));

                Wings.Add(wing);
            }
        }