public XmlDocument GetIncompleteMetadata(
            out Dictionary <string, XmlElement> classElementsByName,
            out List <XmlElement> orderedClassElements)
        {
            string      fileName1       = Path.Combine(this.FolderPath, "Meta\\meta-app.xml");
            double      num             = SysUtils.GetFileVersion(fileName1);
            XmlDocument document        = XmlUtils.CreateDocument("AppMetadata");
            XmlElement  documentElement = document.DocumentElement;

            documentElement.SetAttribute("AppRootFolder", this.FolderPath);
            XmlDocument           xmlDocument1          = XmlUtils.LoadDocument(fileName1, Encoding.GetEncoding(1251));
            MetadataElementLoader metadataElementLoader = new MetadataElementLoader(documentElement);

            if (xmlDocument1.DocumentElement != null)
            {
                foreach (XmlNode selectNode in xmlDocument1.DocumentElement.SelectNodes("meta-data"))
                {
                    string fileName2   = Path.Combine(this.FolderPath, "Meta\\" + XmlUtils.NeedAttr(selectNode, "src"));
                    double fileVersion = SysUtils.GetFileVersion(fileName2);
                    if (fileVersion > num)
                    {
                        num = fileVersion;
                    }
                    XmlDocument xmlDocument2 = XmlUtils.LoadDocument(fileName2, Encoding.GetEncoding(1251));
                    metadataElementLoader.Merge(xmlDocument2.DocumentElement);
                }
            }
            classElementsByName  = new Dictionary <string, XmlElement>();
            orderedClassElements = new List <XmlElement>();
            foreach (XmlElement selectNode in documentElement.SelectNodes("class"))
            {
                orderedClassElements.Add(selectNode);
                classElementsByName[selectNode.GetAttribute("name")] = selectNode;
            }
            documentElement.SetAttribute("Version", XStrUtils.ToXStr(num));
            XmlUtils.SetChildText((XmlNode)documentElement, "meta-version", XStrUtils.ToXStr(num));
            foreach (XmlNode childNode in this.FDbInfo.DocumentElement.ChildNodes)
            {
                documentElement.AppendChild(document.ImportNode(childNode, true));
            }
            foreach (XmlElement selectNode in documentElement.SelectNodes("class"))
            {
                ApplicationMetadataXml.MakePrimaryClassCompletion(selectNode);
            }
            return(document);
        }
 public string CurToXStr(object value) => InMetaXStrUtils.TreatAsNull(value) ? this.XStrNULL : XStrUtils.ToXStr(Convert.ToDecimal(value));
 public string DblToXStr(object value) => InMetaXStrUtils.TreatAsNull(value) ? this.XStrNULL : XStrUtils.ToXStr(Convert.ToDouble(value));
 public string LngToXStr(object value) => InMetaXStrUtils.TreatAsNull(value) ? this.XStrNULL : XStrUtils.ToXStr(Convert.ToInt32(value));
 public string BoolToXStr(object value) => InMetaXStrUtils.TreatAsNull(value) ? this.XStrNULL : XStrUtils.ToXStr(Convert.ToBoolean(value));