Exemple #1
0
        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);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
 public void Remove(NvdlAction item)
 {
     List.Add(item);
 }
Exemple #4
0
 public void Add(NvdlAction item)
 {
     List.Add(item);
 }
Exemple #5
0
		public void Remove (NvdlAction item)
		{
			List.Add (item);
		}
Exemple #6
0
		public void Add (NvdlAction item)
		{
			List.Add (item);
		}
Exemple #7
0
		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;
		}