Microsoft All-In-One Code Framework 25th January, 2010 updates. Download:
If this is the first time you heard about All-In-One Code Framework(AIO) project, please refer to the relevant introduction on our homepage: http://cfx.codeplex.com/
In this release, we added more new samples on Azure .
Azure New Samples
This sample provides a handy working project that hosts WCF in a Worker Role.
This solution contains three projects:
1. Client project. It’s the client application that consumes WCF service.
2. CloudService project. It’s a common Cloud Service that has one Worker Role.
3. CSWorkerRoleHostingWCF project. It’s the key project in the solution, which demonstrates
how to host WCF in a Worker Role.
Two endpoints are exposed from the WCF service in CSWorkerRoleHostingWCF project:
1. A metadata endpoint
2. A service endpoint for MyService service contract
Both endpoints uses TCP bindings.
This sample demonstrates how to run a WCF Workflow Service on Windows Azure. It uses Visual Studio 2008 and WF 3.5.
While currently Windows Azure platform AppFabric does not contain a Workflow Service component, you can run WCF Workflow Services directly in a Windows Azure Web Role. By default, a Web Role runs under full trust, so it supports the workflow environment.
The workflow in this sample contains a single ReceiveActivity. It compares the service operation’s parameter’s value with 20, and returns “You’ve entered a small value.” and “You’ve entered a large value.”, respectively. The client application invokes the Workflow Service twice, passing a value less than 20, and a value greater than 20, respectively.
This sample demonstrates how to expose an on-premises WCF Workflow Service to the Internet and cloud using Windows Azure platform Service Bus. It uses Visual Studio 2010 Beta 2 and WF 4.
While the current version Windows Azure platform AppFabric is compiled against .NET 3.5, you can use the assemblies in a .NET4 project.
The workflow in this sample uses the standard ReceiveRequest/SendResponse architecture introduced in WF 4. It compares the service operation’s parameter’s value with 20, and returns “You’ve entered a small value.” and “You’ve entered a large value.”, respectively. The client application invokes the Workflow Service twice, passing a value less than 20, and a value greater than 20, respectively.
Silverlight New Sample
Silverlight provide Socket API, which give the great flexibility for Silverlight network programming. This sample shows how to use Socket in Silverlight to communicate with socket server. One step further, the sample encapsulated the socket object and provide helper methods for transferring string type message over socket.
Due to the Silverlight security consideration, before Silverlight connecting to socket server, client will first connect to server 943 port to acquire cross domain policy file and determine if access is permitted. This sample demonstrate how to create a Silverlight accessible socket server.
VSX New Samples
This sample demonstrates how to subscribe to the shell command executing and how to change the menu item’s caption dynamically.
The EnvDTE Automation has provided CommandEvents interface to represent the specific command events in the shell. The DTE.Events.get_CommandEvents() method gives the way to get the specific command events, then you could add your personal actions before/after the command executing.
To change the text of menu item in AddIn, you need to get the CommandBar which contains the menu item controls firstly, then use CommandBarControl.Caption property to specify the caption of menu item.
This sample shows how to use custom WIT control in Work Item UI of Visual Studio. This control can open another Work Item in VS IDE, like the feature of Work Item Link
This sample demonstrate how to use the Visual Studio Integration Package Wizard to create a simple VSPackage and automatically load all the ToolboxItem items provided by its own assembly.
Security New Samples
CppUACSelfElevation, CSUACSelfElevation, VBUACSelfElevation
User Account Control (UAC) is a new security component in Windows Vista and newer operating systems. With UAC fully enabled, interactive administrators normally run with least user privileges. This example demonstrates how to check the privilege level of the current process, and how to self-elevate the process by giving explicit consent with the Consent UI.
WPF New Samples
This Sample demonstrates how to monitor Windows clipboard changes in a WPF application.
Office New Samples
This sample demonstrates how to build a Outlook 2007 look&feel Form Region.
In Visual Studio 2008 we could easily import a pre-designed Outlook form region through the New Outlook Form Region wizard.
After importing, we could directly access the controls of the Outlook Form Region from code behind file, thus, it is not hard if we need to subscribe the events of any controls on it.
To play with the sample, just run the project and you’ll find a new button is created on the Outlook main explorer which with the text of “Create A Custom Item”, if you click on the button, it’ll show you the imported form region.
Winbase New Samples
CSCheckOSBitness, VBCheckOSBitness, CppCheckOSBitness
The code sample demonstrates how to determine whether the operating system of
the current machine or any remote machine is a 64-bit operating system.
Data Platform New Samples
These two samples illustrate how to use one of the EF4 new features, Code Only, to create the EDM metadata and the corresponding .edmx file with POCO entity classes during runtime. They also demonstrate some basic insert and query operations to test the EDM metadata generated by Code Only.
Workflow New Samples
This sample demonstrate the usage of WF4 FlowChart in a Guess Number Game workflow. this sample will also involves the usage of FlowDecision activity.
If you have any suggestion and feedback about our All-In-One Code Framework, please feel free to let us know here. Thanks!