public override void SaveStorageNode(IBxStorageNode node) { string curVersion = Version; if (!string.IsNullOrEmpty(curVersion)) { BxVersionHelp.SetVersion(node, curVersion); } SaveStorageNodeSameVersion(node); }
public override void LoadStorageNode(IBxStorageNode node) { string curVersion = Version; string ver = BxVersionHelp.GetVersion(node); if (string.IsNullOrEmpty(curVersion) || curVersion == ver) { LoadStorageNodeSameVersion(node); return; } IEnumerable <IBxElementSite> elements = ChildSites; IEnumerable <IBxStorageNode> childs = node.ChildNodes; using (IEnumerator <IBxStorageNode> itor = childs.GetEnumerator()) { itor.Reset(); string svt = null; string eleVersion = null; foreach (IBxElementSite one in elements) { if (one is IBxPersistStorageNode) { if (one is IBxElementSiteVertionType) { svt = (one as IBxElementSiteVertionType).VertionType; eleVersion = (one as IBxElementSiteVertionType).Version; } else { svt = null; } if (!string.IsNullOrEmpty(svt)) { if (svt == BxSiteVerType.Insert && string.Compare(eleVersion, ver) > 0) { continue; } else if (svt == BxSiteVerType.Placeholder) { if (!itor.MoveNext()) { break; } } else { } } { if (!itor.MoveNext()) { break; } (one as IBxPersistStorageNode).LoadStorageNode(itor.Current); } } } } }