DotNetXri.Client.Resolve.CacheTest.StuffPruneThread.run C# (CSharp) Méthode

run() public méthode

public run ( ) : void
Résultat void
            public void run()
            {
                XRD oDummy = new XRD();
                Service dummyService = new Service();
                dummyService.addMediaType(Tags.CONTENT_TYPE_XRDS + ";trust=none");
                dummyService.addType(Tags.SERVICE_AUTH_RES);
                dummyService.addURI("http://www.example.com/xri/resolve?id=1");
                oDummy.addService(dummyService);

                String[] oCases =
                { "@!a1!b2!c3!d4", "@!x1!y2!z3", "@!a1!b2!c3", "@!a1!b2", "@!a1!b2!m3", "@!a1!o2!p3", "@!a1!o2!q3", "@!a1!b2!c3!d4!e5", "@!x1!y2" };

                Cache oCache = new Cache(1000);

                for (int i = 0; i < 1000; i++)
                {
                int x = moRand.nextInt(oCases.length);
                bool bStuff = moRand.nextBoolean();
                XRIAuthority oAuth =
                    (XRIAuthority) AuthorityPath.buildAuthorityPath(oCases[x]);

                if (bStuff)
                {
                    oCache.stuff(oAuth, oDummy);
                }
                else
                {
                    oCache.prune(oAuth);
                }

                oCache.find(oAuth, true);
                }
            }
CacheTest.StuffPruneThread