示例#1
0
        private void AddSecondaryXmlMeta(DictionaryAdapterMeta meta)
        {
            if (secondaryXmlMetas == null)
            {
                secondaryXmlMetas = new Dictionary <Type, XmlMetadata>();
            }
            else if (secondaryXmlMetas.ContainsKey(meta.Type))
            {
                return;
            }

            RequireXmlMeta(meta);
            secondaryXmlMetas[meta.Type] = meta.GetXmlMeta();
        }
示例#2
0
        private void InitializePrimary(DictionaryAdapterMeta meta, IDictionaryAdapter dictionaryAdapter)
        {
            RequireXmlMeta(meta);
            primaryXmlMeta = meta.GetXmlMeta();

            if (node == null)
            {
                node = GetBaseNode();
            }
            if (!node.IsReal)
            {
                node.Realized += HandleNodeRealized;
            }

            if (references == null)
            {
                references = new XmlReferenceManager(node, DefaultXmlReferenceFormat.Instance);
            }
            InitializeReference(this);
        }