} // proc WriteType public void WriteItem(DEListItemWriter xml, object item) { var caItem = (KeyValuePair <string, DEConfigAction>)item; var ca = caItem.Value; xml.WriteStartProperty("action"); xml.WriteAttributeProperty("id", caItem.Key); xml.WriteAttributeProperty("description", ca.Description); xml.WriteAttributeProperty("safecall", ca.IsSafeCall.ToString()); xml.WriteAttributeProperty("security", ca.SecurityToken); xml.WriteAttributeProperty("return", ca.MethodDescription.ReturnType.ToString()); xml.WriteStartProperty("arguments"); foreach (var p in ca.MethodDescription.GetParameters()) { xml.WriteStartProperty("argument"); xml.WriteAttributeProperty("name", p.Name); xml.WriteAttributeProperty("type", LuaType.GetType(p.ParameterType).AliasOrFullName); if (p.DefaultValue != null) { xml.WriteValue(p.DefaultValue); } xml.WriteEndProperty(); } xml.WriteEndProperty(); xml.WriteEndProperty(); } // proc WriteItem
} // proc WriteType public void WriteItem(DEListItemWriter xml, object item) { xml.WriteStartProperty(typeName); for (var i = 0; i < properties.Length; i++) { properties[i].WriteProperty(xml, item); } xml.WriteEndProperty(); } // proc WriteItem
} // func GetLogLineType public void WriteItem(DEListItemWriter xml, object item) { var logLine = (DELogLine)item; xml.WriteStartProperty("line"); xml.WriteAttributeProperty("stamp", logLine.Stamp.ToString("O")); xml.WriteAttributeProperty("typ", GetLogLineType(logLine.Typ)); xml.WriteValue(logLine.Text); xml.WriteEndProperty(); } // proc WriteItem
} // proc WriteType public void WriteItem(DEListItemWriter xml, object item) { xml.WriteStartProperty(typeName); xml.WriteProperty("@key", keyProperty.GetValue(item)); var itemValue = itemProperty.GetValue(item); for (var i = 0; i < properties.Length; i++) { properties[i].WriteProperty(xml, itemValue); } xml.WriteEndProperty(); } // proc WriteItem
} // proc WriteType public void WriteItem(DEListItemWriter xml, object item) { xml.WriteStartProperty(sTypeName); for (int i = 0; i < properties.Count; i++) { string sName = properties[i].Key.Name; object value = properties[i].Value.GetValue(item); if (sName == ".") { xml.WriteValue(value); } else if (sName.StartsWith("@")) { xml.WriteAttributeProperty(sName.Substring(1), value); } else { xml.WriteElementProperty(sName, value); } } xml.WriteEndProperty(); } // proc WriteItem
} // proc WriteType public void WriteItem(DEListItemWriter xml, object item) { var c = (CronCacheItem)item; xml.WriteStartProperty("item"); xml.WriteAttributeProperty("id", c.Job.UniqueName); xml.WriteAttributeProperty("displayname", c.Job.DisplayName); xml.WriteAttributeProperty("bound", c.Job.Bound.ToString()); if (c.Job is ICronJobCancellation jobCancel) { xml.WriteAttributeProperty("supportsCancellation", jobCancel.IsSupportCancelation); if (jobCancel.RunTimeSlice.HasValue) { xml.WriteAttributeProperty("runTimeSlice", jobCancel.RunTimeSlice.Value); } } if (c.NextRun.HasValue) { xml.WriteAttributeProperty("nextrun", c.NextRun.Value); } xml.WriteEndProperty(); } // proc WriteItem