text:
package org.kaaproject.kaa.client.configuration.manager;

import org.kaaproject.kaa.client.common.CommonRecord;

/**
 * Interface for subscriber to receive full configuration

 *

 * Instance of this interface implementation can be subscribed for updates in
 * {@link ConfigurationManager}
 *
 * @author Yaroslav Zeygerman
 * @see ConfigurationManager
 */
public interface ConfigurationReceiver {

    /**
     * This callback will be called on any configuration update
     *
     * @param configuration full configuration in common objects
     * @see CommonRecord
     */
    void onConfigurationUpdated(CommonRecord configuration);

}

redpajama_set_name: RedPajamaGithub


text:
<?php include('datastore.php');

class DatastoreTest extends PHPUnit_Framework_TestCase
{
	protected static $ds;
	protected static $email='test@testemail.com';
	protected static $authtoken;
	protected static $workout_id;
	protected static $userfood_id;

	public static function dataProvider(){
		return [[[
			'email'=>self::$email,
			'password'=>'123456'
		]]];
	}

	public static function setUpBeforeClass(){
		self::$ds=new datastore();
	}

	public static function tearDownAfterClass(){
		self::$ds->db->query('DELETE FROM workout WHERE workout_id="'.self::$workout_id.'"');
		self::$ds->db->query('DELETE FROM food WHERE userfood_id="'.self::$userfood_id.'"');
		self::$ds->db->query('DELETE FROM people WHERE email="'.self::$email.'"');
		self::$ds=NULL;
	}

    /**
     * @param array $testData
	 * @dataProvider dataProvider
     */
	public function test_addUser(array $testData){
		$x=self::$ds->addUser('Bob','Smith',$testData['email'],$testData['password'],'E',220,72,'1987-09-16T00:00:00Z','M',34,'123 Easy Street','A2','Edison','NJ','08854','Hisp');
		$this->assertEquals('{"results":"User successfully created"}',$x);
	}

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the First Name
     */
    public function test_addUserMissingFnameException(){
    	self::$ds->addUser('','Smith','email@us.com','password','E',220,72,'1987-09-16T00:00:00Z','M',34,'123 Easy Street','A2','Edison','NJ','08854','Hisp');
    }

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the Last Name
     */
    public function test_addUserMissingLnameException(){
    	self::$ds->addUser('Bob','','email@us.com','password','E',220,72,'1987-09-16T00:00:00Z','M',34,'123 Easy Street','A2','Edison','NJ','08854','Hisp');
    }

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the E-Mail Address
     */
    public function test_addUserMissingEmailException(){
    	self::$ds->addUser('Bob','Smith','','password','E',220,72,'1987-09-16T00:00:00Z','M',34,'123 Easy Street','A2','Edison','NJ','08854','Hisp');
    }

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the Password
     */
    public function test_addUserMissingPasswordException(){
    	self::$ds->addUser('Bob','Smith','email@us.com','','E',220,72,'1987-09-16T00:00:00Z','M',34,'123 Easy Street','A2','Edison','NJ','08854','Hisp');
    }

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the Middle Name Initial
     */
    public function test_addUserMissingMiddleNameInitialException(){
    	self::$ds->addUser('Bob','Smith','email@us.com','password','',220,72,'1987-09-16T00:00:00Z','M',34,'123 Easy Street','A2','Edison','NJ','08854','Hisp');
    }

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the Weight
     */
    public function test_addUserMissingWeightException(){
    	self::$ds->addUser('Bob','Smith','email@us.com','password','E','',72,'1987-09-16T00:00:00Z','M',34,'123 Easy Street','A2','Edison','NJ','08854','Hisp');
    }

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the Height
     */
    public function test_addUserMissingHeightException(){
    	self::$ds->addUser('Bob','Smith','email@us.com','password','E',220,'','1987-09-16T00:00:00Z','M',34,'123 Easy Street','A2','Edison','NJ','08854','Hisp');
    }

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the Birth Date
     */
    public function test_addUserMissingBirthDateException(){
    	self::$ds->addUser('Bob','Smith','email@us.com','password','E',220,72,'','M',34,'123 Easy Street','A2','Edison','NJ','08854','Hisp');
    }

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the Gender
     */
    public function test_addUserMissingGenderException(){
    	self::$ds->addUser('Bob','Smith','email@us.com','password','E',220,72,'1987-09-16T00:00:00Z','',34,'123 Easy Street','A2','Edison','NJ','08854','Hisp');
    }

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the Waist Size
     */
    public function test_addUserMissingWaistSizeException(){
    	self::$ds->addUser('Bob','Smith','email@us.com','password','E',220,72,'1987-09-16T00:00:00Z','M','','123 Easy Street','A2','Edison','NJ','08854','Hisp');
    }

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide Address Line #1
     */
    public function test_addUserMissingAddressLine1Exception(){
    	self::$ds->addUser('Bob','Smith','email@us.com','password','E',220,72,'1987-09-16T00:00:00Z','M',34,'','A2','Edison','NJ','08854','Hisp');
    }

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the City
     */
    public function test_addUserMissingCityException(){
    	self::$ds->addUser('Bob','Smith','email@us.com','password','E',220,72,'1987-09-16T00:00:00Z','M',34,'123 Easy Street','A2','','NJ','08854','Hisp');
    }

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the State
     */
    public function test_addUserMissingStateException(){
    	self::$ds->addUser('Bob','Smith','email@us.com','password','E',220,72,'1987-09-16T00:00:00Z','M',34,'123 Easy Street','A2','Edison','','08854','Hisp');
    }

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the Zip Code
     */
    public function test_addUserMissingZipCodeException(){
   	 	self::$ds->addUser('Bob','Smith','email@us.com','password','E',220,72,'1987-09-16T00:00:00Z','M',34,'123 Easy Street','A2','Edison','NJ','','Hisp');
   	}

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the Ethnicity
     */
    public function test_addUserMissingEthnicityException(){
   	 	self::$ds->addUser('Bob','Smith','email@us.com','password','E',220,72,'1987-09-16T00:00:00Z','M',34,'123 Easy Street','A2','Edison','NJ','08854','');
   	}

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage Invalid Height
     */
    public function test_addUserInvalidHeightException(){
   	 	self::$ds->addUser('Bob','Smith','email@us.com','password','E',220,'72x','1987-09-16T00:00:00Z','M',34,'123 Easy Street','A2','Edison','NJ','08854','Hisp');
   	}
    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage Invalid Weight
     */
    public function test_addUserInvalidWeightException(){
   	 	self::$ds->addUser('Bob','Smith','email@us.com','password','E','2sd',72,'1987-09-16T00:00:00Z','M',34,'123 Easy Street','A2','Edison','NJ','08854','Hisp');
   	}
    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage Invalid Waist Size
     */
    public function test_addUserInvalidWaistSizeException(){
   	 	self::$ds->addUser('Bob','Smith','email@us.com','password','E',220,72,'1987-09-16T00:00:00Z','M','sd34f-','123 Easy Street','A2','Edison','NJ','08854','Hisp');
   	}

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage This ethnicity does not exist
     */
    public function test_addUserInvalidEthnicityException(){
   	 	self::$ds->addUser('Bob','Smith','email@us.com','password','E',220,72,'1987-09-16T00:00:00Z','M',34,'123 Easy Street','A2','Edison','NJ','08854','HispXX');
   	}

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage ERROR, Invalid password
     * @param array $testData
	 * @dataProvider dataProvider
     */
    public function test_loginUserIncorrectPasswordException(array $testData){
    	self::$ds->loginUser($testData['email'],'65984');
	}

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage E-Mail Address not found
     * @param array $testData
	 * @dataProvider dataProvider
     */
    public function test_loginUserEmailAddressNotFoundException(array $testData){
    	self::$ds->loginUser('nobody@thisaddress.com',$testData['password']);
	}

    /**
     * @param array $testData
	 * @dataProvider dataProvider
     */
    public function test_loginUserCorrectPassword(array $testData){
    	$x=self::$ds->loginUser($testData['email'],$testData['password']);
    	$token=json_decode($x,TRUE);
    	self::$authtoken=$token['authtoken'];
    	$this->assertRegExp('/{"authtoken":"/', $x);
	}

    /**
     * @param array $testData
	 * @dataProvider dataProvider
     */
	public function test_successfulGetUser(array $testData){
		$x=self::$ds->getUser($testData['email'],self::$authtoken);
		$this->assertRegExp('/{"fname":"/', $x);
	}

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You cannot retrieve this user
     */
    public function test_getUserCannotRetreiveUserException(){
    	self::$ds->getUser('nobody@thisaddress.com',self::$authtoken);
	}

	public function test_addWorkout(){
		$x=self::$ds->addWorkout(self::$authtoken,'run',1.00,120.0,'2015-11-05T13:12:43.511Z',200.00,'My Comments');
		$newWorkout=json_decode($x,TRUE);
		self::$workout_id=$newWorkout['workout_id'];
		$this->assertRegExp('/{"workout_id":"/', $x);
	}

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the Workout Type
     */

    public function test_addWorkoutMissingWorkoutTypeException(){
    	$x=self::$ds->addWorkout(self::$authtoken,'',1.00,120.0,'2015-11-05T13:12:43.511Z',200.00,'My Comments');
    }

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the Workout Distance
     */

    public function test_addWorkoutMissingWorkoutDistanceException(){
    	$x=self::$ds->addWorkout(self::$authtoken,'run','',120.0,'2015-11-05T13:12:43.511Z',200.00,'My Comments');
    }

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the Workout Duration
     */
    public function test_addWorkoutMissingWorkoutDurationException(){
    	$x=self::$ds->addWorkout(self::$authtoken,'run',1.00,'','2015-11-05T13:12:43.511Z',200.00,'My Comments');
    }

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the Workout Timestamp
     */
    public function test_addWorkoutMissingWorkoutTimestampException(){
    	$x=self::$ds->addWorkout(self::$authtoken,'run',1.00,120.0,'',200.00,'My Comments');
    }

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the Workout Calories
     */
    public function test_addWorkoutMissingWorkoutCaloriesException(){
    	$x=self::$ds->addWorkout(self::$authtoken,'run',1.00,120.0,'2015-11-05T13:12:43.511Z','','My Comments');
    }

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage Invalid Workout Distance
     */
    public function test_addWorkoutInvalidWorkoutDistanceException(){
    	$x=self::$ds->addWorkout(self::$authtoken,'run','1.00x',120.0,'2015-11-05T13:12:43.511Z',200.00,'My Comments');
    }

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage Invalid Workout Duration
     */
    public function test_addWorkoutInvalidWorkoutDurationException(){
    	$x=self::$ds->addWorkout(self::$authtoken,'run',1.00,'120.0ddd','2015-11-05T13:12:43.511Z',200.00,'My Comments');
    }

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage Invalid Workout Calories
     */
    public function test_addWorkoutInvalidWorkoutCaloriesException(){
		$x=self::$ds->addWorkout(self::$authtoken,'run',1.00,120.0,'2015-11-05T13:12:43.511Z','20.dfer','My Comments');
    }

