///<summary>This method shows how to connect to zones and hook up a basic message handler</summary>
        ///<param name="args"></param>
        private void startAgent(String[] args)

        {
            this.Initialize();
            NameValueCollection parameters = AdkExamples.parseCL(this, args);

            String zoneId = parameters["zone"];
            String url    = parameters["url"];

            if (zoneId == null || url == null)
            {
                Console.WriteLine("The /zone and /url parameters are required");
                Environment.Exit(0);
            }


            // 1) Get an instance of the zone to connect to
            IZone zone = ZoneFactory.GetInstance(zoneId, url);

            // 2) Create an instance of the the StudentPersonalHandler class
            // This class is responsible for dealing with events and responses
            // received that contain LearnerPersonal data objects
            StudentPersonalHandler sdh = new StudentPersonalHandler();

            // The StudentPersonalHandler is allowed to provision itself with the zone
            sdh.provision(zone);

            // Connect
            zone.Connect(AdkExamples.Reg ? ProvisioningFlags.Register : ProvisioningFlags.None);

            // The StudentPersonalHandler class has a sync() method, which it uses to
            // request data from the SIF zone
            sdh.sync(zone);
        }
        ///<summary>This method shows how to connect to zones and hook up a basic message handler</summary>
        ///<param name="args"></param>
        private void startAgent( String[] args )
        {
            this.Initialize();
            NameValueCollection parameters = AdkExamples.parseCL( this, args );

            String zoneId = parameters["zone"];
            String url = parameters["url"];

            if ( zoneId == null || url == null ) {
                Console.WriteLine( "The /zone and /url parameters are required" );
                Environment.Exit( 0 );
            }

            // 1) Get an instance of the zone to connect to
            IZone zone = ZoneFactory.GetInstance( zoneId, url );

            // 2) Create an instance of the the StudentPersonalHandler class
            // This class is responsible for dealing with events and responses
            // received that contain LearnerPersonal data objects
            StudentPersonalHandler sdh = new StudentPersonalHandler();
            // The StudentPersonalHandler is allowed to provision itself with the zone
            sdh.provision( zone );

            // Connect
            zone.Connect( AdkExamples.Reg ? ProvisioningFlags.Register : ProvisioningFlags.None );

            // The StudentPersonalHandler class has a sync() method, which it uses to
            // request data from the SIF zone
            sdh.sync( zone );
        }