Esempio n. 1
0
        internal static KeyValuePairMapping Load(XmlReader reader)
        {
            KeyValuePairMapping result = new KeyValuePairMapping();

            result.OriginalKey = reader.GetAttribute("Name");
            result.NewKey      = reader.GetAttribute("Id");
            result.Optional    = Convert.ToBoolean(Convert.ToInt32(reader.GetAttribute("Optional")));

            // advance the xml reader before departing
            reader.Skip();

            return(result);
        }
Esempio n. 2
0
        internal static IEnumerable <KeyValuePairMapping> LoadValues(XmlReader reader)
        {
            while (reader.GoToSibling())
            {
                switch (reader.LocalName)
                {
                case "Value":
                    yield return(KeyValuePairMapping.Load(reader));

                    break;

                default:
                    reader.Skip();
                    break;
                }
            }
        }
        internal static KeyValuePairMapping Load(XmlReader reader)
        {
            KeyValuePairMapping result = new KeyValuePairMapping();
            result.OriginalKey = reader.GetAttribute("Name");
            result.NewKey = reader.GetAttribute("Id");
            result.Optional = Convert.ToBoolean(Convert.ToInt32(reader.GetAttribute("Optional")));

            // advance the xml reader before departing
            reader.Skip();

            return result;
        }