	public function test_getWorkout(){
		$x=self::$ds->getWorkout(self::$authtoken,self::$workout_id);
		$this->assertRegExp('/{"workout_id":/', $x);
	}

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage Workout_id not found
     */
    public function test_getWorkoutIdNotFoundException(){
		$x=self::$ds->getWorkout(self::$authtoken,0);
    }

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You do not have the rights to perform this action
     */
	public function test_getWorkoutAllNonAdmin(){
		$x=self::$ds->getWorkoutAll(self::$authtoken);
	}

	public function test_getWorkoutUser(){
		$x=self::$ds->getWorkoutUser(self::$authtoken,self::$email);
		$this->assertRegExp('/\\[{"workout_id":/', $x);
	}

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage User workouts not found
     */
    public function test_getWorkoutUserNotFoundException(){
		$x=self::$ds->getWorkoutUser(self::$authtoken,'');
    }

	public function test_getFoodList(){
		$x=self::$ds->getFoodList(self::$authtoken,self::$email);
		$this->assertRegExp('/\\[{"food_id":/', $x);
	}

	public function test_addFood(){
		$x=self::$ds->addFood(self::$authtoken,2,2.5,'breakfast','2015-11-23T14:34:43.954Z','Here are my comments');
		$newFood=json_decode($x,TRUE);
		self::$userfood_id=$newFood['userfood_id'];
		$this->assertRegExp('/{"userfood_id":"/', $x);
	}

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the Food
     */
	public function test_addFoodMissingFood(){
		$x=self::$ds->addFood(self::$authtoken,'',2.5,'breakfast','2015-11-23T14:34:43.954Z','Here are my comments');
	}

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the Serving
     */
	public function test_addFoodMissingServing(){
		$x=self::$ds->addFood(self::$authtoken,2,'','breakfast','2015-11-23T14:34:43.954Z','Here are my comments');
	}

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the Meal
     */
	public function test_addFoodMissingMeal(){
		$x=self::$ds->addFood(self::$authtoken,2,2.5,'','2015-11-23T14:34:43.954Z','Here are my comments');
	}

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the Food Timestamp
     */
	public function test_addFoodMissingFoodTimestamp(){
		$x=self::$ds->addFood(self::$authtoken,2,2.5,'breakfast','','Here are my comments');
	}

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage Invalid Serving
     */
	public function test_addFoodInvalidServing(){
		$x=self::$ds->addFood(self::$authtoken,2,'2.5x','breakfast','2015-11-23T14:34:43.954Z','Here are my comments');
	}

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage This food does not exist
     */
	public function test_addFoodFoodDoesNotExist(){
		$x=self::$ds->addFood(self::$authtoken,9000,2.5,'breakfast','2015-11-23T14:34:43.954Z','Here are my comments');
	}

    /**
     * @param array $testData
	 * @dataProvider dataProvider
     */
	public function test_updateUser(array $testData){
		$x=self::$ds->updateUser('Bob-234','Smith',$testData['email'],'E',220,72,'1987-09-16T00:00:00Z','M',34,'123 Easy Street','A2','Edison','NJ','08854',self::$authtoken,'Hisp');
		$this->assertEquals('{"results":"User successfully updated"}',$x);
	}

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the First Name
     */
    public function test_updateUserMissingFnameException(){
    	self::$ds->updateUser('','Smith',self::$email,'E',220,72,'1987-09-16T00:00:00Z','M',34,'123 Easy Street','A2','Edison','NJ','08854',self::$authtoken,'Hisp');
    }

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the Last Name
     */
    public function test_updateUserMissingLnameException(){
    	self::$ds->updateUser('Bob','',self::$email,'E',220,72,'1987-09-16T00:00:00Z','M',34,'123 Easy Street','A2','Edison','NJ','08854',self::$authtoken,'Hisp');
    }

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the E-Mail Address
     */
    public function test_updateUserMissingEmailException(){
    	self::$ds->updateUser('Bob','Smith','','E',220,72,'1987-09-16T00:00:00Z','M',34,'123 Easy Street','A2','Edison','NJ','08854',self::$authtoken,'Hisp');
    }

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the Middle Name Initial
     */
    public function test_updateUserMissingMiddleNameInitialException(){
    	self::$ds->updateUser('Bob','Smith',self::$email,'',220,72,'1987-09-16T00:00:00Z','M',34,'123 Easy Street','A2','Edison','NJ','08854',self::$authtoken,'Hisp');
    }

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the Weight
     */
    public function test_updateUserMissingWeightException(){
    	self::$ds->updateUser('Bob','Smith',self::$email,'E','',72,'1987-09-16T00:00:00Z','M',34,'123 Easy Street','A2','Edison','NJ','08854',self::$authtoken,'Hisp');
    }

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the Height
     */
    public function test_updateUserMissingHeightException(){
    	self::$ds->updateUser('Bob','Smith',self::$email,'E',220,'','1987-09-16T00:00:00Z','M',34,'123 Easy Street','A2','Edison','NJ','08854',self::$authtoken,'Hisp');
    }

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the Birth Date
     */
    public function test_updateUserMissingBirthDateException(){
    	self::$ds->updateUser('Bob','Smith',self::$email,'E',220,72,'','M',34,'123 Easy Street','A2','Edison','NJ','08854',self::$authtoken,'Hisp');
    }

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the Gender
     */
    public function test_updateUserMissingGenderException(){
    	self::$ds->updateUser('Bob','Smith',self::$email,'E',220,72,'1987-09-16T00:00:00Z','',34,'123 Easy Street','A2','Edison','NJ','08854',self::$authtoken,'Hisp');
    }

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the Waist Size
     */
    public function test_updateUserMissingWaistSizeException(){
    	self::$ds->updateUser('Bob','Smith',self::$email,'E',220,72,'1987-09-16T00:00:00Z','M','','123 Easy Street','A2','Edison','NJ','08854',self::$authtoken,'Hisp');
    }

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide Address Line #1
     */
    public function test_updateUserMissingAddressLine1Exception(){
    	self::$ds->updateUser('Bob','Smith',self::$email,'E',220,72,'1987-09-16T00:00:00Z','M',34,'','A2','Edison','NJ','08854',self::$authtoken,'Hisp');
    }

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the City
     */
    public function test_updateUserMissingCityException(){
    	self::$ds->updateUser('Bob','Smith',self::$email,'E',220,72,'1987-09-16T00:00:00Z','M',34,'123 Easy Street','A2','','NJ','08854',self::$authtoken,'Hisp');
    }

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the State
     */
    public function test_updateUserMissingStateException(){
    	self::$ds->updateUser('Bob','Smith',self::$email,'E',220,72,'1987-09-16T00:00:00Z','M',34,'123 Easy Street','A2','Edison','','08854',self::$authtoken,'Hisp');
    }

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the Zip Code
     */
    public function test_updateUserMissingZipCodeException(){
   	 	self::$ds->updateUser('Bob','Smith',self::$email,'E',220,72,'1987-09-16T00:00:00Z','M',34,'123 Easy Street','A2','Edison','NJ','',self::$authtoken,'Hisp');
   	}

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage Invalid Height
     */
    public function test_updateUserInvalidHeightException(){
   	 	self::$ds->updateUser('Bob','Smith',self::$email,'E',220,'72x','1987-09-16T00:00:00Z','M',34,'123 Easy Street','A2','Edison','NJ','08854',self::$authtoken,'Hisp');
   	}

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage Invalid Weight
     */
       public function test_updateUserInvalidWeightException(){
   	 	self::$ds->updateUser('Bob','Smith',self::$email,'E','2sd',72,'1987-09-16T00:00:00Z','M',34,'123 Easy Street','A2','Edison','NJ','08854',self::$authtoken,'Hisp');
   	}

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage Invalid Waist Size
     */
    public function test_updateUserInvalidWaistSizeException(){
   	 	self::$ds->updateUser('Bob','Smith',self::$email,'E',220,72,'1987-09-16T00:00:00Z','M','34zz-','123 Easy Street','A2','Edison','NJ','08854',self::$authtoken,'Hisp');
   	}

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage This ethnicity does not exist
     */
    public function test_updateUserInvalidEthnicityException(){
   	 	self::$ds->updateUser('Bob','Smith',self::$email,'E',220,72,'1987-09-16T00:00:00Z','M',34,'123 Easy Street','A2','Edison','NJ','08854',self::$authtoken,'Hispz');
   	}

	public function test_getEthnicities(){
		$x=self::$ds->getEthnicities(self::$authtoken);
		$this->assertRegExp('/{"ethnicity_id":/', $x);
	}

	public function test_AggregatedHealthStats(){
		$x=self::$ds->getAggregatedHealthStats('NJ');
		$this->assertRegExp('/{"age_summary":/', $x);
	}

