Framework Design Guidelines: LINQ

Wow, it feels like old times…  I am happy that we are posting a new proposal for additions to the framework design guidelines.  Mitch has worked hard on these, and we have reviewed them internally and now it is time for your comments.   Please do chime in! LINQ Framework Design Guidelines   Thanks!

6

Design Guideline Update: handling nulls in public APIs

We had a recent thread internally that resulted in me updating the guidelines below… Please let me know if you have any questions or comments. Do provide overloads for methods with optional arguments.  If a method takes some arguments that are not required provide overloads of the method without the optional arguments.  See section X.Y…

12

Design Guideline update: put cleanup code in finally blocks

Another new guideline.. this one sparked a lot of discussion during our internal review, lets see if I cleaned it up well enough or not 😉                             Do put cleanup code in finally blocks.Even code that immediately follows a catch() can be interrupted by an asynchronous exceptions (an exception caused by another…

15

New Design Guideline: Parameter validation

More guideline updates from the Security push (as Soma said earlier this year, the push is now upon us!)   Do be aware that mutable values may have changed after they were validated.  If the operation is security sensitive you are encouraged to make a copy, then validate and process the argument.The following sample code…

8

New Design Guideline: Null Paramarrays

Based on some security reviews we are doing on the system in general I added this implementation note to the Design Guidelines.       Do be aware that null could be passed in for the paramarray.  You should validate that that paramarray is not null before processing (see section on parameter passing for more infomration)….

6

New Design Guideline: Avoid Protected Static

Here is a minor update to the design guidelines around subclassing.  It is based on this quiz I did a last week. Please let me know if you have any questions or comments.   As always, you can check out the base design guidelines and my incremental updates.     Avoid Protected Statics.   Carefully consider what…

19

New Design Guideline: Virtual Members

As you might guess from my last few posts, I have been doing some thinking about virtual members.  Here are the updated guidelines.    Please let me know if you have any questions or comments.   As always, you can check out the base design guidelines and my incremental updates.     Do not call virtual members…

16

New API Design Guideline: Enums

There are a few topics that are likely to generate a long thread of discussion whenever they come up Exceptions, finalization, and Enums are among them    Kit George spent a fair amount of time working with folks across WinFX on how to “correctly” use Enums.  There is of course, more to say here, but I…

5

New Design Guidelines Posted: Resources and Xml

If you have not been tracking Kris’s blog, you might have missed that we recently posted two new design guidelines for Framework developers.  As always comments are very welcome, even encouraged.    Exposing XML Data Resources     Please see the design guidelines and other incremental updates.

1