Пример #1
0
        public static void Write <TDoc, TCursor>(IO.TagElementStream <TDoc, TCursor, string> s, BListXmlParams p,
                                                 Collections.IProtoEnumWithUndefined undefined)
            where TDoc : class
            where TCursor : class
        {
            if (p.DoNotWriteUndefinedData)
            {
                return;
            }

            if (undefined.MemberUndefinedCount == 0)
            {
                return;
            }

            string element_name = "Undefined" + p.ElementName;

            foreach (string str in undefined.UndefinedMembers)
            {
                using (s.EnterCursorBookmark(element_name))
                {
                    string temp = str;
                    p.StreamDataName(s, ref temp);
                }
            }
        }
        public static UndefinedObjectResult GetUndefinedObject(this Collections.IProtoEnumWithUndefined protoEnum, int memberId)
        {
            Contract.Requires(protoEnum != null);

            string name = protoEnum.GetMemberNameOrUndefined(memberId);

            return(new UndefinedObjectResult(memberId, name));
        }
Пример #3
0
        public static void Write(KSoft.IO.XmlElementStream s, BListXmlParams p,
                                 Collections.IProtoEnumWithUndefined undefined)
        {
            if (undefined.MemberUndefinedCount == 0)
            {
                return;
            }

            string element_name = "Undefined" + p.ElementName;

            foreach (string str in undefined.UndefinedMembers)
            {
                using (s.EnterCursorBookmark(element_name))
                    s.WriteAttribute(p.DataName, str);
            }
        }