static void Main(string[] args)
        {
            //structure
            Structure ssb = new Structure();

            ssb.Method1();
            //calling class by using abstract class
            abstractclass ab = new abstractclass();

            ab.Demo();
            ab.show();

            //Include namespace ,Method1 is in Simplelibray namespace

            Class1 cs1 = new Class1();

            cs1.Method1(new int[] { 1, 2, 3, 4 });



            //Multiple Inheritance using Interface
            MultipleInheritance mi = new MultipleInheritance();

            mi.Demo();
            mi.detail();

            Interfacepurpose ip = new Interfacepurpose();

            ip.Method1();

            //constructor examples
            Constructor cs = new Constructor();

            cs.Method1();
            cs.Method2();
            cs.Method3();
            cs.Method4();
            cs.Method5();
            cs.Method6();
            cs.Method7();
            cs.Method8();


            //partial
            partialclass pt = new partialclass();

            pt.Method1();



            //Methodoverload and Methodoverrirding
            Methodoverloading mm = new Methodoverloading();

            mm.Method1();
            mm.Method2();



            //Encapsulation
            Oops oo = new Oops();

            oo.Name = "veerababu";
            oo.Age  = 23;

            //abstraction
            oo.hell();

            Console.WriteLine(oo.Name);
            Console.WriteLine(oo.Age);

            //using properties
            Properity ppp = new Properity();

            ppp.Method1();


            //enum
            Enumexample e = new Enumexample();

            e.Method1();



            home.a = 10;
            Console.WriteLine($"value is {home.a}");
            var n = @"""I don't know do "" he said";

            Console.WriteLine(n);

            Dictionary dt = new Dictionary();

            dt.Method1();

            Console.WriteLine();



            person2 pp = new person2();

            Console.WriteLine(pp.a);
            person2 pp1 = new person2(10);

            Console.WriteLine(pp1.a);


            //structure examples
            user ss;
            user sss = new user();

            ss.name = "veeru";
            ss.age  = 22;
            Console.WriteLine($"Name is {ss.name} \nage is {ss.age}");

            user s2;

            s2.name = "veera";
            s2.age  = 25;
            Console.WriteLine(ss.GetHashCode());
            Console.WriteLine(s2.GetHashCode());

            //struct way 2


            person p = new person();

            p.name = "veerababu";
            p.age  = 25;


            Console.WriteLine($"way2: Name is {p.name}\nage is {p.age}");

            person1 p1 = new person1("rallabandi", 23);

            Console.WriteLine($"way3: Name is {p1.name}\nage is {p1.age}");



            //ListMethods
            ListMethods l = new ListMethods();

            l.Methods();


            //Array
            Arrays arr = new Arrays();

            //sigledimensional
            arr.single();

            //multidimensional
            arr.multi();

            //Jagged array
            arr.Jagged();

            //Array Methods
            arr.methods();

            //Methods
            Methods m = new Methods();

            m.Method1();
            m.Method2(10, 20);
            Console.WriteLine(m.Method3());
            Console.WriteLine(m.Method4("veeru"));


            //by using ref keyword
            int a = 10;

            Console.WriteLine("befor calling a:" + a);
            m.Method5(ref a);
            Console.WriteLine("after calling a:" + a);


            //By using out keyword
            int b = 10;

            Console.WriteLine("before calling b:" + b);
            m.Method6(out b);
            Console.WriteLine("after calling b:" + b);


            //By using params keyword
            m.Method7(1, 2, 3, 4);
            m.Method7(1, "veeru", 1.3f, true);



            //By using in keyword-->read-only
            int c = 12;
            int d = 15;

            Console.WriteLine("before calling c is " + d);
            Console.WriteLine("before calling d is " + c);
            m.Method8(c, ref d);
            Console.WriteLine("after calling d is " + d);
            Console.WriteLine("after calling c is " + c);


            StringFormat s = new StringFormat();

            //  s.Method1();
            // s.Method2();
            s.DateFormat();
            s.NumberFormat();
            s.customFormat();


            //Operators Examples
            Operators o = new Operators();

            o.Arithemetic(10, 20);
            o.Relational(10, 20);
            o.Logical(false, true);
            o.Bitwise(2, 3);
            o.Assignment(10, 20);
            o.Miscellaneous(10, 20);

            //Iteration
            Iteration i = new Iteration();

            i.iter1(3);
            i.iter2(3);
            i.iter3(3);
            i.iter4();


            //Jumping statement examples
            Jumping j = new Jumping();

            j.jum1();
            j.jum2();
            j.jum3();
        }
Exemple #2
0
        // Token: 0x0600008F RID: 143 RVA: 0x00005AE0 File Offset: 0x00004AE0
        private string processNode(XmlNode node, SubQuery query, Request request, Result result, User user)
        {
            if (request.StartedOn.AddMilliseconds(request.bot.TimeOut) < DateTime.Now)
            {
                request.bot.writeToLog(string.Concat(new string[]
                {
                    "WARNING! Request timeout. User: "******" raw input: \"",
                    request.rawInput,
                    "\" processing template: \"",
                    query.Template,
                    "\""
                }));
                request.hasTimedOut = true;
                return(string.Empty);
            }
            string text = node.Name.ToLower();

            if (text == "template")
            {
                StringBuilder stringBuilder = new StringBuilder();
                if (node.HasChildNodes)
                {
                    foreach (object obj in node.ChildNodes)
                    {
                        XmlNode node2 = (XmlNode)obj;
                        stringBuilder.Append(this.processNode(node2, query, request, result, user));
                    }
                }
                return(stringBuilder.ToString());
            }
            AIMLTagHandler aimltagHandler = null;

            aimltagHandler = this.getBespokeTags(user, query, request, result, node);
            if (object.Equals(null, aimltagHandler))
            {
                string key;
                switch (key = text)
                {
                case "bot":
                    aimltagHandler = new bot(this, user, query, request, result, node);
                    goto IL_53F;

                case "condition":
                    aimltagHandler = new condition(this, user, query, request, result, node);
                    goto IL_53F;

                case "date":
                    aimltagHandler = new date(this, user, query, request, result, node);
                    goto IL_53F;

                case "formal":
                    aimltagHandler = new formal(this, user, query, request, result, node);
                    goto IL_53F;

                case "gender":
                    aimltagHandler = new gender(this, user, query, request, result, node);
                    goto IL_53F;

                case "get":
                    aimltagHandler = new get(this, user, query, request, result, node);
                    goto IL_53F;

                case "gossip":
                    aimltagHandler = new gossip(this, user, query, request, result, node);
                    goto IL_53F;

                case "id":
                    aimltagHandler = new id(this, user, query, request, result, node);
                    goto IL_53F;

                case "input":
                    aimltagHandler = new input(this, user, query, request, result, node);
                    goto IL_53F;

                case "javascript":
                    aimltagHandler = new javascript(this, user, query, request, result, node);
                    goto IL_53F;

                case "learn":
                    aimltagHandler = new learn(this, user, query, request, result, node);
                    goto IL_53F;

                case "lowercase":
                    aimltagHandler = new lowercase(this, user, query, request, result, node);
                    goto IL_53F;

                case "person":
                    aimltagHandler = new person(this, user, query, request, result, node);
                    goto IL_53F;

                case "person2":
                    aimltagHandler = new person2(this, user, query, request, result, node);
                    goto IL_53F;

                case "random":
                    aimltagHandler = new random(this, user, query, request, result, node);
                    goto IL_53F;

                case "sentence":
                    aimltagHandler = new sentence(this, user, query, request, result, node);
                    goto IL_53F;

                case "set":
                    aimltagHandler = new set(this, user, query, request, result, node);
                    goto IL_53F;

                case "size":
                    aimltagHandler = new size(this, user, query, request, result, node);
                    goto IL_53F;

                case "sr":
                    aimltagHandler = new sr(this, user, query, request, result, node);
                    goto IL_53F;

                case "srai":
                    aimltagHandler = new srai(this, user, query, request, result, node);
                    goto IL_53F;

                case "star":
                    aimltagHandler = new star(this, user, query, request, result, node);
                    goto IL_53F;

                case "system":
                    aimltagHandler = new system(this, user, query, request, result, node);
                    goto IL_53F;

                case "that":
                    aimltagHandler = new that(this, user, query, request, result, node);
                    goto IL_53F;

                case "thatstar":
                    aimltagHandler = new thatstar(this, user, query, request, result, node);
                    goto IL_53F;

                case "think":
                    aimltagHandler = new think(this, user, query, request, result, node);
                    goto IL_53F;

                case "topicstar":
                    aimltagHandler = new topicstar(this, user, query, request, result, node);
                    goto IL_53F;

                case "uppercase":
                    aimltagHandler = new uppercase(this, user, query, request, result, node);
                    goto IL_53F;

                case "version":
                    aimltagHandler = new version(this, user, query, request, result, node);
                    goto IL_53F;
                }
                aimltagHandler = null;
            }
IL_53F:
            if (object.Equals(null, aimltagHandler))
            {
                return(node.InnerText);
            }
            if (aimltagHandler.isRecursive)
            {
                if (node.HasChildNodes)
                {
                    foreach (object obj2 in node.ChildNodes)
                    {
                        XmlNode xmlNode = (XmlNode)obj2;
                        if (xmlNode.NodeType != XmlNodeType.Text)
                        {
                            xmlNode.InnerXml = this.processNode(xmlNode, query, request, result, user);
                        }
                    }
                }
                return(aimltagHandler.Transform());
            }
            string  str   = aimltagHandler.Transform();
            XmlNode node3 = AIMLTagHandler.getNode("<node>" + str + "</node>");

            if (node3.HasChildNodes)
            {
                StringBuilder stringBuilder2 = new StringBuilder();
                foreach (object obj3 in node3.ChildNodes)
                {
                    XmlNode node4 = (XmlNode)obj3;
                    stringBuilder2.Append(this.processNode(node4, query, request, result, user));
                }
                return(stringBuilder2.ToString());
            }
            return(node3.InnerXml);
        }