当前位置: 首页>>代码示例>>C#>>正文


C# XmlNode.GetIntSafe方法代码示例

本文整理汇总了C#中System.Xml.XmlNode.GetIntSafe方法的典型用法代码示例。如果您正苦于以下问题:C# XmlNode.GetIntSafe方法的具体用法?C# XmlNode.GetIntSafe怎么用?C# XmlNode.GetIntSafe使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Xml.XmlNode的用法示例。


在下文中一共展示了XmlNode.GetIntSafe方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Contact

 /// <summary>
 /// Initializes a new instance of the <see cref="Contact" /> class.
 /// </summary>
 /// <param name="node">The XML node to initialize from</param>
 /// <param name="namespaceManager">The namespace manager</param>
 public Contact(XmlNode node, XmlNamespaceManager namespaceManager)
 {
     this.AccountManagerFullName = node.GetStringSafe("tlp:AccountManagerFullName", namespaceManager);
     this.AccountManagerID = node.GetIntSafe("tlp:AccountManagerID", namespaceManager);
     this.Address1 = node.GetStringSafe("tlp:Address1", namespaceManager);
     this.Address2 = node.GetStringSafe("tlp:Address2", namespaceManager);
     this.Birthday = node.GetStringSafe("tlp:Birthday", namespaceManager);
     this.City = node.GetStringSafe("tlp:City", namespaceManager);
     this.Comment = node.GetStringSafe("tlp:Comment", namespaceManager);
     this.Country = node.GetStringSafe("tlp:Country", namespaceManager);
     this.CustomerID = node.GetIntSafe("tlp:CustomerID", namespaceManager);
     this.CustomerName = node.GetStringSafe("tlp:CustomerName", namespaceManager);
     this.CustomerNo = node.GetStringSafe("tlp:CustomerNo", namespaceManager);
     this.Email = node.GetStringSafe("tlp:Email", namespaceManager);
     this.FirstName = node.GetStringSafe("tlp:FirstName", namespaceManager);
     this.FullName = node.GetStringSafe("tlp:FullName", namespaceManager);
     this.Id = int.Parse(node.Attributes["ID"].InnerText);
     this.LastName = node.GetStringSafe("tlp:LastName", namespaceManager);
     this.Mobile = node.GetStringSafe("tlp:Mobile", namespaceManager);
     this.Phone = node.GetStringSafe("tlp:Phone", namespaceManager);
     this.PrivatePhone = node.GetStringSafe("tlp:PrivatePhone", namespaceManager);
     this.State = node.GetStringSafe("tlp:State", namespaceManager);
     this.Title = node.GetStringSafe("tlp:Title", namespaceManager);
     this.ZipCode = node.GetStringSafe("tlp:ZipCode", namespaceManager);
 }
开发者ID:maxwalter,项目名称:TimeLogApiSdk,代码行数:30,代码来源:Contact.cs

