本文整理汇总了C#中System.Xml.XmlWriter.WriteAttr方法的典型用法代码示例。如果您正苦于以下问题:C# XmlWriter.WriteAttr方法的具体用法?C# XmlWriter.WriteAttr怎么用?C# XmlWriter.WriteAttr使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Xml.XmlWriter
的用法示例。
在下文中一共展示了XmlWriter.WriteAttr方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UpdateAttributes
private void UpdateAttributes(XmlWriter w)
{
UpdateIdValues();
w.WriteAttr("Id", m.Selected.Id.ToString());
w.WriteAttr("Order", m.Selected.Order.ToString());
w.WriteAttr("Field", m.ConditionName);
w.WriteAttr("Comparison", m.Comparison, "AllTrue");
w.WriteAttr("Description", m.Description, "scratchpad");
w.WriteAttr("PreviousName", m.Description, "scratchpad");
w.WriteAttr("TextValue", m.TextValue);
w.WriteAttr("DateValue", m.DateValue);
w.WriteAttr("CodeIdValue", m.CodeIdValue);
w.WriteAttr("StartDate", m.StartDate);
w.WriteAttr("EndDate", m.EndDate);
w.WriteAttr("Program", m.Program);
w.WriteAttr("Division", m.Division);
w.WriteAttr("Organization", m.Organization);
w.WriteAttr("OrgType", m.OrgType);
w.WriteAttr("Days", m.Days);
w.WriteAttr("Quarters", m.Quarters);
w.WriteAttr("Tags", m.Tags);
w.WriteAttr("Schedule", m.Schedule);
w.WriteAttr("Campus", m.Campus);
if (m.ConditionName == "FamilyHasChildrenAged")
w.WriteAttr("Age", m.Age ?? 0, 12);
w.WriteAttr("SavedQueryIdDesc", m.SavedQuery, "scratchpad");
w.WriteAttr("OnlineReg", m.OnlineReg);
w.WriteAttr("OrgStatus", m.OrgStatus);
w.WriteAttr("OrgType2", m.OrgType2);
w.WriteAttr("OrgName", m.OrgName);
}
示例2: WriteAttributes
private void WriteAttributes(XmlWriter w, bool newGuids = false, bool noGuids = false)
{
w.WriteAttr("Id", newGuids
? Guid.NewGuid().ToString() : Id.ToString());
w.WriteAttr("Order", Order.ToString());
w.WriteAttr("Field", ConditionName);
w.WriteAttr("Comparison", Comparison, "AllTrue");
w.WriteAttr("Description", Description, "scratchpad");
w.WriteAttr("PreviousName", Description, "scratchpad");
w.WriteAttr("TextValue", TextValue);
w.WriteAttr("DateValue", DateValue);
w.WriteAttr("CodeIdValue", CodeIdValue);
w.WriteAttr("StartDate", StartDate);
w.WriteAttr("EndDate", EndDate);
w.WriteAttr("Program", Program);
w.WriteAttr("Ministry", Ministry);
w.WriteAttr("Division", Division);
w.WriteAttr("Organization", Organization);
w.WriteAttr("OrgType", OrgType);
w.WriteAttr("Days", Days);
w.WriteAttr("Quarters", Quarters);
w.WriteAttr("Tags", Tags);
w.WriteAttr("Schedule", Schedule);
w.WriteAttr("Campus", Campus);
if (ConditionName == "FamilyHasChildrenAged")
w.WriteAttr("Age", Age ?? 0, 12);
w.WriteAttr("SavedQueryIdDesc", SavedQuery, "scratchpad");
w.WriteAttr("OnlineReg", OnlineReg);
w.WriteAttr("OrgStatus", OrgStatus);
w.WriteAttr("OrgType2", OrgType2);
w.WriteAttr("OrgName", OrgName);
}