	public function test_getHealthStatsA(){
		$x=self::$ds->getHealthStats(self::$authtoken,44,72,220,36,'M','WhiteNonHisp','NJ','');
		$this->assertRegExp('/{"Dia":/', $x);
	}

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the Weight
     */
    public function test_getHealthStatsAMissingWeightException(){
		self::$ds->getHealthStats(self::$authtoken,44,72,'',36,'M','WhiteNonHisp','NJ','');
   	}

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the Height
     */
    public function test_getHealthStatsAMissingHeightException(){
		self::$ds->getHealthStats(self::$authtoken,44,'',220,36,'M','WhiteNonHisp','NJ','');
   	}

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the Gender
     */
    public function test_getHealthStatsAMissingGenderException(){
		self::$ds->getHealthStats(self::$authtoken,44,72,220,36,'','WhiteNonHisp','NJ','');
   	}

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the Waist Size
     */
    public function test_getHealthStatsAMissingWaistSizeException(){
		self::$ds->getHealthStats(self::$authtoken,44,72,220,'','M','WhiteNonHisp','NJ','');
   	}

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the Age
     */
    public function test_getHealthStatsAAgeException(){
		self::$ds->getHealthStats(self::$authtoken,'',72,220,36,'M','WhiteNonHisp','NJ','');
   	}

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the Ethnicity
     */
    public function test_getHealthStatsAEthnicityException(){
		self::$ds->getHealthStats(self::$authtoken,44,72,220,36,'M','','NJ','');
   	}

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage You must provide the State
     */
    public function test_getHealthStatsAStateException(){
		self::$ds->getHealthStats(self::$authtoken,44,72,220,36,'M','WhiteNonHisp','','');
	}

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage Invalid Weight
     */
    public function test_getHealthStatsAInvalidWeightException(){
		self::$ds->getHealthStats(self::$authtoken,44,72,'.2.20',36,'M','WhiteNonHisp','NJ','');
	}

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage Invalid Height
     */
    public function test_getHealthStatsAInvalidHeightException(){
		self::$ds->getHealthStats(self::$authtoken,44,'e7eew2',220,36,'M','WhiteNonHisp','NJ','');
	}

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage Invalid Waist Size
     */
    public function test_getHealthStatsAInvalidWaistSizeException(){
		self::$ds->getHealthStats(self::$authtoken,44,72,220,'36zx','M','WhiteNonHisp','NJ','');
	}

	public function test_getHealthStatsB(){
		$x=self::$ds->getHealthStats(self::$authtoken,'','','','','','','',self::$email);
		$this->assertRegExp('/{"Dia":/', $x);
	}

    /**
     * @expectedException DatastoreException
	 * @expectedExceptionMessage User stats not found
     */
    public function test_getHealthStatsBNoUsrException(){
		$x=self::$ds->getHealthStats(self::$authtoken,'','','','','','','',self::$email.'ddd');
	}

	public function test_logoutUser(){
		$x=self::$ds->logoutUser(self::$authtoken);
		$this->assertEquals('{"results":"Logout Complete"}',$x);
	}
}


text:
I made this to speed the process of tweaking variables in Unity with the new UI system introduced in Unity 4.6. AutoTweak automates the process of building a UI while prototyping using C#'s attributes.
So far, it only supports floats/sliders, but I'd like to add toggles (for bools) and buttons (for functions) and possibly some kind of UI to deal with Vectors.

Instructions to use:

1. Import the .unitypackage file into your project.
2. Drag the AutoTweak.prefab into your scene from the AutoTweak/Prefabs folder
3. After importing the AutoTweak namespace, decorate any float variable with the SliderAttribute. The two arguments define the slider's range.
4. Add the Tweakable component and drag your component you are tweaking into the target slot in the inspector.
5. That's it! AutoTweak will build a panel with sliders for any decorated variables. It works with multiple targets too!
```
using UnityEngine;
using AutoTweak;

public class MyClass : MonoBehaviour {
  [SliderAttribute(0.0f, 10.0f)]
  float myFloat = 0.0f;
}

```


