API.Models.Connexionz.ConnexionzPlatform.ConnexionzPlatform C# (CSharp) Méthode

ConnexionzPlatform() public méthode

public ConnexionzPlatform ( System.Xml.Linq.XElement platform ) : System.Xml.Linq
platform System.Xml.Linq.XElement
Résultat System.Xml.Linq
        public ConnexionzPlatform(XElement platform)
        {
            PlatformTag = int.Parse(platform.Attribute("PlatformTag").Value);
            PlatformNo = int.Parse(platform.Attribute("PlatformNo").Value);

            // Almost all stops except for places like HP and CVHS have this attribute.
            // It's reasonable to default to having those stops point in the positive X axis direction.
            double bearing = 0.0;
            double.TryParse(platform.Attribute("BearingToRoad")?.Value, out bearing);
            BearingToRoad = bearing;

            Name = platform.Attribute("Name").Value;

            XElement position = platform.Element("Position");
            Lat = double.Parse(position.Attribute("Lat").Value);
            Long = double.Parse(position.Attribute("Long").Value);
        }
ConnexionzPlatform