... tool, and macros within Visual Studio; it is also
extensible.
Visual Studio2010
Professional Edition
Expands on VisualStudio Standard Edition with additional integration to SQL
Server and ... 44 3
LINQ to Entities 44 3
The ObjectContext 44 5
Mapping Objects to Entities 44 6
Simple Mapping 44 6
Using a Single Table for Multiple Objects 44 8
Using Multiple Tables for an Object 45 0
Generating the ... Function 3 14
www.it-ebooks.info
CONTENTS
xxix
PART V: LIBRARIES AND SPECIALIZED TOPICS
CHAPTER 25: VISUALSTUDIO TOOLS FOR OFFICE 843
Examining the VSTO Releases 844
Oce Automation versus VSTO 844
PIA-Free...
... called Web_ADONETDS in
either Visual Basic or C#. Note, you need to use the .NET Framework 3.5 SP1 along with VisualStudio
2008 SP1 or the .NET Framework 4 with VisualStudio2010 for this ... for users of Visual
Studio 2008 (often referred to by the ASP .NET team as an out-of-band [OOB] release), it has been
folded into .NET Framework 4and it’s built into VisualStudio2010 out of ... anything special to wire up the event handler to catch the event —
Expression Blend andVisualStudio take care of that for you.
PROFESSIONAL ASP .NET 4
44
After you have your custom implementation...
... debugger) X
Test management X
What Is .NET 4. 0 and VS2010 All About?
VS2010 and .NET 4. 0 lay the foundations for the next epoch of .NET development and correct a number
of omissions. I consider ... 1
1
Introduction
These are exciting times to be a .NET developer, andVisualStudio2010 (VS2010) and the .NET 4. 0
framework have brought a bewildering number of changes. But fear ... about .NET andVisualStudio is the teams themselves and their openness
to the community. Sure, they keep certain things hidden and have private betas, but much of what they
do is public and open...
... of file such as C#, VB, and XML, and is much quicker
and easier to navigate than previous search methods.
CHAPTER 2 VISUALSTUDIO IDE AND MEF
13
Figure 2 -4. VS2010 contains environmental ... function and select Generate Sequence Diagram.
CHAPTER 2
9
Visual Studio IDE and MEF
This release of VisualStudio sees the IDE overhauled and much of it rewritten using WPF and managed ...
CHAPTER 2 VISUALSTUDIO IDE AND MEF
10
Figure 2-1. VS2010 allows you to drag windows outside the IDE.
Improved Multitargeting Support
When a new version of Visual Studio/ .NET framework...
...
CHAPTER 2 VISUALSTUDIO IDE AND MEF
26
Before you can perform any of these customizations, however, you will first need to download and
install the VisualStudio SDK.
Extensions in VS2010 make ... loads Visual
Studio extensions. When VisualStudio first loads, it examines the extensions directory and loads
available extensions. Let’s now look into how these extensions are created.
Visual ... metadata is slightly different and that you must instead use the
Part.ExportDefinitions property.
What’s This All Got to Do with VisualStudio Extensibility?
Visual Studio utilizes MEF in an almost...
... crazy and tell VisualStudio to rotate the text editor 245 degrees. Open
MarginFactory.cs and add the following using statement:
using System.Windows.Media;
CHAPTER 2 VISUALSTUDIO IDE AND ... CHAPTER 2 VISUALSTUDIO IDE AND MEF
37
Dotfuscator Changes
Dotfuscator is a post-build .NET hardening and instrumentation platform for protecting, measuring and
managing .NET applications. ... of VisualStudio after VS2010.
Visual Studio Shell
It is worth noting that from VS2008 Microsoft opened up the ability to make use of the IDE for your own
applications. This is called the Visual...
... an example from Scott Hansleman’s blog (www.hanselman.
com/blog/CLRAndDLRAndBCLOhMyWhirlwindTourAroundNET4AndVisualStudio2010Beta1.aspx).
... VS2010 to stop VisualStudio generating PIA files simply set
the Embed Interop Types property to True in Solution Explorer.
Variance
Variance has changed in .NET 4. 0. At the 2008 PDC Anders ... changed in .NET 4. 0:
• You can now mark parameters in generic interfaces and delegates with the out
keyword to make them covariant, and with the in keyword to make them
contravariant (In and Out...
... VS2010 to stop VisualStudio generating PIA files simply set
the Embed Interop Types property to True in Solution Explorer.
Variance
Variance has changed in .NET 4. 0. At the 2008 PDC Anders ... advances.Utilize other dynamic
languages and their libraries.
• Utilize other dynamic languages and their libraries from C# and VB .NET.
• Introduce customization/scripting and debugging/querying functionality ... http://blogs.msdn.com/charlie/archive/2008/10/28/linq-farm-covariance -and-
contravariance-in -visual- studio- 2010. aspx
• http://blogs.msdn.com/ericlippert/archive/tags/Covariance +and+ Contravariance/
default.aspx
• Skeet,...
...
values and a method:
CHAPTER 3 LANGUAGE AND DYNAMIC CHANGES
54
using System.Dynamic
dynamic MyExpando = new ExpandoObject();
MyExpando.Value1 = "new value 1";
MyExpando.Value2 ... this shortly).
System.Dynamic.ExpandoObject
ExpandoObject is a strange new beast in the .NET Framework that allows you to add and remove
properties, methods, and events at runtime. The following ...
MyExpando.DoSomething = new Action(() => Console.WriteLine("DoSomething called"));
Console.WriteLine(MyExpando.Value1);
MyExpando.DoSomething();
Console.ReadKey();
ExpandoObject...
...
Binders resolve classes from dynamic dispatch. .NET 4. 0 currently supports the following binder types:
• Object Binder .NET (uses Reflection and resolved our earlier example to type string) ... Dispatch is the air traffic control center of the DLR, and is responsible for working out what to
do with dynamic objects and operations and sending them to the appropriate binder that takes ... functionality and sits just above
the core .NET framework. The DLR’s job is basically to resolve calls to dynamic objects, cache dynamic
calls making them as quick as possible, and enable interaction...
... for .NET
4. 0 is currently on its way (http://csharpindepth.com/).
I spoke to Jon about his thoughts on C# 2010.
What Do You See as the Top Feature(s) in C #2010, and Why?
Named arguments and ... into Python and the Python Essential
Reference.
F#
F# is a functional programming language for the .NET framework that was previously available as a
separate download to VisualStudio but ... Python code that is evaluated immediately and the
result returned. It is a powerful tool for exploring assemblies and learning how to use new frameworks
and classes by working with live objects....
...
CHAPTER 4 CLR AND BCL CHANGES
72
Garbage Collection in .NET 4. 0
So what’s changed then? Prior to .NET 4. 0, a concurrent workstation GC could do most but not all of a
generation 0 and 1 ...
com/ukadc/archive/2009/10/13/background -and- foreground-gc-in -net- 4. aspx and http://channel9.
msdn.com/shows/Going+Deep/Maoni-Stephens -and- Andrew-Pardoe-CLR -4- Inside-Background-GC/.
GC.RegisterForFullGCNotification() ... runtime (CLR) in .NET 4. 0 that
cover changes to security, garbage collection, threading, and internationalization. You will then look
into the new types introduced in .NET 4. 0 and the enhancements...
... section.
Monitoring and Profiling
.NET 4. 0 introduces a number of enhancements that enable you to monitor, debug, and handle
exceptions:
• .NET 4. 0 allows you to obtain CPU and memory usage per ...
CHAPTER 4 CLR AND BCL CHANGES
72
Garbage Collection in .NET 4. 0
So what’s changed then? Prior to .NET 4. 0, a concurrent workstation GC could do most but not all of a
generation 0 and 1 ...
com/ukadc/archive/2009/10/13/background -and- foreground-gc-in -net- 4. aspx and http://channel9.
msdn.com/shows/Going+Deep/Maoni-Stephens -and- Andrew-Pardoe-CLR -4- Inside-Background-GC/.
GC.RegisterForFullGCNotification()...
...
BigInteger bigIntFromDouble = new BigInteger (45 645 645 645 42332);
BigInteger assignedFromDouble = (BigInteger) 45 645 645 645 42332;
BigInteger has a number of useful (and self-explanatory) methods not found ...
CHAPTER 4 CLR AND BCL CHANGES
78
New Types
Now that the lowdown changes are out of the way, lets look at some of the new types in .NET 4. 0 and
modifications to existing classes and methods. ... F#.
Changes to Existing Functionality
.NET 4. 0 enhances a number of existing commonly used methods and classes.
Action and Func Delegates
Action and Func delegates now can accept up to 16...
... CHAPTER 4 CLR AND BCL CHANGES
84
String.Concat() and String.Join() support IEnumerable<T>
New overloads allow the concatenation and joining of IEnumerable elements ...
msdn.com/blogfiles/ncl/WindowsLiveWriter/NewNCLFeaturesin .NET4 .0Beta2_78A0/image_2.png.
CHAPTER 4 CLR AND BCL CHANGES
83
var key = instance.CreateSubKey(subkey, RegistryKeyPermissionCheck.Default,
RegistryOptions.Volatile);
In 64- bit ... pattern.
Network Class Libraries (NCLs)
All classes in the System .Net namespace have improved stability and performance. Standards compliance
has been improved for FTP, HTTP, SMTP, and URIs...