text:
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.42000
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace MQS.TM
{
    using System.Runtime.Serialization;

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="ResourceInfo", Namespace="http://kilgray.com/memoqservices/2007")]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(MQS.TM.HeavyResourceInfo))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(MQS.TM.TMInfo))]
    public partial class ResourceInfo : object, System.Runtime.Serialization.IExtensibleDataObject
    {

        private System.Runtime.Serialization.ExtensionDataObject extensionDataField;

        private string DescriptionField;

        private System.Guid GuidField;

        private string NameField;

        private bool ReadonlyField;

        public System.Runtime.Serialization.ExtensionDataObject ExtensionData
        {
            get
            {
                return this.extensionDataField;
            }
            set
            {
                this.extensionDataField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public string Description
        {
            get
            {
                return this.DescriptionField;
            }
            set
            {
                this.DescriptionField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public System.Guid Guid
        {
            get
            {
                return this.GuidField;
            }
            set
            {
                this.GuidField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public string Name
        {
            get
            {
                return this.NameField;
            }
            set
            {
                this.NameField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public bool Readonly
        {
            get
            {
                return this.ReadonlyField;
            }
            set
            {
                this.ReadonlyField = value;
            }
        }
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="HeavyResourceInfo", Namespace="http://kilgray.com/memoqservices/2007")]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(MQS.TM.TMInfo))]
    public partial class HeavyResourceInfo : MQS.TM.ResourceInfo
    {

        private string ClientField;

        private string DomainField;

        private string ProjectField;

        private string SubjectField;

        [System.Runtime.Serialization.DataMemberAttribute()]
        public string Client
        {
            get
            {
                return this.ClientField;
            }
            set
            {
                this.ClientField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public string Domain
        {
            get
            {
                return this.DomainField;
            }
            set
            {
                this.DomainField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public string Project
        {
            get
            {
                return this.ProjectField;
            }
            set
            {
                this.ProjectField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public string Subject
        {
            get
            {
                return this.SubjectField;
            }
            set
            {
                this.SubjectField = value;
            }
        }
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="TMInfo", Namespace="http://kilgray.com/memoqservices/2007")]
    public partial class TMInfo : MQS.TM.HeavyResourceInfo
    {

        private bool AllowMultipleField;

        private bool AllowReverseLookupField;

        private string SourceLanguageCodeField;

        private bool StoreFormattingField;

        private string TargetLanguageCodeField;

        private bool UseContextField;

        private bool UseIceSpiceContextField;

        [System.Runtime.Serialization.DataMemberAttribute()]
        public bool AllowMultiple
        {
            get
            {
                return this.AllowMultipleField;
            }
            set
            {
                this.AllowMultipleField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public bool AllowReverseLookup
        {
            get
            {
                return this.AllowReverseLookupField;
            }
            set
            {
                this.AllowReverseLookupField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public string SourceLanguageCode
        {
            get
            {
                return this.SourceLanguageCodeField;
            }
            set
            {
                this.SourceLanguageCodeField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public bool StoreFormatting
        {
            get
            {
                return this.StoreFormattingField;
            }
            set
            {
                this.StoreFormattingField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public string TargetLanguageCode
        {
            get
            {
                return this.TargetLanguageCodeField;
            }
            set
            {
                this.TargetLanguageCodeField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public bool UseContext
        {
            get
            {
                return this.UseContextField;
            }
            set
            {
                this.UseContextField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public bool UseIceSpiceContext
        {
            get
            {
                return this.UseIceSpiceContextField;
            }
            set
            {
                this.UseIceSpiceContextField = value;
            }
        }
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="ResourceUpdateInfo", Namespace="http://kilgray.com/memoqservices/2007")]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(MQS.TM.HeavyResourceUpdateInfo))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(MQS.TM.TMUpdateInfo))]
    public partial class ResourceUpdateInfo : object, System.Runtime.Serialization.IExtensibleDataObject
    {

        private System.Runtime.Serialization.ExtensionDataObject extensionDataField;

        private string DescriptionField;

        private System.Guid GuidField;

        private string NameField;

        private bool ReadonlyField;

        public System.Runtime.Serialization.ExtensionDataObject ExtensionData
        {
            get
            {
                return this.extensionDataField;
            }
            set
            {
                this.extensionDataField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public string Description
        {
            get
            {
                return this.DescriptionField;
            }
            set
            {
                this.DescriptionField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public System.Guid Guid
        {
            get
            {
                return this.GuidField;
            }
            set
            {
                this.GuidField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public string Name
        {
            get
            {
                return this.NameField;
            }
            set
            {
                this.NameField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public bool Readonly
        {
            get
            {
                return this.ReadonlyField;
            }
            set
            {
                this.ReadonlyField = value;
            }
        }
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="HeavyResourceUpdateInfo", Namespace="http://kilgray.com/memoqservices/2007")]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(MQS.TM.TMUpdateInfo))]
    public partial class HeavyResourceUpdateInfo : MQS.TM.ResourceUpdateInfo
    {

        private string ClientField;

        private string DomainField;

        private string ProjectField;

        private string SubjectField;

        [System.Runtime.Serialization.DataMemberAttribute()]
        public string Client
        {
            get
            {
                return this.ClientField;
            }
            set
            {
                this.ClientField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public string Domain
        {
            get
            {
                return this.DomainField;
            }
            set
            {
                this.DomainField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public string Project
        {
            get
            {
                return this.ProjectField;
            }
            set
            {
                this.ProjectField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public string Subject
        {
            get
            {
                return this.SubjectField;
            }
            set
            {
                this.SubjectField = value;
            }
        }
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="TMUpdateInfo", Namespace="http://kilgray.com/memoqservices/2007")]
    public partial class TMUpdateInfo : MQS.TM.HeavyResourceUpdateInfo
    {
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="TmxImportResult", Namespace="http://kilgray.com/memoqservices/2007")]
    public partial class TmxImportResult : object, System.Runtime.Serialization.IExtensibleDataObject
    {

        private System.Runtime.Serialization.ExtensionDataObject extensionDataField;

        private int AllSegmentCountField;

        private int ImportedSegmentCountField;

        public System.Runtime.Serialization.ExtensionDataObject ExtensionData
        {
            get
            {
                return this.extensionDataField;
            }
            set
            {
                this.extensionDataField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public int AllSegmentCount
        {
            get
            {
                return this.AllSegmentCountField;
            }
            set
            {
                this.AllSegmentCountField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public int ImportedSegmentCount
        {
            get
            {
                return this.ImportedSegmentCountField;
            }
            set
            {
                this.ImportedSegmentCountField = value;
            }
        }
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="LookupSegmentRequest", Namespace="http://kilgray.com/memoqservices/2007")]
    public partial class LookupSegmentRequest : object, System.Runtime.Serialization.IExtensibleDataObject
    {

        private System.Runtime.Serialization.ExtensionDataObject extensionDataField;

        private bool AdjustFuzzyMatchesField;

        private MQS.TM.InlineTagStrictness InlineTagStrictnessField;

        private int MatchThresholdField;

        private bool OnlyBestField;

        private bool OnlyUnambiguousField;

        private bool ReverseLookupField;

        public System.Runtime.Serialization.ExtensionDataObject ExtensionData
        {
            get
            {
                return this.extensionDataField;
            }
            set
            {
                this.extensionDataField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public bool AdjustFuzzyMatches
        {
            get
            {
                return this.AdjustFuzzyMatchesField;
            }
            set
            {
                this.AdjustFuzzyMatchesField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public MQS.TM.InlineTagStrictness InlineTagStrictness
        {
            get
            {
                return this.InlineTagStrictnessField;
            }
            set
            {
                this.InlineTagStrictnessField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public int MatchThreshold
        {
            get
            {
                return this.MatchThresholdField;
            }
            set
            {
                this.MatchThresholdField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public bool OnlyBest
        {
            get
            {
                return this.OnlyBestField;
            }
            set
            {
                this.OnlyBestField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public bool OnlyUnambiguous
        {
            get
            {
                return this.OnlyUnambiguousField;
            }
            set
            {
                this.OnlyUnambiguousField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public bool ReverseLookup
        {
            get
            {
                return this.ReverseLookupField;
            }
            set
            {
                this.ReverseLookupField = value;
            }
        }
    }

    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="InlineTagStrictness", Namespace="http://kilgray.com/memoqservices/2007")]
    public enum InlineTagStrictness : int
    {

        [System.Runtime.Serialization.EnumMemberAttribute()]
        Strict = 0,

        [System.Runtime.Serialization.EnumMemberAttribute()]
        Medium = 1,

        [System.Runtime.Serialization.EnumMemberAttribute()]
        Permissive = 2,
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="ConcordanceRequest", Namespace="http://kilgray.com/memoqservices/2007")]
    public partial class ConcordanceRequest : object, System.Runtime.Serialization.IExtensibleDataObject
    {

        private System.Runtime.Serialization.ExtensionDataObject extensionDataField;

        private bool CaseSensitiveField;

        private bool NumericEquivalenceField;

        private int ResultsLimitField;

        private bool ReverseLookupField;

        public System.Runtime.Serialization.ExtensionDataObject ExtensionData
        {
            get
            {
                return this.extensionDataField;
            }
            set
            {
                this.extensionDataField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public bool CaseSensitive
        {
            get
            {
                return this.CaseSensitiveField;
            }
            set
            {
                this.CaseSensitiveField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public bool NumericEquivalence
        {
            get
            {
                return this.NumericEquivalenceField;
            }
            set
            {
                this.NumericEquivalenceField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public int ResultsLimit
        {
            get
            {
                return this.ResultsLimitField;
            }
            set
            {
                this.ResultsLimitField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public bool ReverseLookup
        {
            get
            {
                return this.ReverseLookupField;
            }
            set
            {
                this.ReverseLookupField = value;
            }
        }
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="UnexpectedFault", Namespace="http://kilgray.com/memoqservices/2007")]
    public partial class UnexpectedFault : object, System.Runtime.Serialization.IExtensibleDataObject
    {

        private System.Runtime.Serialization.ExtensionDataObject extensionDataField;

        private string StackTraceField;

        public System.Runtime.Serialization.ExtensionDataObject ExtensionData
        {
            get
            {
                return this.extensionDataField;
            }
            set
            {
                this.extensionDataField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public string StackTrace
        {
            get
            {
                return this.StackTraceField;
            }
            set
            {
                this.StackTraceField = value;
            }
        }
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="GenericFault", Namespace="http://kilgray.com/memoqservices/2007")]
    public partial class GenericFault : object, System.Runtime.Serialization.IExtensibleDataObject
    {

        private System.Runtime.Serialization.ExtensionDataObject extensionDataField;

        private string ErrorCodeField;

        public System.Runtime.Serialization.ExtensionDataObject ExtensionData
        {
            get
            {
                return this.extensionDataField;
            }
            set
            {
                this.extensionDataField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public string ErrorCode
        {
            get
            {
                return this.ErrorCodeField;
            }
            set
            {
                this.ErrorCodeField = value;
            }
        }
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="InvalidSessionIdFault", Namespace="http://kilgray.com/memoqservices/2007")]
    public partial class InvalidSessionIdFault : object, System.Runtime.Serialization.IExtensibleDataObject
    {

        private System.Runtime.Serialization.ExtensionDataObject extensionDataField;

        public System.Runtime.Serialization.ExtensionDataObject ExtensionData
        {
            get
            {
                return this.extensionDataField;
            }
            set
            {
                this.extensionDataField = value;
            }
        }
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="UnauthorizedAccessFault", Namespace="http://kilgray.com/memoqservices/2007")]
    public partial class UnauthorizedAccessFault : object, System.Runtime.Serialization.IExtensibleDataObject
    {

        private System.Runtime.Serialization.ExtensionDataObject extensionDataField;

        public System.Runtime.Serialization.ExtensionDataObject ExtensionData
        {
            get
            {
                return this.extensionDataField;
            }
            set
            {
                this.extensionDataField = value;
            }
        }
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="NoLicenseFault", Namespace="http://kilgray.com/memoqservices/2007")]
    public partial class NoLicenseFault : object, System.Runtime.Serialization.IExtensibleDataObject
    {

        private System.Runtime.Serialization.ExtensionDataObject extensionDataField;

        public System.Runtime.Serialization.ExtensionDataObject ExtensionData
        {
            get
            {
                return this.extensionDataField;
            }
            set
            {
                this.extensionDataField = value;
            }
        }
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="TMFault", Namespace="http://kilgray.com/memoqservices/2007")]
    public partial class TMFault : object, System.Runtime.Serialization.IExtensibleDataObject
    {

        private System.Runtime.Serialization.ExtensionDataObject extensionDataField;

        private string ErrorCodeField;

        public System.Runtime.Serialization.ExtensionDataObject ExtensionData
        {
            get
            {
                return this.extensionDataField;
            }
            set
            {
                this.extensionDataField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public string ErrorCode
        {
            get
            {
                return this.ErrorCodeField;
            }
            set
            {
                this.ErrorCodeField = value;
            }
        }
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="RequestXmlFormatFault", Namespace="http://kilgray.com/memoqservices/2007")]
    public partial class RequestXmlFormatFault : object, System.Runtime.Serialization.IExtensibleDataObject
    {

        private System.Runtime.Serialization.ExtensionDataObject extensionDataField;

        public System.Runtime.Serialization.ExtensionDataObject ExtensionData
        {
            get
            {
                return this.extensionDataField;
            }
            set
            {
                this.extensionDataField = value;
            }
        }
    }

    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ServiceModel.ServiceContractAttribute(Namespace="http://kilgray.com/memoqservices/2007", ConfigurationName="MQS.TM.ITMService")]
    public interface ITMService
    {

        [System.ServiceModel.OperationContractAttribute(Action="http://kilgray.com/memoqservices/2007/ITMService/CreateAndPublish", ReplyAction="http://kilgray.com/memoqservices/2007/ITMService/CreateAndPublishResponse")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.UnexpectedFault), Action="http://kilgray.com/memoqservices/2007/ITMService/CreateAndPublishUnexpectedFaultF" +
            "ault", Name="UnexpectedFault")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.GenericFault), Action="http://kilgray.com/memoqservices/2007/ITMService/CreateAndPublishGenericFaultFaul" +
            "t", Name="GenericFault")]
        System.Guid CreateAndPublish(MQS.TM.TMInfo info);

        [System.ServiceModel.OperationContractAttribute(Action="http://kilgray.com/memoqservices/2007/ITMService/CreateAndPublish", ReplyAction="http://kilgray.com/memoqservices/2007/ITMService/CreateAndPublishResponse")]
        System.Threading.Tasks.Task<System.Guid> CreateAndPublishAsync(MQS.TM.TMInfo info);

        [System.ServiceModel.OperationContractAttribute(Action="http://kilgray.com/memoqservices/2007/ITMService/ListTMs", ReplyAction="http://kilgray.com/memoqservices/2007/ITMService/ListTMsResponse")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.UnexpectedFault), Action="http://kilgray.com/memoqservices/2007/ITMService/ListTMsUnexpectedFaultFault", Name="UnexpectedFault")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.GenericFault), Action="http://kilgray.com/memoqservices/2007/ITMService/ListTMsGenericFaultFault", Name="GenericFault")]
        MQS.TM.TMInfo[] ListTMs(string srcLang, string targetLang);

        [System.ServiceModel.OperationContractAttribute(Action="http://kilgray.com/memoqservices/2007/ITMService/ListTMs", ReplyAction="http://kilgray.com/memoqservices/2007/ITMService/ListTMsResponse")]
        System.Threading.Tasks.Task<MQS.TM.TMInfo[]> ListTMsAsync(string srcLang, string targetLang);

        [System.ServiceModel.OperationContractAttribute(Action="http://kilgray.com/memoqservices/2007/ITMService/GetTMInfo", ReplyAction="http://kilgray.com/memoqservices/2007/ITMService/GetTMInfoResponse")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.UnexpectedFault), Action="http://kilgray.com/memoqservices/2007/ITMService/GetTMInfoUnexpectedFaultFault", Name="UnexpectedFault")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.GenericFault), Action="http://kilgray.com/memoqservices/2007/ITMService/GetTMInfoGenericFaultFault", Name="GenericFault")]
        MQS.TM.TMInfo GetTMInfo(System.Guid tmGuid);

        [System.ServiceModel.OperationContractAttribute(Action="http://kilgray.com/memoqservices/2007/ITMService/GetTMInfo", ReplyAction="http://kilgray.com/memoqservices/2007/ITMService/GetTMInfoResponse")]
        System.Threading.Tasks.Task<MQS.TM.TMInfo> GetTMInfoAsync(System.Guid tmGuid);

        [System.ServiceModel.OperationContractAttribute(Action="http://kilgray.com/memoqservices/2007/ITMService/UpdateProperties", ReplyAction="http://kilgray.com/memoqservices/2007/ITMService/UpdatePropertiesResponse")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.UnexpectedFault), Action="http://kilgray.com/memoqservices/2007/ITMService/UpdatePropertiesUnexpectedFaultF" +
            "ault", Name="UnexpectedFault")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.GenericFault), Action="http://kilgray.com/memoqservices/2007/ITMService/UpdatePropertiesGenericFaultFaul" +
            "t", Name="GenericFault")]
        void UpdateProperties(MQS.TM.TMUpdateInfo updateInfo);

        [System.ServiceModel.OperationContractAttribute(Action="http://kilgray.com/memoqservices/2007/ITMService/UpdateProperties", ReplyAction="http://kilgray.com/memoqservices/2007/ITMService/UpdatePropertiesResponse")]
        System.Threading.Tasks.Task UpdatePropertiesAsync(MQS.TM.TMUpdateInfo updateInfo);

        [System.ServiceModel.OperationContractAttribute(Action="http://kilgray.com/memoqservices/2007/ITMService/DeleteTM", ReplyAction="http://kilgray.com/memoqservices/2007/ITMService/DeleteTMResponse")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.UnexpectedFault), Action="http://kilgray.com/memoqservices/2007/ITMService/DeleteTMUnexpectedFaultFault", Name="UnexpectedFault")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.GenericFault), Action="http://kilgray.com/memoqservices/2007/ITMService/DeleteTMGenericFaultFault", Name="GenericFault")]
        void DeleteTM(System.Guid tmGuid);

        [System.ServiceModel.OperationContractAttribute(Action="http://kilgray.com/memoqservices/2007/ITMService/DeleteTM", ReplyAction="http://kilgray.com/memoqservices/2007/ITMService/DeleteTMResponse")]
        System.Threading.Tasks.Task DeleteTMAsync(System.Guid tmGuid);

        [System.ServiceModel.OperationContractAttribute(Action="http://kilgray.com/memoqservices/2007/ITMService/BeginChunkedTMXImport", ReplyAction="http://kilgray.com/memoqservices/2007/ITMService/BeginChunkedTMXImportResponse")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.UnexpectedFault), Action="http://kilgray.com/memoqservices/2007/ITMService/BeginChunkedTMXImportUnexpectedF" +
            "aultFault", Name="UnexpectedFault")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.GenericFault), Action="http://kilgray.com/memoqservices/2007/ITMService/BeginChunkedTMXImportGenericFaul" +
            "tFault", Name="GenericFault")]
        System.Guid BeginChunkedTMXImport(System.Guid tmGuid);

        [System.ServiceModel.OperationContractAttribute(Action="http://kilgray.com/memoqservices/2007/ITMService/BeginChunkedTMXImport", ReplyAction="http://kilgray.com/memoqservices/2007/ITMService/BeginChunkedTMXImportResponse")]
        System.Threading.Tasks.Task<System.Guid> BeginChunkedTMXImportAsync(System.Guid tmGuid);

        [System.ServiceModel.OperationContractAttribute(Action="http://kilgray.com/memoqservices/2007/ITMService/AddNextTMXChunk", ReplyAction="http://kilgray.com/memoqservices/2007/ITMService/AddNextTMXChunkResponse")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.UnexpectedFault), Action="http://kilgray.com/memoqservices/2007/ITMService/AddNextTMXChunkUnexpectedFaultFa" +
            "ult", Name="UnexpectedFault")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.GenericFault), Action="http://kilgray.com/memoqservices/2007/ITMService/AddNextTMXChunkGenericFaultFault" +
            "", Name="GenericFault")]
        void AddNextTMXChunk(System.Guid sessionId, byte[] tmxData);

        [System.ServiceModel.OperationContractAttribute(Action="http://kilgray.com/memoqservices/2007/ITMService/AddNextTMXChunk", ReplyAction="http://kilgray.com/memoqservices/2007/ITMService/AddNextTMXChunkResponse")]
        System.Threading.Tasks.Task AddNextTMXChunkAsync(System.Guid sessionId, byte[] tmxData);

        [System.ServiceModel.OperationContractAttribute(Action="http://kilgray.com/memoqservices/2007/ITMService/EndChunkedTMXImport", ReplyAction="http://kilgray.com/memoqservices/2007/ITMService/EndChunkedTMXImportResponse")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.UnexpectedFault), Action="http://kilgray.com/memoqservices/2007/ITMService/EndChunkedTMXImportUnexpectedFau" +
            "ltFault", Name="UnexpectedFault")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.GenericFault), Action="http://kilgray.com/memoqservices/2007/ITMService/EndChunkedTMXImportGenericFaultF" +
            "ault", Name="GenericFault")]
        MQS.TM.TmxImportResult EndChunkedTMXImport(System.Guid sessionId);

        [System.ServiceModel.OperationContractAttribute(Action="http://kilgray.com/memoqservices/2007/ITMService/EndChunkedTMXImport", ReplyAction="http://kilgray.com/memoqservices/2007/ITMService/EndChunkedTMXImportResponse")]
        System.Threading.Tasks.Task<MQS.TM.TmxImportResult> EndChunkedTMXImportAsync(System.Guid sessionId);

        [System.ServiceModel.OperationContractAttribute(Action="http://kilgray.com/memoqservices/2007/ITMService/BeginChunkedTMXExport", ReplyAction="http://kilgray.com/memoqservices/2007/ITMService/BeginChunkedTMXExportResponse")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.UnexpectedFault), Action="http://kilgray.com/memoqservices/2007/ITMService/BeginChunkedTMXExportUnexpectedF" +
            "aultFault", Name="UnexpectedFault")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.GenericFault), Action="http://kilgray.com/memoqservices/2007/ITMService/BeginChunkedTMXExportGenericFaul" +
            "tFault", Name="GenericFault")]
        System.Guid BeginChunkedTMXExport(System.Guid tmGuid);

        [System.ServiceModel.OperationContractAttribute(Action="http://kilgray.com/memoqservices/2007/ITMService/BeginChunkedTMXExport", ReplyAction="http://kilgray.com/memoqservices/2007/ITMService/BeginChunkedTMXExportResponse")]
        System.Threading.Tasks.Task<System.Guid> BeginChunkedTMXExportAsync(System.Guid tmGuid);

        [System.ServiceModel.OperationContractAttribute(Action="http://kilgray.com/memoqservices/2007/ITMService/GetNextTMXChunk", ReplyAction="http://kilgray.com/memoqservices/2007/ITMService/GetNextTMXChunkResponse")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.UnexpectedFault), Action="http://kilgray.com/memoqservices/2007/ITMService/GetNextTMXChunkUnexpectedFaultFa" +
            "ult", Name="UnexpectedFault")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.GenericFault), Action="http://kilgray.com/memoqservices/2007/ITMService/GetNextTMXChunkGenericFaultFault" +
            "", Name="GenericFault")]
        byte[] GetNextTMXChunk(System.Guid sessionId);

        [System.ServiceModel.OperationContractAttribute(Action="http://kilgray.com/memoqservices/2007/ITMService/GetNextTMXChunk", ReplyAction="http://kilgray.com/memoqservices/2007/ITMService/GetNextTMXChunkResponse")]
        System.Threading.Tasks.Task<byte[]> GetNextTMXChunkAsync(System.Guid sessionId);

        [System.ServiceModel.OperationContractAttribute(Action="http://kilgray.com/memoqservices/2007/ITMService/EndChunkedTMXExport", ReplyAction="http://kilgray.com/memoqservices/2007/ITMService/EndChunkedTMXExportResponse")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.UnexpectedFault), Action="http://kilgray.com/memoqservices/2007/ITMService/EndChunkedTMXExportUnexpectedFau" +
            "ltFault", Name="UnexpectedFault")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.GenericFault), Action="http://kilgray.com/memoqservices/2007/ITMService/EndChunkedTMXExportGenericFaultF" +
            "ault", Name="GenericFault")]
        void EndChunkedTMXExport(System.Guid sessionId);

        [System.ServiceModel.OperationContractAttribute(Action="http://kilgray.com/memoqservices/2007/ITMService/EndChunkedTMXExport", ReplyAction="http://kilgray.com/memoqservices/2007/ITMService/EndChunkedTMXExportResponse")]
        System.Threading.Tasks.Task EndChunkedTMXExportAsync(System.Guid sessionId);

        [System.ServiceModel.OperationContractAttribute(Action="http://kilgray.com/memoqservices/2007/ITMService/LookupSegment", ReplyAction="http://kilgray.com/memoqservices/2007/ITMService/LookupSegmentResponse")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.InvalidSessionIdFault), Action="http://kilgray.com/memoqservices/2007/ITMService/LookupSegmentInvalidSessionIdFau" +
            "ltFault", Name="InvalidSessionIdFault")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.UnauthorizedAccessFault), Action="http://kilgray.com/memoqservices/2007/ITMService/LookupSegmentUnauthorizedAccessF" +
            "aultFault", Name="UnauthorizedAccessFault")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.NoLicenseFault), Action="http://kilgray.com/memoqservices/2007/ITMService/LookupSegmentNoLicenseFaultFault" +
            "", Name="NoLicenseFault")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.TMFault), Action="http://kilgray.com/memoqservices/2007/ITMService/LookupSegmentTMFaultFault", Name="TMFault")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.RequestXmlFormatFault), Action="http://kilgray.com/memoqservices/2007/ITMService/LookupSegmentRequestXmlFormatFau" +
            "ltFault", Name="RequestXmlFormatFault")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.UnexpectedFault), Action="http://kilgray.com/memoqservices/2007/ITMService/LookupSegmentUnexpectedFaultFaul" +
            "t", Name="UnexpectedFault")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.GenericFault), Action="http://kilgray.com/memoqservices/2007/ITMService/LookupSegmentGenericFaultFault", Name="GenericFault")]
        string LookupSegment(string sessionId, string lookupDataXml, System.Guid tmGuid, MQS.TM.LookupSegmentRequest options);

        [System.ServiceModel.OperationContractAttribute(Action="http://kilgray.com/memoqservices/2007/ITMService/LookupSegment", ReplyAction="http://kilgray.com/memoqservices/2007/ITMService/LookupSegmentResponse")]
        System.Threading.Tasks.Task<string> LookupSegmentAsync(string sessionId, string lookupDataXml, System.Guid tmGuid, MQS.TM.LookupSegmentRequest options);

        [System.ServiceModel.OperationContractAttribute(Action="http://kilgray.com/memoqservices/2007/ITMService/Concordance", ReplyAction="http://kilgray.com/memoqservices/2007/ITMService/ConcordanceResponse")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.InvalidSessionIdFault), Action="http://kilgray.com/memoqservices/2007/ITMService/ConcordanceInvalidSessionIdFault" +
            "Fault", Name="InvalidSessionIdFault")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.UnauthorizedAccessFault), Action="http://kilgray.com/memoqservices/2007/ITMService/ConcordanceUnauthorizedAccessFau" +
            "ltFault", Name="UnauthorizedAccessFault")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.NoLicenseFault), Action="http://kilgray.com/memoqservices/2007/ITMService/ConcordanceNoLicenseFaultFault", Name="NoLicenseFault")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.TMFault), Action="http://kilgray.com/memoqservices/2007/ITMService/ConcordanceTMFaultFault", Name="TMFault")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.UnexpectedFault), Action="http://kilgray.com/memoqservices/2007/ITMService/ConcordanceUnexpectedFaultFault", Name="UnexpectedFault")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.GenericFault), Action="http://kilgray.com/memoqservices/2007/ITMService/ConcordanceGenericFaultFault", Name="GenericFault")]
        string Concordance(string sessionId, string searchExpression, System.Guid tmGuid, MQS.TM.ConcordanceRequest options);

        [System.ServiceModel.OperationContractAttribute(Action="http://kilgray.com/memoqservices/2007/ITMService/Concordance", ReplyAction="http://kilgray.com/memoqservices/2007/ITMService/ConcordanceResponse")]
        System.Threading.Tasks.Task<string> ConcordanceAsync(string sessionId, string searchExpression, System.Guid tmGuid, MQS.TM.ConcordanceRequest options);

        [System.ServiceModel.OperationContractAttribute(Action="http://kilgray.com/memoqservices/2007/ITMService/AddOrUpdateEntry", ReplyAction="http://kilgray.com/memoqservices/2007/ITMService/AddOrUpdateEntryResponse")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.InvalidSessionIdFault), Action="http://kilgray.com/memoqservices/2007/ITMService/AddOrUpdateEntryInvalidSessionId" +
            "FaultFault", Name="InvalidSessionIdFault")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.UnauthorizedAccessFault), Action="http://kilgray.com/memoqservices/2007/ITMService/AddOrUpdateEntryUnauthorizedAcce" +
            "ssFaultFault", Name="UnauthorizedAccessFault")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.NoLicenseFault), Action="http://kilgray.com/memoqservices/2007/ITMService/AddOrUpdateEntryNoLicenseFaultFa" +
            "ult", Name="NoLicenseFault")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.TMFault), Action="http://kilgray.com/memoqservices/2007/ITMService/AddOrUpdateEntryTMFaultFault", Name="TMFault")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.RequestXmlFormatFault), Action="http://kilgray.com/memoqservices/2007/ITMService/AddOrUpdateEntryRequestXmlFormat" +
            "FaultFault", Name="RequestXmlFormatFault")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.UnexpectedFault), Action="http://kilgray.com/memoqservices/2007/ITMService/AddOrUpdateEntryUnexpectedFaultF" +
            "ault", Name="UnexpectedFault")]
        [System.ServiceModel.FaultContractAttribute(typeof(MQS.TM.GenericFault), Action="http://kilgray.com/memoqservices/2007/ITMService/AddOrUpdateEntryGenericFaultFaul" +
            "t", Name="GenericFault")]
        void AddOrUpdateEntry(string sessionId, string segmentDataXml, System.Guid tmGuid);

        [System.ServiceModel.OperationContractAttribute(Action="http://kilgray.com/memoqservices/2007/ITMService/AddOrUpdateEntry", ReplyAction="http://kilgray.com/memoqservices/2007/ITMService/AddOrUpdateEntryResponse")]
        System.Threading.Tasks.Task AddOrUpdateEntryAsync(string sessionId, string segmentDataXml, System.Guid tmGuid);
    }

    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public interface ITMServiceChannel : MQS.TM.ITMService, System.ServiceModel.IClientChannel
    {
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class TMServiceClient : System.ServiceModel.ClientBase<MQS.TM.ITMService>, MQS.TM.ITMService
    {

        public TMServiceClient()
        {
        }

        public TMServiceClient(string endpointConfigurationName) :
                base(endpointConfigurationName)
        {
        }

        public TMServiceClient(string endpointConfigurationName, string remoteAddress) :
                base(endpointConfigurationName, remoteAddress)
        {
        }

        public TMServiceClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) :
                base(endpointConfigurationName, remoteAddress)
        {
        }

        public TMServiceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
                base(binding, remoteAddress)
        {
        }

        public System.Guid CreateAndPublish(MQS.TM.TMInfo info)
        {
            return base.Channel.CreateAndPublish(info);
        }

        public System.Threading.Tasks.Task<System.Guid> CreateAndPublishAsync(MQS.TM.TMInfo info)
        {
            return base.Channel.CreateAndPublishAsync(info);
        }

        public MQS.TM.TMInfo[] ListTMs(string srcLang, string targetLang)
        {
            return base.Channel.ListTMs(srcLang, targetLang);
        }

        public System.Threading.Tasks.Task<MQS.TM.TMInfo[]> ListTMsAsync(string srcLang, string targetLang)
        {
            return base.Channel.ListTMsAsync(srcLang, targetLang);
        }

        public MQS.TM.TMInfo GetTMInfo(System.Guid tmGuid)
        {
            return base.Channel.GetTMInfo(tmGuid);
        }

        public System.Threading.Tasks.Task<MQS.TM.TMInfo> GetTMInfoAsync(System.Guid tmGuid)
        {
            return base.Channel.GetTMInfoAsync(tmGuid);
        }

        public void UpdateProperties(MQS.TM.TMUpdateInfo updateInfo)
        {
            base.Channel.UpdateProperties(updateInfo);
        }

        public System.Threading.Tasks.Task UpdatePropertiesAsync(MQS.TM.TMUpdateInfo updateInfo)
        {
            return base.Channel.UpdatePropertiesAsync(updateInfo);
        }

        public void DeleteTM(System.Guid tmGuid)
        {
            base.Channel.DeleteTM(tmGuid);
        }

        public System.Threading.Tasks.Task DeleteTMAsync(System.Guid tmGuid)
        {
            return base.Channel.DeleteTMAsync(tmGuid);
        }

        public System.Guid BeginChunkedTMXImport(System.Guid tmGuid)
        {
            return base.Channel.BeginChunkedTMXImport(tmGuid);
        }

        public System.Threading.Tasks.Task<System.Guid> BeginChunkedTMXImportAsync(System.Guid tmGuid)
        {
            return base.Channel.BeginChunkedTMXImportAsync(tmGuid);
        }

        public void AddNextTMXChunk(System.Guid sessionId, byte[] tmxData)
        {
            base.Channel.AddNextTMXChunk(sessionId, tmxData);
        }

        public System.Threading.Tasks.Task AddNextTMXChunkAsync(System.Guid sessionId, byte[] tmxData)
        {
            return base.Channel.AddNextTMXChunkAsync(sessionId, tmxData);
        }

        public MQS.TM.TmxImportResult EndChunkedTMXImport(System.Guid sessionId)
        {
            return base.Channel.EndChunkedTMXImport(sessionId);
        }

        public System.Threading.Tasks.Task<MQS.TM.TmxImportResult> EndChunkedTMXImportAsync(System.Guid sessionId)
        {
            return base.Channel.EndChunkedTMXImportAsync(sessionId);
        }

        public System.Guid BeginChunkedTMXExport(System.Guid tmGuid)
        {
            return base.Channel.BeginChunkedTMXExport(tmGuid);
        }

        public System.Threading.Tasks.Task<System.Guid> BeginChunkedTMXExportAsync(System.Guid tmGuid)
        {
            return base.Channel.BeginChunkedTMXExportAsync(tmGuid);
        }

        public byte[] GetNextTMXChunk(System.Guid sessionId)
        {
            return base.Channel.GetNextTMXChunk(sessionId);
        }

        public System.Threading.Tasks.Task<byte[]> GetNextTMXChunkAsync(System.Guid sessionId)
        {
            return base.Channel.GetNextTMXChunkAsync(sessionId);
        }

        public void EndChunkedTMXExport(System.Guid sessionId)
        {
            base.Channel.EndChunkedTMXExport(sessionId);
        }

        public System.Threading.Tasks.Task EndChunkedTMXExportAsync(System.Guid sessionId)
        {
            return base.Channel.EndChunkedTMXExportAsync(sessionId);
        }

        public string LookupSegment(string sessionId, string lookupDataXml, System.Guid tmGuid, MQS.TM.LookupSegmentRequest options)
        {
            return base.Channel.LookupSegment(sessionId, lookupDataXml, tmGuid, options);
        }

        public System.Threading.Tasks.Task<string> LookupSegmentAsync(string sessionId, string lookupDataXml, System.Guid tmGuid, MQS.TM.LookupSegmentRequest options)
        {
            return base.Channel.LookupSegmentAsync(sessionId, lookupDataXml, tmGuid, options);
        }

        public string Concordance(string sessionId, string searchExpression, System.Guid tmGuid, MQS.TM.ConcordanceRequest options)
        {
            return base.Channel.Concordance(sessionId, searchExpression, tmGuid, options);
        }

        public System.Threading.Tasks.Task<string> ConcordanceAsync(string sessionId, string searchExpression, System.Guid tmGuid, MQS.TM.ConcordanceRequest options)
        {
            return base.Channel.ConcordanceAsync(sessionId, searchExpression, tmGuid, options);
        }

        public void AddOrUpdateEntry(string sessionId, string segmentDataXml, System.Guid tmGuid)
        {
            base.Channel.AddOrUpdateEntry(sessionId, segmentDataXml, tmGuid);
        }

        public System.Threading.Tasks.Task AddOrUpdateEntryAsync(string sessionId, string segmentDataXml, System.Guid tmGuid)
        {
            return base.Channel.AddOrUpdateEntryAsync(sessionId, segmentDataXml, tmGuid);
        }
    }
}


