public EclipsePlayer(System.Xml.XmlNode playerNode) { this.playerNode = playerNode; color = playerNode.Attributes["color"].InnerText; win = int.Parse(playerNode.Attributes["win"].InnerText) > 0; score = playerNode.Attributes["score"].InnerText; race = EclipseRaceParser.categorizeByRace(color); }
/// <summary> /// コンストラクタ /// </summary> /// <param name="threadXML"></param> public ThreadHeader(string threadXML) { System.Diagnostics.Debug.Assert(threadXML != null, "new ThreadHeader threadXML is Null!"); _xnode = new System.Xml.XmlDocument(); ((System.Xml.XmlDocument)_xnode).LoadXml(threadXML); }
public Xml(string rootName) { _xml = new System.Xml.XmlDocument(); System.Xml.XmlDeclaration dec = _xml.CreateXmlDeclaration("1.0", null, null); _xml.AppendChild(dec); _root = _xml.CreateElement(rootName); _xml.AppendChild(_root); }
public Template(System.IO.Stream stream, string pName) { m_Document.Load(stream); m_editortemplate_Node = m_Document.SelectSingleNode("//editortemplate"); if (m_editortemplate_Node == null) { throw new Exception("Invalid template file"); } m_Name = pName; }
/// <remarks/> public void nfeRecepcaoEventoAsync(System.Xml.XmlNode nfeDadosMsg) { this.nfeRecepcaoEventoAsync(nfeDadosMsg, null); }
/// <remarks/> public void nfeConsultaNF2Async(System.Xml.XmlNode nfeDadosMsg) { this.nfeConsultaNF2Async(nfeDadosMsg, null); }
public void LoadFromXML(System.Xml.XmlNode node) { System.Diagnostics.Debug.Assert(node.Name.Equals(this.Typename)); XMLResourceTypeFactory.LoadFromXML(node, this); }
public Node(System.Xml.XmlNode xmlNode) { this.xmlNode = xmlNode; this.ResetChildern(); this.Reset(); }
internal VerificationFile(IEnumerable<ManifestEntry> parentChain, FilenameStrategy str) { m_doc = new System.Xml.XmlDocument(); System.Xml.XmlNode root = m_doc.AppendChild(m_doc.CreateElement("Verify")); root.Attributes.Append(m_doc.CreateAttribute("hash-algorithm")).Value = Utility.Utility.HashAlgorithm; root.Attributes.Append(m_doc.CreateAttribute("version")).Value = "1"; m_node = root.AppendChild(m_doc.CreateElement("Files")); foreach (ManifestEntry mfe in parentChain) { System.Xml.XmlNode f = m_node.AppendChild(m_doc.CreateElement("File")); f.Attributes.Append(m_doc.CreateAttribute("type")).Value = "manifest"; f.Attributes.Append(m_doc.CreateAttribute("name")).Value = mfe.Filename; f.Attributes.Append(m_doc.CreateAttribute("size")).Value = mfe.Filesize.ToString(); f.InnerText = Utility.Utility.ByteArrayAsHexString(Convert.FromBase64String(mfe.RemoteHash)); for (int i = 0; i < mfe.ParsedManifest.SignatureHashes.Count; i++) { string sigfilename = mfe.ParsedManifest.SignatureHashes[i].Name; string contentfilename = mfe.ParsedManifest.ContentHashes[i].Name; bool missing = i >= mfe.Volumes.Count; if (string.IsNullOrEmpty(sigfilename) || string.IsNullOrEmpty(contentfilename)) { if (missing) { sigfilename = str.GenerateFilename(new SignatureEntry(mfe.Time, mfe.IsFull, i + 1)); contentfilename = str.GenerateFilename(new ContentEntry(mfe.Time, mfe.IsFull, i + 1)); //Since these files are missing, we have to guess what their real names were string compressionGuess; if (mfe.Volumes.Count <= 0) compressionGuess = ".zip"; //Default if we have no knowledge else compressionGuess = "." + mfe.Volumes[0].Key.Compression; //Most likely the same as all the others //Encryption will likely be the same as the one the manifest uses string encryptionGuess = string.IsNullOrEmpty(mfe.EncryptionMode) ? "" : "." + mfe.EncryptionMode; sigfilename += compressionGuess + encryptionGuess; contentfilename += compressionGuess + encryptionGuess; } else { sigfilename = mfe.Volumes[i].Key.Filename; contentfilename = mfe.Volumes[i].Value.Filename; } } f = m_node.AppendChild(m_doc.CreateElement("File")); f.Attributes.Append(m_doc.CreateAttribute("type")).Value = "signature"; f.Attributes.Append(m_doc.CreateAttribute("name")).Value = sigfilename; f.Attributes.Append(m_doc.CreateAttribute("size")).Value = mfe.ParsedManifest.SignatureHashes[i].Size.ToString(); if (missing) f.Attributes.Append(m_doc.CreateAttribute("missing")).Value = "true"; f.InnerText = Utility.Utility.ByteArrayAsHexString(Convert.FromBase64String(mfe.ParsedManifest.SignatureHashes[i].Hash)); f = m_node.AppendChild(m_doc.CreateElement("File")); f.Attributes.Append(m_doc.CreateAttribute("type")).Value = "content"; f.Attributes.Append(m_doc.CreateAttribute("name")).Value = contentfilename; f.Attributes.Append(m_doc.CreateAttribute("size")).Value = mfe.ParsedManifest.ContentHashes[i].Size.ToString(); if (missing) f.Attributes.Append(m_doc.CreateAttribute("missing")).Value = "true"; f.InnerText = Utility.Utility.ByteArrayAsHexString(Convert.FromBase64String(mfe.ParsedManifest.ContentHashes[i].Hash)); } } }
public XmlNode(System.Xml.XmlNode node) { _node = node; }
public static XElement GetDocString(XElement docMembers, MemberInfo info) { if (docMembers == null) return null; string memberId = GetMemberId(info).ToLower(); foreach (XElement e in docMembers.ChildNodes) { var anme = e.Attributes["name"]; if (anme != null) { string matchWith = anme.Value.ToLower(); if (matchWith.StartsWith(memberId)) { return e; } } } return null; }
/// <summary> /// 获取当前任务周期的配置信息,将序列化的内容填充至 XmlNode 的 InnerText 属性或者 ChildNodes 子节点中。 /// </summary> /// <param name="xmlDoc">创建 XmlNode 时所需使用到的 System.Xml.XmlDocument。</param> /// <returns></returns> public override System.Xml.XmlNode GetTaskPeriodConfig(System.Xml.XmlDocument xmlDoc) { System.Xml.XmlNode xnConfig = xmlDoc.CreateElement(this.GetType().Name); xnConfig.InnerText = this.TimeNum.ToString(); return(xnConfig); }
/// <summary> /// 从保存此任务周期数据的 XML 文档节点初始化当前任务。 /// </summary> /// <param name="taskConfig">该对象节点的数据</param> public override void SetTaskPeriodConfig(System.Xml.XmlNode taskConfig) { this.TimeNum = Function.ToInt(taskConfig.InnerText); }
/// <remarks/> public System.IAsyncResult BeginnfeRetAutorizacaoLote(System.Xml.XmlNode nfeDadosMsg, System.AsyncCallback callback, object asyncState) { return(this.BeginInvoke("nfeRetAutorizacaoLote", new object[] { nfeDadosMsg }, callback, asyncState)); }
/// <remarks/> public void nfeStatusServicoNF2Async(System.Xml.XmlNode nfeDadosMsg) { this.nfeStatusServicoNF2Async(nfeDadosMsg, null); }
/// <remarks/> public void cteInutilizacaoCTAsync(System.Xml.XmlNode cteDadosMsg) { this.cteInutilizacaoCTAsync(cteDadosMsg, null); }
private IEnumerable <IFileEntry> ListWithouExceptionCatch() { var req = CreateRequest(""); req.Method = "PROPFIND"; req.Headers.Add("Depth", "1"); req.ContentType = "text/xml"; req.ContentLength = PROPFIND_BODY.Length; var areq = new Utility.AsyncHttpRequest(req); using (System.IO.Stream s = areq.GetRequestStream()) s.Write(PROPFIND_BODY, 0, PROPFIND_BODY.Length); var doc = new System.Xml.XmlDocument(); using (var resp = (System.Net.HttpWebResponse)areq.GetResponse()) { int code = (int)resp.StatusCode; if (code < 200 || code >= 300) //For some reason Mono does not throw this automatically { throw new System.Net.WebException(resp.StatusDescription, null, System.Net.WebExceptionStatus.ProtocolError, resp); } if (!string.IsNullOrEmpty(m_debugPropfindFile)) { using (var rs = areq.GetResponseStream()) using (var fs = new System.IO.FileStream(m_debugPropfindFile, System.IO.FileMode.Create, System.IO.FileAccess.Write, System.IO.FileShare.None)) Utility.Utility.CopyStream(rs, fs, false, m_copybuffer); doc.Load(m_debugPropfindFile); } else { using (var rs = areq.GetResponseStream()) doc.Load(rs); } } System.Xml.XmlNamespaceManager nm = new System.Xml.XmlNamespaceManager(doc.NameTable); nm.AddNamespace("D", "DAV:"); List <IFileEntry> files = new List <IFileEntry>(); m_filenamelist = new List <string>(); foreach (System.Xml.XmlNode n in doc.SelectNodes("D:multistatus/D:response/D:href", nm)) { //IIS uses %20 for spaces and %2B for + //Apache uses %20 for spaces and + for + string name = Library.Utility.Uri.UrlDecode(n.InnerText.Replace("+", "%2B")); string cmp_path; //TODO: This list is getting ridiculous, should change to regexps if (name.StartsWith(m_url, StringComparison.Ordinal)) { cmp_path = m_url; } else if (name.StartsWith(m_rawurl, StringComparison.Ordinal)) { cmp_path = m_rawurl; } else if (name.StartsWith(m_rawurlPort, StringComparison.Ordinal)) { cmp_path = m_rawurlPort; } else if (name.StartsWith(m_path, StringComparison.Ordinal)) { cmp_path = m_path; } else if (name.StartsWith("/" + m_path, StringComparison.Ordinal)) { cmp_path = "/" + m_path; } else if (name.StartsWith(m_sanitizedUrl, StringComparison.Ordinal)) { cmp_path = m_sanitizedUrl; } else if (name.StartsWith(m_reverseProtocolUrl, StringComparison.Ordinal)) { cmp_path = m_reverseProtocolUrl; } else { continue; } if (name.Length <= cmp_path.Length) { continue; } name = name.Substring(cmp_path.Length); long size = -1; DateTime lastAccess = new DateTime(); DateTime lastModified = new DateTime(); bool isCollection = false; System.Xml.XmlNode stat = n.ParentNode.SelectSingleNode("D:propstat/D:prop", nm); if (stat != null) { System.Xml.XmlNode s = stat.SelectSingleNode("D:getcontentlength", nm); if (s != null) { size = long.Parse(s.InnerText); } s = stat.SelectSingleNode("D:getlastmodified", nm); if (s != null) { try { //Not important if this succeeds lastAccess = lastModified = DateTime.Parse(s.InnerText, System.Globalization.CultureInfo.InvariantCulture); } catch { } } s = stat.SelectSingleNode("D:iscollection", nm); if (s != null) { isCollection = s.InnerText.Trim() == "1"; } else { isCollection = (stat.SelectSingleNode("D:resourcetype/D:collection", nm) != null); } } FileEntry fe = new FileEntry(name, size, lastAccess, lastModified); fe.IsFolder = isCollection; files.Add(fe); m_filenamelist.Add(name); } return(files); }
/// <summary> /// Initializes a new instance of the <see cref="BaseConfig"/> class. /// </summary> /// <param name="node">The node.</param> public BaseConfig(System.Xml.XmlNode node) { this.m_section = node; }
/// <summary> /// コンストラクタ /// </summary> /// <param name="node"></param> public ThreadHeader(System.Xml.XmlNode node) { _xnode = node; }
public void Parse(ICompilateur comp, System.Xml.XmlNode node) { }
public XmlAttribute(System.Xml.XmlNode node, string name) { _node = node; _name = name; }
public void Inject(ICompiler obj, ICompilateur comp, System.Xml.XmlNode node, string modifier) { }
public MyXmlEncoder() { m_doc = new System.Xml.XmlDocument(); m_node = m_doc.CreateElement("root"); }
/// <remarks/> public void cteCancelamentoCTAsync(System.Xml.XmlNode cteDadosMsg) { this.cteCancelamentoCTAsync(cteDadosMsg, null); }
public void Load(ICompilateur comp, System.Xml.XmlNode node) { }
/// <remarks/> public void nfeRetAutorizacaoLoteAsync(System.Xml.XmlNode nfeDadosMsg) { this.nfeRetAutorizacaoLoteAsync(nfeDadosMsg, null); }
/// <remarks/> public void cteConsultaCTAsync(System.Xml.XmlNode cteDadosMsg) { this.cteConsultaCTAsync(cteDadosMsg, null); }
private void guardarXML(Stream myStream) { System.Xml.XmlDocument doc = new System.Xml.XmlDocument(); //System.Xml.XmlAttribute atributo; System.Xml.XmlDeclaration declaration = doc.CreateXmlDeclaration("1.0", "UTF-8", ""); doc.AppendChild(declaration); System.Xml.XmlNode pmml = doc.CreateElement("PMML"); /* * atributo = doc.CreateAttribute("version"); * atributo.InnerText = "3.0"; * pmml.Attributes.Append(atributo); * atributo = doc.CreateAttribute("xmlns"); * atributo.InnerText = "http://www.dmg.org/PMML-3-0"; * pmml.Attributes.Append(atributo); * atributo = doc.CreateAttribute("xmlns:xsi"); * atributo.InnerText = "http://www.w3.org/2001/XMLSchema_instance"; * pmml.Attributes.Append(atributo); */ pmml.Attributes.Append(setAtributo(doc, "version", "3.0")); pmml.Attributes.Append(setAtributo(doc, "xmlns", "http://www.dmg.org/PMML-3-0")); pmml.Attributes.Append(setAtributo(doc, "xmlns:xsi", "http://www.w3.org/2001/XMLSchema_instance")); doc.AppendChild(pmml); System.Xml.XmlNode sprite = doc.CreateElement("TEXTURA"); if (textureName.Text.Equals("")) { sprite.Attributes.Append(setAtributo(doc, "Name", "none")); } else { sprite.Attributes.Append(setAtributo(doc, "Name", textureName.Text)); } if (useRelativePath.Checked && !relativeFileLoc.Equals("")) { sprite.Attributes.Append(setAtributo(doc, "TextureFile", relativeFileLoc.Insert(0, "..\\").Replace('\\', '/'))); } else { sprite.Attributes.Append(setAtributo(doc, "TextureFile", fileLoc)); } int colorR = color_click.BackColor.R; int colorG = color_click.BackColor.G; int colorB = color_click.BackColor.B; //sprite.Attributes.Append(setAtributo(doc, "ColorKey", "FF"+R+G+B)); System.Xml.XmlNode colorKey = doc.CreateElement("ColorKey"); colorKey.Attributes.Append(setAtributo(doc, "R", colorR.ToString())); colorKey.Attributes.Append(setAtributo(doc, "G", colorG.ToString())); colorKey.Attributes.Append(setAtributo(doc, "B", colorB.ToString())); sprite.AppendChild(colorKey); pmml.AppendChild(sprite); /* * doc.AppendChild(XClub); * System.Xml.XmlNode Pelicula = doc.CreateElement("Pelicula"); * XClub.AppendChild(Pelicula); * System.Xml.XmlNode Data = doc.CreateElement("Data"); * System.Xml.XmlAttribute atributo = doc.CreateAttribute("Titulo"); * atributo.InnerText = "Garganta Profunda(Deep Throat)"; * Data.Attributes.Append(atributo); * System.Xml.XmlAttribute atributo2 = doc.CreateAttribute("Director"); * atributo2.InnerText = ""; * Data.Attributes.Append(atributo2); * Pelicula.AppendChild(Data);*/ doc.Save(myStream); }
protected override void ProcessNode(ref List <Dictionary <string, string> > dic, System.Xml.XmlNode node) { string subject = GetNodeAttribute(node, "subject"); if (subject == null || subject.Trim().Length <= 0) { throw new ConfigurationErrorsException("Not config 'subject' for queue mail sender."); } MappingEvent(subject); }
public System.Threading.Tasks.Task <FogGerenciadorDeVendas.Dominio.AutorizacaoHomolog.nfeAutorizacaoLoteResponse> nfeAutorizacaoLoteAsync(System.Xml.XmlNode nfeDadosMsg) { FogGerenciadorDeVendas.Dominio.AutorizacaoHomolog.nfeAutorizacaoLoteRequest inValue = new FogGerenciadorDeVendas.Dominio.AutorizacaoHomolog.nfeAutorizacaoLoteRequest(); inValue.nfeDadosMsg = nfeDadosMsg; return(((FogGerenciadorDeVendas.Dominio.AutorizacaoHomolog.NFeAutorizacao4Soap12)(this)).nfeAutorizacaoLoteAsync(inValue)); }
public void LoadFromXML(System.Xml.XmlNode node) { this.Text = node.Attributes["value"].Value; }
public nfeAutorizacaoLoteRequest(System.Xml.XmlNode nfeDadosMsg) { this.nfeDadosMsg = nfeDadosMsg; }
/// <remarks/> public System.IAsyncResult BeginnfeRecepcaoEvento(System.Xml.XmlNode nfeDadosMsg, System.AsyncCallback callback, object asyncState) { return(this.BeginInvoke("nfeRecepcaoEvento", new object[] { nfeDadosMsg }, callback, asyncState)); }
public nfeAutorizacaoLoteResponse(System.Xml.XmlNode nfeResultMsg) { this.nfeResultMsg = nfeResultMsg; }
private static TestFilter FromXml(XmlNode xmlNode) { switch (xmlNode.Name) { case "filter": case "and": var andFilter = new AndFilter(); foreach (XmlNode childNode in xmlNode.ChildNodes) andFilter.Add(FromXml(childNode)); return andFilter; case "or": var orFilter = new OrFilter(); foreach (System.Xml.XmlNode childNode in xmlNode.ChildNodes) orFilter.Add(FromXml(childNode)); return orFilter; case "not": return new NotFilter(FromXml(xmlNode.FirstChild)); case "id": var idFilter = new IdFilter(); foreach (string id in xmlNode.InnerText.Split(COMMA)) idFilter.Add(int.Parse(id)); return idFilter; case "tests": var testFilter = new SimpleNameFilter(); foreach (XmlNode childNode in xmlNode.SelectNodes("test")) testFilter.Add(childNode.InnerText); return testFilter; case "cat": var catFilter = new CategoryFilter(); foreach (string cat in xmlNode.InnerText.Split(COMMA)) catFilter.AddCategory(cat); return catFilter; default: throw new ArgumentException("Invalid filter element: " + xmlNode.Name, "xmlNode"); } }
/// <remarks/> public System.IAsyncResult BeginProcessXmlDocument(System.Xml.XmlNode xmlRequest, System.AsyncCallback callback, object asyncState) { return(this.BeginInvoke("ProcessXmlDocument", new object[] { xmlRequest }, callback, asyncState)); }
public Config(System.Xml.XmlNode node) { m_section = node; }
public void AddData(UploadID _Uploader, System.Xml.XmlNode _PlayerNode, VF.SQLPlayerID?_PlayerID = null, Func <int, VF.SQLUploadID> _GetSQLUploadIDFunc = null) { AddData(_Uploader, XMLUtility.GetChildValue(_PlayerNode, "ExtraData", ""), _PlayerID, _GetSQLUploadIDFunc); }
public void setFromXml(System.Xml.XmlNode InstNode) { this.node_ = InstNode; //InstNode["book"]["bookInfo"]; System.Xml.XmlNode bookInfoNode = InstNode["favoriteInfo"]; this.favoriteName_ = bookInfoNode["favoriteName"].InnerText; this.favoriteCode_ = bookInfoNode["favoriteCode"].InnerText; System.Xml.XmlNodeList instrumentListNodeList = InstNode["instrumentList"].SelectNodes("instrument"); foreach (System.Xml.XmlNode item in instrumentListNodeList) { string instCode = item.InnerText; Excel_instrumentViewModel instrument = new Excel_instrumentViewModel(); instrument.Item_code_ = instCode; this.instrumentList_.Add(instrument); } }
/// <remarks/> public void cteStatusServicoCTAsync(System.Xml.XmlNode cteDadosMsg) { this.cteStatusServicoCTAsync(cteDadosMsg, null); }
private Xml(System.Xml.XmlDocument xml) { _xml = xml; _root = _xml.LastChild; }
public void SetSettings(System.Xml.XmlNode settings) { }
[Ignore] // Remove Atom // [TestMethod] public void SecurityCallbacksFilterEdmTest() { ServiceModelData.Northwind.EnsureDependenciesAvailable(); CombinatorialEngine engine = CombinatorialEngine.FromDimensions( new Dimension("option", "$filter,$orderby".Split(','))); TestUtil.RunCombinatorialEngineFail(engine, delegate(Hashtable values) { string option = (string)values["option"]; int callCount = 0; using (AstoriaUnitTests.Tests.UnitTestModule.AuthorizationTest.InitializationCallbackManager.RegisterStatic((s, e) => { e.Configuration.SetEntitySetAccessRule("*", EntitySetRights.All); })) using (StaticCallbackManager <AstoriaUnitTests.Tests.UnitTestModule.AuthorizationTest.ComposeQueryEventArgs> .RegisterStatic((s, e) => { System.Linq.Expressions.Expression <Func <NorthwindModel.Customers, bool> > notAnatr = c => c.CustomerID != "ANATR"; e.Filter = notAnatr; callCount++; })) using (TestWebRequest request = TestWebRequest.CreateForInProcess()) { // In Northwind, the two first customers are 'ALFKI' and 'ANATR'. // 'ALFKI' has these orders: 10643, 10692, 10702, 10835, 10952, 11011. // 'ANATR' has these orders: 10308, 10625, 10759, 10926. request.ServiceType = typeof(AstoriaUnitTests.Tests.UnitTestModule.AuthorizationTest.WebDataServiceEdmCustomerCallback); request.RequestUriString = "/Orders?" + ((option == "$filter") ? "$filter=startswith(Customers/CustomerID, 'A')" : "$filter=startswith(Customers/CustomerID,%20'A')%20or%20Customers%20eq%20null&$orderby=Customers/CustomerID"); request.Accept = "application/atom+xml,application/xml"; request.SendRequest(); var document = request.GetResponseStreamAsXmlDocument(); if (option == "$filter") { Assert.AreEqual(1, callCount, "Callback is called a single time (for the navigation property."); // The orders for 'ANATR' should not be returned TestUtil.AssertSelectSingleElement(document, "/atom:feed[0 = count(atom:entry/atom:id[text()='http://host/Orders(10308)'])]"); TestUtil.AssertSelectSingleElement(document, "/atom:feed[0 = count(atom:entry/atom:id[text()='http://host/Orders(10625)'])]"); // ALFKI is OK. TestUtil.AssertSelectSingleElement(document, "/atom:feed[1 = count(atom:entry/atom:id[text()='http://host/Orders(10643)'])]"); } else { Assert.AreEqual(3, callCount, "Callback is called a three tims (for the navigation property)"); // ANATR will come before ALFKI System.Xml.XmlElement alfkiOrder = TestUtil.AssertSelectSingleElement(document, "/atom:feed/atom:entry[atom:id/text()='http://host/Orders(10643)']"); System.Xml.XmlElement anatrOrder = TestUtil.AssertSelectSingleElement(document, "/atom:feed/atom:entry[atom:id/text()='http://host/Orders(10308)']"); bool found = false; System.Xml.XmlNode node = alfkiOrder; while (node != null) { if (node == anatrOrder) { found = true; break; } else { node = node.PreviousSibling; } } Assert.IsTrue(found, "ANATR orders sort after ALFKI"); } } }); }
/// <remarks/> public void nfeInutilizacaoNFAsync(System.Xml.XmlNode nfeDadosMsg) { this.nfeInutilizacaoNFAsync(nfeDadosMsg, null); }
public XmlNode(string name, XmlNode parent) { _node = parent._node.OwnerDocument.CreateElement(name); parent._node.AppendChild(_node); }
public abstract System.Xml.XmlNode XmlLoad(System.Xml.XmlNode node);
public void UpdateManifest(ManifestEntry manifest) { if (m_manifestEntry == null) { m_manifestEntry = m_node.AppendChild(m_doc.CreateElement("File")); m_manifestEntry.Attributes.Append(m_doc.CreateAttribute("type")).Value = "manifest"; m_manifestEntry.Attributes.Append(m_doc.CreateAttribute("name")).Value = manifest.Filename; m_manifestEntry.Attributes.Append(m_doc.CreateAttribute("size")).Value = manifest.Filesize.ToString(); } else { m_manifestEntry.Attributes["type"].Value = "manifest"; m_manifestEntry.Attributes["name"].Value = manifest.Filename; m_manifestEntry.Attributes["size"].Value = manifest.Filesize.ToString(); } m_manifestEntry.InnerText = Utility.Utility.ByteArrayAsHexString(Convert.FromBase64String(manifest.RemoteHash)); }
public abstract System.Xml.XmlNode XmlAppend(System.Xml.XmlNode node);
public static System.Xml.XmlNode xslave; // XML config for slave; null if no config file. // Assumes xd has been loaded! public static void InitXmlConfig(System.Xml.XmlDocument xd) { try { xslave = xd["slave"]; if (null != xslave) // ! { System.Xml.XmlNode xlog = xslave["log"]; if (null != xlog) { System.Xml.XmlAttribute xaenabled = xlog.Attributes["enabled"]; if (null != xaenabled) { XLog.logging = 0 == string.Compare(xaenabled.Value, "true", true); } } } } catch (System.Xml.XmlException e) { //XLog.errorlog("slave config xml error: " + e.ToString()); throw new Exception("Sub process config xml error", e); } }
//bookViewModel 및 childBook , instrument 를 초기화 하는 부분 from xmlfile public void setFromXml(System.Xml.XmlNode InstNode) { this.Node_ = InstNode; //InstNode["book"]["bookInfo"]; System.Xml.XmlNode bookInfoNode = InstNode["bookInfo"]; this.abstractFlag_ = bookInfoNode["abstract"].InnerText; string isExpandStr = bookInfoNode["isTreeExpand"].InnerText; if (isExpandStr.ToUpper() == "TRUE" || isExpandStr.ToUpper() == "T") { this.isTreeExpand_ = true; } else { this.isTreeExpand_ = false; } this.bookName_ = bookInfoNode["bookName"].InnerText; this.bookCode_ = bookInfoNode["bookCode"].InnerText; if (this.abstractFlag_.ToUpper() != "TRUE" && this.abstractFlag_.ToUpper() != "T") { System.Xml.XmlNodeList instrumentListNodeList = InstNode["instrumentList"].SelectNodes("instrument"); foreach (System.Xml.XmlNode item in instrumentListNodeList) { string instCode = item.InnerText; //Excel_instrumentViewModel instrument = new Excel_instrumentViewModel(); //instrument.Item_code_ = instCode; //this.instrumentList_.Add(instrument); if (MasterInformationViewModel.masterPositionMap_.ContainsKey(instCode)) { this.instrumentList_.Add(MasterInformationViewModel.masterPositionMap_[instCode]); } else { this.instrumentList_.Add(new Excel_instrumentViewModel()); } } } foreach (System.Xml.XmlNode item in InstNode.SelectNodes("book")) { BookViewModel childBook = new BookViewModel(this); childBook.setFromXml(item); this.childBookList_.Add(childBook); } }