static NvdlValidate CreateBuiltInValidate(NvdlAction a) { bool allow = a is NvdlAllow; NvdlValidate v = new NvdlValidate(); v.SourceUri = a.SourceUri; v.LineNumber = a.LineNumber; v.LinePosition = a.LinePosition; v.ModeUsage = new NvdlModeUsage(); var doc = new XDocument(); var el = new XElement(XNamespace.Get(Nvdl.BuiltInValidationNamespace).GetName(allow ? "allow" : "reject")); doc.Add(new XElement(XNamespace.Get(Nvdl.Namespace).GetName("schema"))); doc.Root.Add(el); v.SchemaBody = doc.Root; return(v); }
static NvdlValidate CreateBuiltInValidate(NvdlAction a) { bool allow = a is NvdlAllow; NvdlValidate v = new NvdlValidate(); v.SourceUri = a.SourceUri; v.LineNumber = a.LineNumber; v.LinePosition = a.LinePosition; v.ModeUsage = new NvdlModeUsage(); XmlDocument doc = new XmlDocument(); XmlElement el = doc.CreateElement( allow ? "allow" : "reject", Nvdl.BuiltInValidationNamespace); doc.AppendChild(doc.CreateElement("schema", Nvdl.Namespace)); doc.DocumentElement.AppendChild(el); v.SchemaBody = doc.DocumentElement; return(v); }
public void Remove(NvdlAction item) { List.Add(item); }
public void Add(NvdlAction item) { List.Add(item); }
public void Remove (NvdlAction item) { List.Add (item); }
public void Add (NvdlAction item) { List.Add (item); }
static NvdlValidate CreateBuiltInValidate (NvdlAction a) { bool allow = a is NvdlAllow; NvdlValidate v = new NvdlValidate (); v.SourceUri = a.SourceUri; v.LineNumber = a.LineNumber; v.LinePosition = a.LinePosition; v.ModeUsage = new NvdlModeUsage (); XmlDocument doc = new XmlDocument (); XmlElement el = doc.CreateElement ( allow ? "allow" : "reject", Nvdl.BuiltInValidationNamespace); doc.AppendChild (doc.CreateElement ("schema", Nvdl.Namespace)); doc.DocumentElement.AppendChild (el); v.SchemaBody = doc.DocumentElement; return v; }