text:
var debug = require('debug')('pack:a2');

var PackA2 = (function(){
    debug("Initialize PackA2...");

    function PackA2(){
        debug("Construct PackA2 object....");
        this._name = "PackA2";
    }

    PackA2.prototype.whoami = function(){
        debug("PackA2.whoami()");
        return this._name;
    };

    PackA2.prototype.changeName = function(newName){
        debug("PackA2.changeName('%s')", newName);
        if(newName){
            this._name = newName;
        }
        else{
            debug("The new name is invalid: " + newName);
        }
        return this._name;
    };

    debug("PackA2 Initialized!");
    return PackA2;
})();

module.exports = PackA2;


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>WorkbookFactory (POI API Documentation)</title>
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

PREV CLASS

NEXT CLASS

FRAMES

NO FRAMES

All Classes

SUMMARY:

NESTED |

FIELD |

CONSTR |

METHOD

DETAIL:

FIELD |

CONSTR |

METHOD

org.apache.poi.ss.usermodel

Class WorkbookFactory

java.lang.Object

org.apache.poi.ss.usermodel.WorkbookFactory

public class WorkbookFactory
extends java.lang.Object

Factory for creating the appropriate kind of Workbook
  (be it HSSFWorkbook or XSSFWorkbook),
  by auto-detecting from the supplied input.

