I've been reading Charlie Calvert's blog, and his list of LINQ providers, and watching both the Lightspeed and LLBLGen Pro LINQ beta's with interest.
There's an available product that you can buy - the CHI69 "Computer Human Interface" - I have written a LINQ provider over the API provided within the supplied SDK.
Download the beta LINQ to Spouse provider here.
Connect to the CHI69 device, and read in the environment:
// Open environmental interfaceEnvironment environment = CHIConnector.Connect<Environment>();
// Open environmental interface
Build the representation of the user:
// Open self-representationHusband me = CHIConnector.Self<Husband>();
// Open self-representation
The device allows querying the local environment for objects of different types using LINQ:
// Search all available for a girlfriendvar prospects = CHIConnector.AllAvailable<Girlfriend>(); Girlfriend girlfriend = (from prospect in prospectswhere (prospect.Husband == null || prospect.MaritalStatus == MaritalStatus.Rocky)&&prospect.IsCompatibleWith(me)select prospect).First();
// Search all available for a girlfriend
Girlfriend
(from prospect in prospectswhere (prospect.Husband == null || prospect.MaritalStatus == MaritalStatus.Rocky)&&prospect.IsCompatibleWith(me)select prospect).First();
Peform some realistic actions with returned objects:
Thread.Sleep(69);
Thread
The library exposes a rich interface:
// Test marriage criteria if (me.Mood == Mood.Romantic && environment.Lighting <= Lighting.Flattering && girlfriend.Emotions.Contains(Emotion.Desperate)){ // Note the downcast. Some functionality will become unavailableme.Wife = (Wife)girlfriend; }
// Test marriage criteria
if
// Note the downcast. Some functionality will become unavailableme.Wife = (Wife)girlfriend;
}
So go ahead and test the library and provider. I'm interested in any feedback you can give.
Some notes:
Remember Me
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.