Essential Community Services Templates
Got some quality time with Whidbey on the weekend and came across some of the new enterprise template stuff - man these things have incredible designer integration.
I started by creating a "Traffic System Controller Service" and adding it to a new blank "Essential Community Services Template" project. I then dragged on a Community component and named it: "Los Angles" (Note: You have to manully set the CommunityToControlType to "LargeUrban"; this is a beta glitch and should be sorted out by the time the product goes into release candidate.)
I also had to set the startup permissions to "Administrator" so that I could get it to run in my debugger - I think that this is also a beta issue.
Finally, deploying the solution is a no-brainer. You will need to get a username/password to CitySiteServiceServer (CSSS) for the city or organisation that you are deploying to. These credentials are included in a license file stored in the new \Community folder and gets compiled into your assembly along with your strong named key at compile time.
To test my project I deployed to the Microsoft CSSS testing server and gave it some startup code:
protected void override OnStart() { base.OnStart() ; ICityService cityService = new LATrafficController() ; List<Traffic> t = Traffic.GetTraffic( Traffic.AllInboundAndOutbound, true ) ; this.Targets = t ; }
If you are running the beta of Community Testbed 2.0 you will immediately see a panoramic view of the randomized traffic patterns being controlled by your controller project.