Constructor Summary

Constructors

Constructor and Description

WorkbookFactory()

Method Summary

Methods

Modifier and Type
Method and Description

static Workbook
create(java.io.File file)

Creates the appropriate HSSFWorkbook / XSSFWorkbook from
  the given File, which must exist and be readable.

static Workbook
create(java.io.File file,
      java.lang.String password)

Creates the appropriate HSSFWorkbook / XSSFWorkbook from
  the given File, which must exist and be readable, and
  may be password protected

static Workbook
create(java.io.File file,
      java.lang.String password,
      boolean readOnly)

Creates the appropriate HSSFWorkbook / XSSFWorkbook from
  the given File, which must exist and be readable, and
  may be password protected

static Workbook
create(java.io.InputStream inp)

Creates the appropriate HSSFWorkbook / XSSFWorkbook from
  the given InputStream.

static Workbook
create(java.io.InputStream inp,
      java.lang.String password)

Creates the appropriate HSSFWorkbook / XSSFWorkbook from
  the given InputStream, which may be password protected.

static Workbook
create(NPOIFSFileSystem fs)

Creates a HSSFWorkbook from the given NPOIFSFileSystem

static Workbook
create(OPCPackage pkg)

Creates a XSSFWorkbook from the given OOXML Package

static Workbook
create(POIFSFileSystem fs)

