Example #1
0
            static private void HandleRemove(XmlNode child, DataTable config)
            {
                HandlerBase.CheckForChildNodes(child);
                String invr = HandlerBase.RemoveAttribute(child, "invariant", true, false);

                HandlerBase.CheckForUnrecognizedAttributes(child);
                DataRow row = config.Rows.Find(invr);

                if (null != row)   // ignore invariants that don't exist
                {
                    row.Delete();
                }
            }
Example #2
0
            static private void HandleAdd(XmlNode child, DataTable config)
            {
                HandlerBase.CheckForChildNodes(child);
                DataRow values = config.NewRow();

                values[0] = HandlerBase.RemoveAttribute(child, "name", true, false);
                values[1] = HandlerBase.RemoveAttribute(child, "description", true, false);
                values[2] = HandlerBase.RemoveAttribute(child, "invariant", true, false);
                values[3] = HandlerBase.RemoveAttribute(child, "type", true, false);

                // because beta shipped recognizing "support=hex#", need to give
                // more time for other providers to remove it from the .config files
                HandlerBase.RemoveAttribute(child, "support", false, false);

                HandlerBase.CheckForUnrecognizedAttributes(child);
                config.Rows.Add(values);
            }