Register Login

 

Welcome to the Coach Factor blog. Here you will find all of our ideas on software development. Subscribe at http://blog.nventive.net.

# Thursday, September 25, 2008

nVentive will be presenting it's "Top 10 Umbrellas" talk at the Ottawa.NET Community on Thursday, November 5th. Come and hear us talk about Umbrella and how the ideas within can save you development time.

Thursday, September 25, 2008 12:02:22 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
.net | Announcement | Umbrella
# Monday, September 22, 2008

One of the nice things of the latest versions of .net, is the ObservableCollection<T>. This class implements the new INotifyCollectionChanged interface (similar to INotifyPropertyChanged that we all know). Here is a small code example:

    1         [TestMethod]

    2         public void ObservingAReadOnlyObservableCollectionSucceeds()

    3         {

    4             //setup original collection with some initial content;

    5             ObservableCollection<string> strings = new ObservableCollection<string>();

    6             strings.Add("string1");

    7             strings.Add("string2");

    8 

    9             //setup readonly collection

   10             ReadOnlyObservableCollection<string> readOnlyStrings = new ReadOnlyObservableCollection<string>(strings);

   11             int addedElementsWhileObservingReadOnlyCollection = 0;

   12 

   13             //setup observer

   14             (readOnlyStrings as INotifyCollectionChanged).CollectionChanged += delegate(object sender, NotifyCollectionChangedEventArgs e)

   15                     {

   16                         if (e.Action == NotifyCollectionChangedAction.Add)

   17                         {

   18                             addedElementsWhileObservingReadOnlyCollection += e.NewItems.Count;

   19                         }

   20                     };

   21 

   22             //add one item, addign should be observed

   23             strings.Add("addedString");

   24 

   25             //assert

   26             Assert.AreEqual(3, readOnlyStrings.Count);

   27             Assert.AreEqual(1, addedElementsWhileObservingReadOnlyCollection);

   28         }

Notice the usage of ReadOnlyObservableCollection<T>, which can be used when you don't want someone to alter the contents of a collection.

These are the problems we see with all this new goodness:

  1. These types reside in the WindowsBase.DLL assembly with weird innapropriate namespaces.
  2. ReadOnlyObservableCollection<T> and ObservableCollection<T> implement INotifyPropertyChanged explicitly, meaning you have to cast to INotifyPropertyChanged to be able to use notifications.
Monday, September 22, 2008 5:48:40 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
.net
# Friday, September 19, 2008

nVentive will be sponsoring the Montreal .NET community, it's our way of promoting this great group. They offer many meetings per month where great subjects are featured. It's one of our ways of offering coaching and guidance to the Montreal community.

Friday, September 19, 2008 1:22:06 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
.net | Announcement
# Thursday, September 11, 2008

For the second time this year, nVentive will be presenting at DevTeach, happening in our home town of Montreal from December 1st to the 5th. Come and catch us talk about agility in our "Done Done" conversation, or about hard core programming in our "Top 10 Umbrellas" talk.

Thursday, September 11, 2008 2:05:35 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
Announcement | Umbrella
# Tuesday, September 09, 2008

nVentive will be presenting some cool material at the new Microsoft TechDays conference in Montreal on November 6th and 7th. Be sure to be there as the subjects are the latest and will surely help you increae your team's software developement velocity.

Tuesday, September 09, 2008 3:51:52 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
.net | Announcement
# Wednesday, September 03, 2008

Well, such a nice tool was bound to be aquired by a company. Reflector has been acquired by Red-Gate software. You can find Reflector at http://reflector.red-gate.com.

Speaking of Reflector though, did you know there were over 30 plugins available ?

On the subject of plugins, the excellent TestDriven.net addin for Visual Studio will add a few context menu item for running your tests, but will also add one that allows you to jump back to Reflector. Isn't it nice when all these tools play nice together ?

Wednesday, September 03, 2008 2:27:09 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
.net
Search
Archive
<September 2008>
SunMonTueWedThuFriSat
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011
Statistics
Total Posts: 41
This Year: 41
This Month: 3
This Week: 0
Comments: 2
Sign In