示例2: WorkUnit

 /// <summary>
 ///     Initializes a new instance of the <see cref="WorkUnit" /> class.
 /// </summary>
 /// <param name="node">The XML node to initialize from</param>
 /// <param name="namespaceManager">The namespace manager</param>
 public WorkUnit(XmlNode node, XmlNamespaceManager namespaceManager)
 {
     this.AdditionalTextField = node.GetStringSafe("tlp:AdditionalTextField", namespaceManager);
     this.AllocationID = node.GetIntSafe("tlp:AllocationID", namespaceManager);
     this.ApprovedStatus = node.GetIntSafe("tlp:ApprovedStatus", namespaceManager);
     this.Created = node.GetDateTimeSafe("tlp:Created", namespaceManager);
     this.CreatedBy = node.GetStringSafe("tlp:CreatedBy", namespaceManager);
     this.CreatedByEmployeeID = node.GetIntSafe("tlp:CreatedByEmployeeID", namespaceManager);
     this.CustomerID = node.GetIntSafe("tlp:CustomerID", namespaceManager);
     this.CustomerName = node.GetStringSafe("tlp:CustomerName", namespaceManager);
     this.Date = node.GetDateTimeSafe("tlp:Date", namespaceManager);
     this.DepartmentID = node.GetIntSafe("tlp:DepartmentID", namespaceManager);
     this.DepartmentName = node.GetStringSafe("tlp:DepartmentName", namespaceManager);
     this.EmployeeFirstName = node.GetStringSafe("tlp:EmployeeFirstName", namespaceManager);
     this.EmployeeID = node.GetIntSafe("tlp:EmployeeID", namespaceManager);
     this.EmployeeInitials = node.GetStringSafe("tlp:EmployeeInitials", namespaceManager);
     this.EmployeeLastName = node.GetStringSafe("tlp:EmployeeLastName", namespaceManager);
     this.EstimatedAmount = node.GetDoubleSafe("tlp:EstimatedAmount", namespaceManager);
     this.EstimatedHours = node.GetDoubleSafe("tlp:EstimatedHours", namespaceManager);
     this.Id = int.Parse(node.Attributes["ID"].InnerText);
     this.InvAmount = node.GetDoubleSafe("tlp:InvAmount", namespaceManager);
     this.InvHours = node.GetDoubleSafe("tlp:InvHours", namespaceManager);
     this.IsBillable = node.GetBoolTimeSafe("tlp:IsBillable", namespaceManager);
     this.LastModifiedAt = node.GetDateTimeSafe("tlp:LastModifiedAt", namespaceManager);
     this.LastModifiedBy = node.GetStringSafe("tlp:LastModifiedBy", namespaceManager);
     this.LastModifiedByEmployeeID = node.GetIntSafe("tlp:LastModifiedByEmployeeID", namespaceManager);
     this.Note = node.GetStringSafe("tlp:Note", namespaceManager).Trim('\r', '\n');
     this.ProjectID = node.GetIntSafe("tlp:ProjectID", namespaceManager);
     this.ProjectName = node.GetStringSafe("tlp:ProjectName", namespaceManager);
     this.RegAmount = node.GetDoubleSafe("tlp:RegAmount", namespaceManager);
     this.RegHours = node.GetDoubleSafe("tlp:RegHours", namespaceManager);
     this.TaskID = node.GetIntSafe("tlp:TaskID", namespaceManager);
     this.TaskName = node.GetStringSafe("tlp:TaskName", namespaceManager);
 }
开发者ID:maxwalter,项目名称:TimeLogApiSdk,代码行数:39,代码来源:WorkUnit.cs

示例3: Customer

 /// <summary>
 /// Initializes a new instance of the <see cref="Customer"/> class.
 /// </summary>
 /// <param name="node">The XML node to initialize from</param>
 /// <param name="namespaceManager">The namespace manager</param>
 public Customer(XmlNode node, XmlNamespaceManager namespaceManager)
 {
     this.AccountManagerFullName = node.GetStringSafe("tlp:AccountManagerFullName", namespaceManager);
     this.AccountManagerID = node.GetIntSafe("tlp:AccountManagerID", namespaceManager);
     this.Address1 = node.GetStringSafe("tlp:Address1", namespaceManager);
     this.Address2 = node.GetStringSafe("tlp:Address2", namespaceManager);
     this.Address3 = node.GetStringSafe("tlp:Address3", namespaceManager);
     this.City = node.GetStringSafe("tlp:City", namespaceManager);
     this.Country = node.GetStringSafe("tlp:Country", namespaceManager);
     this.CustomerStatus = node.GetStringSafe("tlp:CustomerStatus", namespaceManager);
     this.CustomerStatusID = node.GetIntSafe("tlp:CustomerStatusID", namespaceManager);
     this.Email = node.GetStringSafe("tlp:Email", namespaceManager);
     this.Fax = node.GetStringSafe("tlp:Fax", namespaceManager);
     this.Id = int.Parse(node.Attributes["ID"].InnerText);
     this.Name = node.GetStringSafe("tlp:Name", namespaceManager);
     this.NickName = node.GetStringSafe("tlp:NickName", namespaceManager);
     this.No = node.GetStringSafe("tlp:No", namespaceManager);
     this.Phone = node.GetStringSafe("tlp:Phone", namespaceManager);
     this.State = node.GetStringSafe("tlp:State", namespaceManager);
     this.VATNo = node.GetStringSafe("tlp:VATNo", namespaceManager);
     this.WebPage = node.GetStringSafe("tlp:WebPage", namespaceManager);
     this.ZipCode = node.GetStringSafe("tlp:ZipCode", namespaceManager);
 }
开发者ID:maxwalter,项目名称:TimeLogApiSdk,代码行数:28,代码来源:Customer.cs


注:本文中的System.Xml.XmlNode.GetIntSafe方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。