Microsoft All-In-One Code Framework New Samples Updated on 2010-09-06

Microsoft All-In-One Code Framework delineates the framework and skeleton of Microsoft development techniques through typical sample codes in three popular programming languages (Visual C#, VB.NET, Visual C++). Each sample is elaborately selected, composed, and documented.

Microsoft All-In-One Code Framework is updated on 2010-09-06.

Download address: http://1code.codeplex.com/releases/view/51868

If it’s the first time that you hear about Microsoft All-In-One Code Framework, please read the introduction on our homepage http://1code.codeplex.com/

If you are looking a useful .NET samples with good documentation you undoubtedly must install this one.

All samples you can find hereAll-In-One Code Framework Sample Catalog.

In this release following samples were added:

Azure New Samples:

CSAzureWCFWorkerRole, VBAzureWCFWorkerRole

This sample provides a handy working project that hosts WCF in a Worker Role.

CSAZWorkflowService35, VBAZWorkflowService35

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.

CSAZWorkflow4ServiceBus, VBAZWorkflow4ServiceBus

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:

CSSL3SocketClient, VBSL3SocketClient

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.

CSSL3SocketServer, VBSL3SocketServerc

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

CSVSAddInCommandEvents

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.

CSTFSCustomWorkItemControl

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

CSVSPackageToolbox

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

CSWPFClipboardViewer VBWPFClipboardViewer

This Sample demonstrates how to monitor Windows clipboard changes in a WPF application.

Office New Samples

CSOutlookImportedFormRegion, VBOutlookImportedFormRegion

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

CSEFCodeOnly, VBEFCodeOnly

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

CSWF4FlowChart, CSWF4SequenceWF

This sample demonstrate the usage of WF4 FlowChart in a Guess Number Game workflow. this sample will also involves the usage of FlowDecision activity.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s