Exemplo n.º 1
0
        static VmapTrackingEvent LoadTrackingEvent(XElement trackingXml)
        {
            var result = new VmapTrackingEvent();

            if (!string.IsNullOrEmpty(trackingXml.Value))
            {
                result.TrackingUri = new Uri(trackingXml.Value);
            }

            VmapTrackingEventType type;

#if WINDOWS_PHONE
            if (EnumEx.TryParse <VmapTrackingEventType>((string)trackingXml.Attribute("type"), true, out type))
#else
            if (Enum.TryParse((string)trackingXml.Attribute("type"), out type))
#endif
            {
                result.EventType = type;
            }

            return(result);
        }
        static VmapTrackingEvent LoadTrackingEvent(XElement trackingXml)
        {
            var result = new VmapTrackingEvent();

            if (!string.IsNullOrEmpty(trackingXml.Value))
            {
                result.TrackingUri = new Uri(trackingXml.Value);
            }

            VmapTrackingEventType type;
#if WINDOWS_PHONE
            if (EnumEx.TryParse<VmapTrackingEventType>((string)trackingXml.Attribute("type"), true, out type))
#else
            if (Enum.TryParse((string)trackingXml.Attribute("type"), out type))
#endif
            {
                result.EventType = type;
            }

            return result;
        }