public void add(string url, List <string> depAssetGuid) { ABDepInfo info = new ABDepInfo(); info._url = url; info._depAssetGuid = depAssetGuid; _ABDepDic[url] = info; }
public bool read(string filename) { if (File.Exists(filename) == false) { return(false); } _ABDepDic.Clear(); XmlDocument xmldoc = new XmlDocument(); xmldoc.Load(filename); XmlNode rootElement = xmldoc.SelectSingleNode("ABDepInfo"); if (rootElement == null) { return(false); } XmlNodeList nodeList = rootElement.ChildNodes; foreach (XmlNode xn in nodeList) { ABDepInfo depInfoUnit = new ABDepInfo(); foreach (XmlAttribute attr in xn.Attributes) { if (attr.Name.Equals("url")) { depInfoUnit._url = attr.Value; } } XmlNodeList xnChildNodeList = xn.ChildNodes; foreach (XmlNode xnChild in xnChildNodeList) { foreach (XmlAttribute attr in xnChild.Attributes) { if (attr.Name.Equals("guid")) { depInfoUnit._depAssetGuid.Add(attr.Value); } } } _ABDepDic.Add(depInfoUnit._url, depInfoUnit); } return(true); }
public bool tryGetValue(string url, out ABDepInfo abDepInfo) { return(_ABDepDic.TryGetValue(url, out abDepInfo)); }
public void add(ABDepInfo info) { _ABDepDic[info._url] = info; }