Example #1
0
        public static void AddDataToXMLComparer(XMLCmdletBase cmdlet, IXMLComparer comparer, string xpath, string value)
        {
            cmdlet.WriteVerbose(cmdlet, "creating a List object");

            List <Autofac.Core.Parameter> listOfParameters =
                new List <Autofac.Core.Parameter>();

            listOfParameters.Add(new NamedParameter("xpath", xpath));
            listOfParameters.Add(new NamedParameter("value", value));

            cmdlet.WriteVerbose(cmdlet, "creating an XMLDataEntry object");

            IXMLDataEntry dataEntry =
                DataFactory.Container.ResolveNamed <IXMLDataEntry>(
                    "full",
                    listOfParameters);

            cmdlet.WriteVerbose(cmdlet, "adding an XMLDataEntry object to the comparer");

            comparer.DataEntryCollection.Add(dataEntry);

            cmdlet.WriteVerbose(cmdlet, "an XMLDataEntry object has been added to the comparer");

            cmdlet.WriteObject(cmdlet, comparer);
        }
Example #2
0
        public static void CreateXMLComparer(XMLCmdletBase cmdlet)
        {
            cmdlet.WriteVerbose(cmdlet, "creating an XMLComparer object");

            List<Autofac.Core.Parameter> listOfParameters =
                new List<Autofac.Core.Parameter>();
            listOfParameters.Add(new NamedParameter("dataEntryCollection", (new List<IXMLDataEntry>())));

            IXMLComparer comparer =
                DataFactory.Container.ResolveNamed<IXMLComparer>(
                    "simple",
                    listOfParameters);

            cmdlet.WriteVerbose(cmdlet, "An XMLComparer object has been created");

            cmdlet.WriteObject(cmdlet, comparer);
        }
Example #3
0
        public static void CreateXMLComparer(XMLCmdletBase cmdlet)
        {
            cmdlet.WriteVerbose(cmdlet, "creating an XMLComparer object");

            List <Autofac.Core.Parameter> listOfParameters =
                new List <Autofac.Core.Parameter>();

            listOfParameters.Add(new NamedParameter("dataEntryCollection", (new List <IXMLDataEntry>())));

            IXMLComparer comparer =
                DataFactory.Container.ResolveNamed <IXMLComparer>(
                    "simple",
                    listOfParameters);

            cmdlet.WriteVerbose(cmdlet, "An XMLComparer object has been created");

            cmdlet.WriteObject(cmdlet, comparer);
        }
Example #4
0
        public static void AddDataToXMLComparer(XMLCmdletBase cmdlet, IXMLComparer comparer, string xpath, string value)
        {
            cmdlet.WriteVerbose(cmdlet, "creating a List object");

            List<Autofac.Core.Parameter> listOfParameters =
                new List<Autofac.Core.Parameter>();
            listOfParameters.Add(new NamedParameter("xpath", xpath));
            listOfParameters.Add(new NamedParameter("value", value));

            cmdlet.WriteVerbose(cmdlet, "creating an XMLDataEntry object");

            IXMLDataEntry dataEntry =
                DataFactory.Container.ResolveNamed<IXMLDataEntry>(
                    "full",
                    listOfParameters);

            cmdlet.WriteVerbose(cmdlet, "adding an XMLDataEntry object to the comparer");

            comparer.DataEntryCollection.Add(dataEntry);

            cmdlet.WriteVerbose(cmdlet, "an XMLDataEntry object has been added to the comparer");

            cmdlet.WriteObject(cmdlet, comparer);
        }