Creates a HSSFWorkbook from the given POIFSFileSystem

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

WorkbookFactory

public WorkbookFactory()

Method Detail

create

public static Workbook create(POIFSFileSystem fs)
                       throws java.io.IOException

Creates a HSSFWorkbook from the given POIFSFileSystem

Note that in order to properly release resources the
  Workbook should be closed after use.

Throws:

java.io.IOException

create

public static Workbook create(NPOIFSFileSystem fs)
                       throws java.io.IOException

Creates a HSSFWorkbook from the given NPOIFSFileSystem

Note that in order to properly release resources the
  Workbook should be closed after use.

Throws:

java.io.IOException

create

public static Workbook create(OPCPackage pkg)
                       throws java.io.IOException

Creates a XSSFWorkbook from the given OOXML Package

Note that in order to properly release resources the
  Workbook should be closed after use.

Parameters:

pkg - The OPCPackage opened for reading data.

Returns:

The created Workbook

Throws:

java.io.IOException - if an error occurs while reading the data

create

public static Workbook create(java.io.InputStream inp)
                       throws java.io.IOException,
                              InvalidFormatException,
                              EncryptedDocumentException

Creates the appropriate HSSFWorkbook / XSSFWorkbook from
  the given InputStream.

Your input stream MUST either support mark/reset, or
  be wrapped as a PushbackInputStream! Note that
  using an InputStream has a higher memory footprint
  than using a File.

Note that in order to properly release resources the
  Workbook should be closed after use. Note also that loading
  from an InputStream requires more memory than loading
  from a File, so prefer create(File) where possible.

Parameters:

inp - The InputStream to read data from.

Returns:

The created Workbook

Throws:

java.io.IOException - if an error occurs while reading the data

InvalidFormatException - if the contents of the file cannot be parsed into a Workbook

EncryptedDocumentException - If the workbook given is password protected

create

public static Workbook create(java.io.InputStream inp,
              java.lang.String password)
                       throws java.io.IOException,
                              InvalidFormatException,
                              EncryptedDocumentException

Creates the appropriate HSSFWorkbook / XSSFWorkbook from
  the given InputStream, which may be password protected.

Your input stream MUST either support mark/reset, or
  be wrapped as a PushbackInputStream! Note that
  using an InputStream has a higher memory footprint
  than using a File.

Note that in order to properly release resources the
  Workbook should be closed after use. Note also that loading
  from an InputStream requires more memory than loading
  from a File, so prefer create(File) where possible.

Parameters:

inp - The InputStream to read data from.

password - The password that should be used or null if no password is necessary.

Returns:

The created Workbook

Throws:

java.io.IOException - if an error occurs while reading the data

InvalidFormatException - if the contents of the file cannot be parsed into a Workbook

EncryptedDocumentException - If the wrong password is given for a protected file

EmptyFileException - If an empty stream is given

create

public static Workbook create(java.io.File file)
                       throws java.io.IOException,
                              InvalidFormatException,
                              EncryptedDocumentException

Creates the appropriate HSSFWorkbook / XSSFWorkbook from
  the given File, which must exist and be readable.

Note that in order to properly release resources the
  Workbook should be closed after use.

Parameters:

file - The file to read data from.

Returns:

The created Workbook

Throws:

java.io.IOException - if an error occurs while reading the data

InvalidFormatException - if the contents of the file cannot be parsed into a Workbook

EncryptedDocumentException - If the workbook given is password protected

create

public static Workbook create(java.io.File file,
              java.lang.String password)
                       throws java.io.IOException,
                              InvalidFormatException,
                              EncryptedDocumentException

Creates the appropriate HSSFWorkbook / XSSFWorkbook from
  the given File, which must exist and be readable, and
  may be password protected

Note that in order to properly release resources the
  Workbook should be closed after use.

Parameters:

file - The file to read data from.

password - The password that should be used or null if no password is necessary.

Returns:

The created Workbook

Throws:

java.io.IOException - if an error occurs while reading the data

InvalidFormatException - if the contents of the file cannot be parsed into a Workbook

EncryptedDocumentException - If the wrong password is given for a protected file

EmptyFileException - If an empty stream is given

create

public static Workbook create(java.io.File file,
              java.lang.String password,
              boolean readOnly)
                       throws java.io.IOException,
                              InvalidFormatException,
                              EncryptedDocumentException

Creates the appropriate HSSFWorkbook / XSSFWorkbook from
  the given File, which must exist and be readable, and
  may be password protected

Note that in order to properly release resources the
  Workbook should be closed after use.

Parameters:

file - The file to read data from.

password - The password that should be used or null if no password is necessary.

readOnly - If the Workbook should be opened in read-only mode to avoid writing back
        changes when the document is closed.

Returns:

The created Workbook

Throws:

java.io.IOException - if an error occurs while reading the data

InvalidFormatException - if the contents of the file cannot be parsed into a Workbook

EncryptedDocumentException - If the wrong password is given for a protected file

EmptyFileException - If an empty stream is given

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

PREV CLASS

NEXT CLASS

FRAMES

NO FRAMES

All Classes

SUMMARY:

NESTED |

FIELD |

CONSTR |

METHOD

DETAIL:

FIELD |

CONSTR |

METHOD

                Copyright 2016 The Apache Software Foundation or
        its licensors, as applicable.


text:
from __future__ import unicode_literals, division, absolute_import, print_function

from .. import backend
from .._errors import pretty_message
from .._ffi import buffer_from_bytes, bytes_from_buffer
from .._pkcs12 import pkcs12_kdf
from .._types import type_name, byte_cls, int_types

__all__ = [
    'pbkdf2',
    'pkcs12_kdf',
    'rand_bytes',
]

_backend = backend()

if _backend == 'win':
    from ._cng import bcrypt, BcryptConst, handle_error, open_alg_handle, close_alg_handle

    def pbkdf2(hash_algorithm, password, salt, iterations, key_length):
        """
        PBKDF2 from PKCS#5

        :param hash_algorithm:
            The string name of the hash algorithm to use: "sha1", "sha256", "sha384", "sha512"

        :param password:
            A byte string of the password to use an input to the KDF

        :param salt:
            A cryptographic random byte string

        :param iterations:
            The numbers of iterations to use when deriving the key

        :param key_length:
            The length of the desired key in bytes

        :raises:
            ValueError - when any of the parameters contain an invalid value
            TypeError - when any of the parameters are of the wrong type
            OSError - when an error is returned by the OS crypto library

        :return:
            The derived key as a byte string
        """

        if not isinstance(password, byte_cls):
            raise TypeError(pretty_message(
                '''
                password must be a byte string, not %s
                ''',
                type_name(password)
            ))

        if not isinstance(salt, byte_cls):
            raise TypeError(pretty_message(
                '''
                salt must be a byte string, not %s
                ''',
                type_name(salt)
            ))

        if not isinstance(iterations, int_types):
            raise TypeError(pretty_message(
                '''
                iterations must be an integer, not %s
                ''',
                type_name(iterations)
            ))

        if iterations < 1:
            raise ValueError('iterations must be greater than 0')

        if not isinstance(key_length, int_types):
            raise TypeError(pretty_message(
                '''
                key_length must be an integer, not %s
                ''',
                type_name(key_length)
            ))

        if key_length < 1:
            raise ValueError('key_length must be greater than 0')

        if hash_algorithm not in set(['sha1', 'sha256', 'sha384', 'sha512']):
            raise ValueError(pretty_message(
                '''
                hash_algorithm must be one of "sha1", "sha256", "sha384", "sha512",
                not %s
                ''',
                repr(hash_algorithm)
            ))

        alg_constant = {
            'sha1': BcryptConst.BCRYPT_SHA1_ALGORITHM,
            'sha256': BcryptConst.BCRYPT_SHA256_ALGORITHM,
            'sha384': BcryptConst.BCRYPT_SHA384_ALGORITHM,
            'sha512': BcryptConst.BCRYPT_SHA512_ALGORITHM
        }[hash_algorithm]

        alg_handle = None

        try:
            alg_handle = open_alg_handle(alg_constant, BcryptConst.BCRYPT_ALG_HANDLE_HMAC_FLAG)

            output_buffer = buffer_from_bytes(key_length)
            res = bcrypt.BCryptDeriveKeyPBKDF2(
                alg_handle,
                password,
                len(password),
                salt,
                len(salt),
                iterations,
                output_buffer,
                key_length,
                0
            )
            handle_error(res)

            return bytes_from_buffer(output_buffer)
        finally:
            if alg_handle:
                close_alg_handle(alg_handle)

    pbkdf2.pure_python = False

    def rand_bytes(length):
        """
        Returns a number of random bytes suitable for cryptographic purposes

        :param length:
            The desired number of bytes

        :raises:
            ValueError - when any of the parameters contain an invalid value
            TypeError - when any of the parameters are of the wrong type
            OSError - when an error is returned by the OS crypto library

        :return:
            A byte string
        """

        if not isinstance(length, int_types):
            raise TypeError(pretty_message(
                '''
                length must be an integer, not %s
                ''',
                type_name(length)
            ))

        if length < 1:
            raise ValueError('length must be greater than 0')

        if length > 1024:
            raise ValueError('length must not be greater than 1024')

        alg_handle = None

        try:
            alg_handle = open_alg_handle(BcryptConst.BCRYPT_RNG_ALGORITHM)
            buffer = buffer_from_bytes(length)

            res = bcrypt.BCryptGenRandom(alg_handle, buffer, length, 0)
            handle_error(res)

            return bytes_from_buffer(buffer)

        finally:
            if alg_handle:
                close_alg_handle(alg_handle)

