Ejemplo n.º 1
0
        public static void Unserialize(
                this XElement element
            ,   DataModelContext context
            ,   IUnserializeErrorReporter reporter
            ,   ref DataModelCollection<string> instance
            )
        {
            instance = new DataModelCollection<string> (context);

            if (element == null)
            {
                return;
            }

            foreach (var subElement in element.Elements (NodeName))
            {
                instance.Add (subElement.Value);
            }
        }
Ejemplo n.º 2
0
        public static void Unserialize(
            this XElement element
            , DataModelContext context
            , IUnserializeErrorReporter reporter
            , ref bool instance
            )
        {
            if (element == null)
            {
                return;
            }

            instance = element.Value.Parse(SerializeCulture, false);
        }
Ejemplo n.º 3
0
        public static void Unserialize(
            this XElement element
            , DataModelContext context
            , IUnserializeErrorReporter reporter
            , ref string instance
            )
        {
            if (element == null)
            {
                return;
            }

            instance = element.Value;
        }