# winlegacy backend
else:
    from .._pkcs5 import pbkdf2
    from .._rand import rand_bytes


text: netstat -s | grep -i 'connection resets received$' | awk '{ print $1 }'


text:
@implementation SVGKit : NSObject

+ (void) enableLogging {
    [DDLog addLogger:[DDASLLogger sharedInstance]];
    [DDLog addLogger:[DDTTYLogger sharedInstance]];
}

@end


text:
#include <linux/kernel.h>
#include <linux/bootmem.h>
#include <linux/slab.h>
#include <linux/stat.h>
#include <linux/module.h>
#include <linux/uaccess.h>
#include <linux/proc_fs.h>

#include <mach/sec_debug.h>
#include <asm/mach/map.h>
#include <asm/tlbflush.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#ifdef CONFIG_SEC_LOG_LAST_KMSG
#include <linux/proc_fs.h>
#endif

/*
 * Example usage: sec_log=256K@0x45000000
 * In above case, log_buf size is 256KB and its base address is
 * 0x45000000 physically. Actually, *(int *)(base - 8) is log_magic and
 * *(int *)(base - 4) is log_ptr. So we reserve (size + 8) bytes from
 * (base - 8).
 */
#define LOG_MAGIC 0x4d474f4c	/* "LOGM" */
#define RAM_CONSOLE_SIG 0x43474244 /* match in bootloader for panic display*/
//extern void register_log_char_hook(void (*f) (char c));

/* These variables are also protected by logbuf_lock */
static unsigned *sec_log_ptr;
static char *sec_log_buf;
static unsigned sec_log_size;

struct sec_log_buffer *sec_log_buffer;

#ifdef CONFIG_SEC_LOG_LAST_KMSG
static char *last_kmsg_buffer;
static unsigned last_kmsg_size;
static void __init sec_log_save_old(void);
#else
static inline void sec_log_save_old(void)
{
}
#endif

extern void register_log_text_hook(void (*f)(char *text, size_t size),
	char *buf, unsigned *position, size_t bufsize);

static inline void emit_sec_log(char *text, size_t size)
{
	if (sec_log_buf && sec_log_ptr) {

		size_t pos = 0;

		*sec_log_ptr = *sec_log_ptr & (sec_log_size - 1);
		pos = *sec_log_ptr;

		if (likely(size + pos <= sec_log_size))
			memcpy(&sec_log_buf[pos], text, size);
		else {
			size_t first = sec_log_size - pos;
			size_t second = size - first;
			memcpy(&sec_log_buf[pos], text, first);
			memcpy(&sec_log_buf[0], text + first, second);
		}
		(*sec_log_ptr) += size;

		*sec_log_ptr = *sec_log_ptr & (sec_log_size - 1); //Pointer boundary checking and updated new pointer
														  // so that "sec_log_buffer->start" points to within boundary area
		sec_log_buffer->start = *sec_log_ptr;			  // Update start pointer for panic display
		sec_log_buffer->size += size;					  // Updated size based on print parameters
		sec_log_buffer->size = sec_log_buffer->size < sec_log_size ? sec_log_buffer->size : sec_log_size; // Boundary checking

	}
}

static int __init sec_log_setup(char *str)
{
	unsigned size = memparse(str, &str);
	unsigned long base = 0;
	unsigned *sec_log_mag;
	unsigned size_of_log_ptr = sizeof(*sec_log_mag);
	unsigned size_of_log_mag = sizeof(*sec_log_ptr);
	unsigned size_struct_sec_log_buffer = sizeof(struct sec_log_buffer);
	unsigned total_size_for_sec_log = 0;

	/* Round-up to 4 byte alignment */
	size_struct_sec_log_buffer = (((size_struct_sec_log_buffer + 4) / 4)
									  * 4);
	pr_info("%s: size_of_log_ptr:%d size_of_log_mag:%d"
		"size_struct_sec_log_buffer:%d\n",
		__func__, size_of_log_ptr, size_of_log_mag,
					size_struct_sec_log_buffer);

	/* If we encounter any problem parsing str ... */
	if (!size || size != roundup_pow_of_two(size) || *str != '@'
	    || kstrtoul(str + 1, 0, &base))
		goto out;

	total_size_for_sec_log = size + size_of_log_ptr +
				size_of_log_mag + size_struct_sec_log_buffer;

	if (reserve_bootmem(base, total_size_for_sec_log, BOOTMEM_EXCLUSIVE)) {
		pr_err("%s: failed reserving size %lu + %lu "
		       "at base 0x%lx\n",
		       __func__, (unsigned long)(size >> 20),(unsigned long)
					(total_size_for_sec_log - size), base);
		goto out;
	} else {
		pr_err("%s: Success reserving size %ldMB + %lu "
		       "at base 0x%lx\n",
		       __func__, (unsigned long)(size >> 20),(unsigned long)
					(total_size_for_sec_log - size), base);
	}

	/**********************************************************************
	 ___________________
	|   sec_log_buffer  |   16 bytes,4 byte aligned sec_log_buffer struct
	|___________________|
	|                   |
	|   sec_log_buf     |	1 MB, sec log buffer
	|                   |
	|___________________|
	|   sec_log_ptr	    |	4 bytes,which holds the index of sec_log_buf[]
	|___________________|
	|   sec_log_mag     |	4 bytes, which holds the magic address
	|___________________|

	***********************************************************************/

	sec_log_mag = phys_to_virt(base) + size_struct_sec_log_buffer +
							size + size_of_log_ptr;
	sec_log_ptr = phys_to_virt(base) + size_struct_sec_log_buffer + size;
	sec_log_buffer = phys_to_virt(base);
	sec_log_buf = phys_to_virt(base) + size_struct_sec_log_buffer;
	sec_log_size = size;

	pr_info("%s: Addresses: struct sec_log_buffer:%p sec_log_buf:%p"
		"sec_log_ptr:%p sec_log_mag:%p\n",
		__func__, sec_log_buffer, sec_log_buf, sec_log_ptr,
		sec_log_mag);

	pr_info("%s: *sec_log_mag:%x *sec_log_ptr:%x "
		"sec_log_buf:%p sec_log_size:%d\n",
		__func__, *sec_log_mag, *sec_log_ptr, sec_log_buf,
		sec_log_size);

	if (*sec_log_mag != LOG_MAGIC) {
		pr_info("%s: no old log found\n", __func__);
		*sec_log_ptr = 0;
		*sec_log_mag = LOG_MAGIC;
	} else {
		if (*sec_log_ptr)
			sec_log_save_old();
		else
			pr_err("%s: unlikely *sec_log_ptr is zero, skip sec_log_save_old\n", __func__);
	}

	sec_log_buffer->sig = RAM_CONSOLE_SIG;
	sec_log_buffer->size = 0;
	sec_log_buffer->start = *sec_log_ptr;

	register_log_text_hook(emit_sec_log, sec_log_buf, sec_log_ptr,
		sec_log_size);

	sec_getlog_supply_kloginfo(sec_log_buf );

out:
	return 0;
}
__setup("sec_log=", sec_log_setup);

#ifdef CONFIG_SEC_LOG_LAST_KMSG
static void __init sec_log_save_old(void)
{
	/* provide previous log as last_kmsg */
	last_kmsg_size =
	    min((unsigned)(1 << CONFIG_LOG_BUF_SHIFT), *sec_log_ptr);
	last_kmsg_buffer = (char *)alloc_bootmem(last_kmsg_size);

	if (last_kmsg_size && last_kmsg_buffer) {
		unsigned i;
		for (i = 0; i < last_kmsg_size; i++)
			last_kmsg_buffer[i] =
			    sec_log_buf[(*sec_log_ptr - last_kmsg_size +
					 i) & (sec_log_size - 1)];

		pr_info("%s: saved old log at %d@%p\n",
			__func__, last_kmsg_size, last_kmsg_buffer);
	} else
		pr_err("%s: failed saving old log %d@%p\n",
		       __func__, last_kmsg_size, last_kmsg_buffer);
}

static ssize_t sec_log_read_old(struct file *file, char __user *buf,
				size_t len, loff_t *offset)
{
	loff_t pos = *offset;
	ssize_t count;

	if (pos >= last_kmsg_size)
		return 0;

	count = min(len, (size_t) (last_kmsg_size - pos));
	if (copy_to_user(buf, last_kmsg_buffer + pos, count))
		return -EFAULT;

	*offset += count;
	return count;
}

static const struct file_operations last_kmsg_file_ops = {
	.owner = THIS_MODULE,
	.read = sec_log_read_old,
};

static int __init sec_log_late_init(void)
{
	struct proc_dir_entry *entry;

	if (last_kmsg_buffer == NULL)
		return 0;

	entry = proc_create("last_kmsg", S_IFREG | S_IRUGO,
			NULL, &last_kmsg_file_ops);
	if (!entry) {
		pr_err("%s: failed to create proc entry\n", __func__);
		return 0;
	}

	//entry->size = last_kmsg_size;
	proc_set_size(entry, last_kmsg_size);
	return 0;
}

late_initcall(sec_log_late_init);
#endif