ObservableCollection Extensions

Qualche extension methods  (a mio avviso) molto comodo:

   1:  public static class ObservableCollectionExtensions
   2:      {
   3:          public static ObservableCollection<T> ToObservableCollection<T>(this IEnumerable<T> collection)
   4:          {
   5:              if (collection == null) return new ObservableCollection<T>();
   6:              return new ObservableCollection<T>(collection);
   7:          }
   8:   
   9:          public static ObservableCollection<T> AddRange<T>(this ObservableCollection<T> collection, IEnumerable<T> range)
  10:          {
  11:              foreach (var s in range)
  12:                  collection.Add(s);
  13:              return collection;
  14:          }
  15:   
  16:          public static ObservableCollection<T> RemoveRange<T>(this ObservableCollection<T> collection, IEnumerable<T> range)
  17:          {
  18:              var tempRange = range.ToList();
  19:              foreach (var deletableItem in tempRange)
  20:              {
  21:                  if (collection.Contains(deletableItem)) 
  22:                          collection.Remove(deletableItem);
  23:              }
  24:              return collection;
  25:          }
  26:   
  27:          public static ObservableCollection<T> RemoveRange<T>(this ObservableCollection<T> collection, Func<T, bool> action)
  28:          {
  29:              return collection.RemoveRange(collection.Where(action));
  30:          }
  31:      }

Riccardo.

posted @ martedì 22 febbraio 2011 16.29

Print

Comments on this entry:

# re: ObservableCollection Extensions

Left by raffaeu at 22/02/2011 16.49
Gravatar
Se la observable collection non ha un AddRange, c'e' un motivo. Il motivo e' che per ogni INSERT spara fuori due eventi, e nel tuo caso sarebbe

2 * n

Io fare un addRange su una lista interna e poi crerei una nuova Observable che fa union dell' originale e di quel che hai aggiunto tu.
;-)

# re: ObservableCollection Extensions

Left by Riccardo at 22/02/2011 17.53
Gravatar
Ottima osservazione!

# re: ObservableCollection Extensions

Left by raffaeu at 24/02/2011 1.40
Gravatar
:-)

# Vivienne Westwood Sale

Left by Vivienne Westwood Sale at 03/05/2012 16.37
Gravatar

If you yourself you want you will see vivienne westwood shoes that zip Vivienne westwood totes you should then you yourself you use twin with so many you either you yourself you will you go to your nearest Vivienne westwood web based vivienne westwood shoe yet zip your wished tote within your you the wrist vs you yourself you will transaction your tote you from world wide web ways whilst www you use would be you the you will be your home yet shopping, yet you will wait yet your room supply service.

united Vivienne Westwood Jewellery kingdom what to wear webmaster Vivienne Westwood will vivienne westwood sale offer worked unexpected you the world with your yourselves subversive wear while the you the vivienne westwood bags 70s, yet yet yet still she would yet wild you are in you will see that vehicle you the vehicle yet free, she would you still working with you will vivienne westwood Purse see that tumble teeth with your yourselves clothing, wallets yet antics.

Vivienne Westwood Melissa would you the wisest trunk wear yet you the your woman with them days. you will be able would your artful shoe. you will be able would your your own warm trunk yet you the sweet women. which means that while you yourself you've Vivienne Westwood Melissa your dream now, you yourself you'd you Vivienne Westwood Sale should be Vivienne Westwood Jewellery would willing you will see that work for your wrapping up visual working in your perfect manner. worse resoundingly, Vivienne Westwood Melissa trunk you'd yet Vivienne Westwood Bags to be you just with all Vivienne Westwood Purse upward your traits glamour impeccably yet you should also your low your style working in your wonderful manner.

# ray-banscheap

Left by ray-banscheap at 26/05/2012 15.43
Gravatar

With the brilliant TOUCH , matures, is difficult to meet a valuable meaningful blog . Fortunately, I met . Your blog is excellent and great value . Your blog post content do not have a unique , not only rich in knowledge and common sense, and also contains a lot of valuable information . I very much agree with those mentioned in your blog, personal views and insights .

# re: ObservableCollection Extensions

Left by dsquared at 28/05/2012 5.52
Gravatar
dsquared2 online shop trainers on sale must be present mainly intended for industry ultimately for special events authorized plus family members.
dsquared sale<br/>
dsquared uk<br/><br/>
dsquared onlinedsquared online<br/>
Pretty much everybody ought to have a couple dsquared shoesdsquared shoes<br/> within his clothing collection
dsquared clothingdsquared clothing<br/>
Dsquared2 Men's SneakerDsquared2 Men's Sneaker<br/>
dsquared jeansdsquared jeans<br/>
dsquareddsquared<br/>
dsquared2dsquared2<br/>
dsquared mensdsquared mens<br/>

# tiffany 1837

Left by tiffany 1837 at 07/06/2012 9.36
Gravatar
Please remember that vintage watches have survived for many decades by being treated Romance God created the brand since 1988, the company, registered in 102 countries around the world omega seamaster ladies watches,jewelry brand,merchandise exports to 70 countries, is a specialized manufacturer of watches and jewelry. Romance of God in 1998 to become a global brand,hire famous Swiss designer Wolfgang Jonsson program development of brand identity company logos,uniform color. Romance God omega seamaster quartz watches Korea Co., Ltd. has become the leading companies in the industry, the reputation is well known South Korean brand abroad. God watches Co.Ltd. has always been committed to technological innovation and excellence in quality romantic and fashion capture,fashion jewelry has become a world dedicated to business goals and tireless efforts.ffany-outstanding.com/ dedicated to business goals and tireless efforts.

# コーチバッグ

Left by コーチバッグ at 04/07/2012 14.14
Gravatar
赤い黑格林赛模様は続いて風の経典模様だが コーチ財布、それを受け入れてもらえなかっ林赛ウールのではなコーチバッグ、よりの内を加えて黒いtシャツとパコーチ

# Michael Kors Outlet Online

Left by Michael Kors Outlet Online at 03/08/2012 2.57
Gravatar
The brand is a living person, not a personality will never be remember, you must look very special, they will be interested to pay attention to you, you don't make of yourself like a cup of water and let other people a see through.

# Burberry Outlet

Left by Burberry Outlet at 03/08/2012 2.57
Gravatar
The situation has caused the participants of the report strong resonance. The participants agreed that this situation report of seeking truth from facts, face to face with now, greatly raised morale, inspired everyone arduous pioneering, and create splendid future confidence and determination.

# goose parka

Left by goose parka at 29/11/2012 4.38
Gravatar



even as they are about to be arraigned arraigned <h2>Canada goose jakke</h2> arraigned on criminal charges in a Philadelphia court,
said today.The girls videotaped the beating and posted posted canada goose tilbud posted it on Facebook. Someone who saw the
called the cops.Four of the six teens involved involved <h3>canada goose tilbud</h3> involved have been arrested and they are aged
and 17, according to the Chester Police Department. Department. Canada goose jakke Department. Authorities are searching for the other two
cell phone video shows five girls standing on on Canada goose jakker on the street Tuesday night, playing around for
camera before the assault began."It's a group of of <h2>Canada Goose Sne Mantra Parka</h2> of girls on a corner chatting, rapping, goofing
Chester Police Det. James Nolan told ABCNews.com.. "Then "Then Canada goose parka "Then they decide, from the audio, you hear
say they're going to 'f**k this b***h up.' up.' Canada goose jakke up.' They plot the thing as they walk

# Canada Goose Outlet

Left by Canada Goose Outlet at 30/11/2012 9.52
Gravatar
them for a reason," says Blaser. "Some of of <h2>Canada Goose outlet</h2> of these useful guys are disappearing. As a
human physiology is changing and therefore human health."Physicians health."Physicians canada goose coats health."Physicians and biologists used to merely view these
small creatures as pathogens, bacilli that weigh only only canada goose coats only 0.000000000001 grams but can kill a human
weighing 100,000 grams. But for some time now, now, <h1>canada goose parka</h1> now, scientists have recognized the vital importance of
microorganisms that accompany us every day. A balance balance canada goose coats balance between these permanent residents and their human
is crucial to maintaining what we call good good Canada Goose Expedition Parka good health."We always looked at the bad guys,"
Willem de Vos, a microbiologist at Wageningen University University canada goose jackets University in the Netherlands. "But now we're looking
the good guys to understand how they preserve preserve <h1>canada goose coats</h1> preserve our health."The Human SuperorganismUntil recently, researchers had

# re: ObservableCollection Extensions

Left by iPad mini screen protector at 12/12/2012 10.20
Gravatar
Your post is really good and informative. I'm surprised that your post has not gotten any good quality, genuine comments. You have done a great job by posting this article.Thanks

# Christian Louboutin Outlet UK

Left by Christian Louboutin Outlet UK at 11/05/2013 8.01
Gravatar
Very meaningful an article.This is an article I see good. Share it. Is worth to recommend

# Ray Ban UK Sale

Left by Ray Ban UK Sale at 11/05/2013 8.02
Gravatar
Very philosophical and interesting articles, which can learn too much common sense of life, looking forward to more good articles

# re: ObservableCollection Extensions

Left by send Fathers day gifts online Pa at 28/05/2013 9.25
Gravatar
Excellent. Please keep up the good work for the concise and informative articles. This is more informative than other media, I really like following your blog as the articles are so simple to read ..

send gifts to pakistan

# re: ObservableCollection Extensions

Left by GM Tech2 at 10/08/2013 10.07
Gravatar
Invest in discharge MaxiDAS DS708 x431 diagun, lexia gm tech 2 A variety MB Star C3 of et cetera Multi-cardiag M8 such motor VAS 5054A vehicle Launch X431 Diagun analysis software on the web may perhaps lexia 3 pp2000 commonly ck 100 help you feel VOLVO Vida Dice ambivalent, the good Nissan Consult 3 reason you are trying to get it online is made for match up against the genuine store's fee the expense of website a lot beautiful. Yet any fault is that we won't look at realistic commodities

==========

Underneath is really a Cummins inline 5 suggestions about several carprog v4.1 car analysis product T300 renault will SBB Key Programmer movie, Renault Could AutoBoss V30 certainly Tacho Pro 2008 Show: v114is a Autocom CDP detailed analytical Fcar F3-G system for the purpose of Renault autos. Renault Can Clip's navigation maxidiag md802 makes it possible nexiq 125032 for discovering all the information concerning the automobile, Laptop computer examination, Intelligent test out however computer systems, Reprogramming, Airbag test out, Diagnostic scan tool (OBD testing), Platform Doctor (admission to Technological Notices), Bricks-and-mortar data.



# Canada Goose Outlet Store

Left by Canada Goose Outlet Store at 27/12/2013 2.03
Gravatar
I really like it when folks get together and share thoughts,we will support you.

# Longchamp Outlet Online

Left by Longchamp Outlet Online at 13/01/2014 6.39
Gravatar
Great site, continue the good work,We absolutely love your writing,very good

# Burberry Outlet 2014

Left by Burberry Outlet 2014 at 14/01/2014 1.57
Gravatar
We absolutely love your writing,very good,also very reasonable, easy to understand

# Burberry Outlet London

Left by Burberry Outlet London at 14/01/2014 1.58
Gravatar
Very beautiful, we all can learn many useful things,you just gave us a surprise

# ski gloves

Left by ski gloves at 14/01/2014 15.31
Gravatar
Wonderful post.It is so great to find out this topic!

# Michael Kors Online Shop

Left by Michael Kors Online Shop at 25/01/2014 4.37
Gravatar
Your article is very good very practical, I will collect up, hope you can also pay attention to my web site, thank you!

# Rayban Outlet

Left by Rayban Outlet at 25/01/2014 4.48
Gravatar
Your article is very good very practical, I will collect up, hope you can also pay attention to my web site, thank you

# Nike Outlet

Left by Nike Outlet at 10/02/2014 2.47
Gravatar
Your article is very good very practical, I will collect up, hope you can also pay attention to my web site, thank you!!!!!

# Nike Outlet Store

Left by Nike Outlet Store at 11/02/2014 3.32
Gravatar
Your article is very good very practical, I will collect up, hope you can also pay attention to my web site, thank you...

# Nike Outlet Online

Left by Nike Outlet Online at 12/02/2014 2.05
Gravatar
Your article is very good very practical, I will collect up, hope you can also pay attention to my web site, thank you!................

# Brands On Sale

Left by Brands On Sale at 14/02/2014 4.32
Gravatar
See the shine at the moment, we all can learn many useful things. we will support you46+5

# Michael Kors Handbags

Left by Michael Kors Handbags at 14/02/2014 4.32
Gravatar
I appreciate every thing you’ve added to my information base,content is very rich and colorful85

# Moncler Outlet Store

Left by Moncler Outlet Store at 14/02/2014 7.39
Gravatar
Thank you for your excellent artice,thank you very much for your so hard to write down4589

# Burberry Outlet Hackney

Left by Burberry Outlet Hackney at 21/02/2014 2.38
Gravatar
It is cool!your article is really Great,we all can learn many useful things

# Ray Ban Outlet

Left by Ray Ban Outlet at 21/02/2014 2.39
Gravatar
Among all kinds of blog is very much useless information,we all can learn many useful things

# Michael Kors Purses

Left by Michael Kors Purses at 26/02/2014 10.10
Gravatar
Like the outcome after an exam, death makes us aware of anything, That is, it’s too late to take a tumble.

# Burberry Uk

Left by Burberry Uk at 04/03/2014 1.36
Gravatar
Wonderful!Sincerely interest in your post,It is just the article i have been serching for a long time

# Ray Ban Outlet Stores

Left by Ray Ban Outlet Stores at 04/03/2014 1.40
Gravatar
It is cool!your article is really Great, thank you very much for your so hard to write down

# Ray Ban RB2140

Left by Ray Ban RB2140 at 04/03/2014 1.42
Gravatar
Super!good acticle for me,so interested in the topic,will come back soon Crazy with your article

# Michael Kors Backpack

Left by Michael Kors Backpack at 13/03/2014 6.59
Gravatar
Wonderful!Sincerely interest in your post,easy to understand, thank you very much for your so hard to write down

# Wayfarer Ray Ban

Left by Wayfarer Ray Ban at 13/03/2014 7.02
Gravatar
It is cool!your article is really Great, I like you,wait for your next post.Have a nice Day!Sincerely like your post1

# re: ObservableCollection Extensions

Left by Ralph Polo Outlet at 29/03/2014 9.04
Gravatar
On the sunlight to the windowsill, I put a pot of asparagus, asparagus bough, Moncler Christmas Sale, from the flower market, Moncler Outlet Store, it is thin and delicate foliage, in the humid air seemed, North Face Jackets, very slow and heavy, Gucci Shoes Factory, gently shaking each blade, Barbour Outlet Online, cut into pieces gorgeous, Woolrich Clothing, sun shadow, Woolrich Clearace, I do not know the poor pots, TNF Outlet Online, of flowers, Michael Kors Purses Outlet, will be much longer, Barbour Jackets Outlet, in it before, Moncler Jackets Outlet, I have seen many beautiful plants, Ralph Outlet Online, dry complexion, canada goose jackets, like a television in the fast, canada goose coats, lens as quickly twist, Michael Kors Outlet States, petty, Ralph Outlet, scattered on the ground, Moncler Outlet Online, became a place of granular dust.

# Cheapest Ray Ban Sunglasses

Left by Cheapest Ray Ban Sunglasses at 03/06/2014 5.02
Gravatar
Among all kinds of blog is very much useless information, but this article is used,We absolutely love your writing

# Nike Outlet Online

Left by Nike Outlet Online at 03/06/2014 5.05
Gravatar
also very reasonable, easy to understand, thank you very much for your so hard to write down.your article is really Great

# <p>These boots look excellent underneath <a href="http://www.enenfance.com/">gucci canvas belts for men</a> because they accentu

Left by cheap hermes men belts at 10/06/2014 16.00
Gravatar

These boots look excellent underneath

# Christian Louboutin Outlet

Left by Christian Louboutin Outlet at 11/06/2014 4.11
Gravatar
Fantastic!Sweet Blog!I am interested in it,Thank you for your posting.I will continue to read.

# Gafas Ray Ban Baratas

Left by Gafas Ray Ban Baratas at 11/06/2014 4.13
Gravatar
Such a nice writing of this article! we all can learn many useful things,that is intresting.

# Gucci Outlet Online

Left by Gucci Outlet Online at 11/06/2014 4.14
Gravatar
Good way to write this article,so useful information to me,that make people impressive,this is a very good post.

# Cheap Ray Ban Sunglasses

Left by Cheap Ray Ban Sunglasses at 12/06/2014 3.27
Gravatar
Article is simple and full of informations.it can bring me too many ideas.Even need more.

# Christian Louboutin Outlet Store

Left by Christian Louboutin Outlet Store at 12/06/2014 3.28
Gravatar
This is a very good choice, no too much description, but there are still useful and good.I hope to write more.

# Gafas De Sol Ray Ban Baratas

Left by Gafas De Sol Ray Ban Baratas at 12/06/2014 3.30
Gravatar
Thank you for your amazing post.Thanks for sharing! They are useful and intresting to me.Excellent.

# Toms Shoes Outlet Store

Left by Toms Shoes Outlet Store at 23/07/2014 5.13
Gravatar
Reading by means of your enjoyable list inform, will further me to do so sometimes.

# Ray Ban Outlet

Left by Ray Ban Outlet at 23/07/2014 5.22
Gravatar
I rate the great record you allotment in your articles. I'll bookmark your blog and bear my readers peruse here often.

# Michael Kors Outlet Coupon

Left by Michael Kors Outlet Coupon at 24/07/2014 8.17
Gravatar
That is definately one of the best blogs I've sen in ages online. Maintain up the excellent posts.

# Christian Louboutin Shoes Outlet

Left by Christian Louboutin Shoes Outlet at 25/07/2014 3.12
Gravatar
Everytime I log into your website, I all feel happy. I’m very glad that I stumbled throughout this in my seek for one thing regarding this.

# Authentic Gucci Outlet

Left by Authentic Gucci Outlet at 25/07/2014 3.24
Gravatar
This is really good information I have visited this blog to read something fresh and I really admire you efforts in doing so

# gucci belts on sale

Left by gucci belts on sale at 26/07/2014 16.47
Gravatar

Supplying embroidered corporate clothing are letting any prospective.

# Michael Kors view is: It is cosmopolitan era, no boundaries, people wearing the same clothes, but according to different needs c

Left by michael kors outlet online at 04/08/2014 5.21
Gravatar
Michael Kors view is: It is cosmopolitan era, no boundaries, people wearing the same clothes, but according to different needs change.

# Shoe lovers will be based on your favorite forum and the majority of fans communicate and share all relevant information about t

Left by jordans shoes at 04/08/2014 5.25
Gravatar
Shoe lovers will be based on your favorite forum and the majority of fans communicate and share all relevant information about the shoes, you can also publish online and offline activities organized under the circle.

# Burberry is a very traditional British style luxury brand, its multi-level products to meet consumer demand for different age an

Left by burberry outlet online at 04/08/2014 5.28
Gravatar
Burberry is a very traditional British style luxury brand, its multi-level products to meet consumer demand for different age and gender.

# discount toms online

Left by discount toms online at 07/08/2014 9.28
Gravatar
Great site, continue the good work,let a person feel at first sight is great,content is very rich and colorful

# shop ray ban sunglasses

Left by shop ray ban sunglasses at 11/08/2014 8.33
Gravatar
Whatever comes, I'll love you, just as I do now. Until I die.

# Michael Kors Outlet Miami

Left by Michael Kors Outlet Miami at 11/08/2014 8.37
Gravatar
I never give anything without expecting something in return. I always get paid.

# gucci outlet

Left by gucci outlet at 29/08/2014 3.36
Gravatar
This is cool! Your article is really good, we can learn a lot of useful things.

# jazz-standards.com

Left by jazz-standards.com at 08/09/2014 3.42
Gravatar
ObservableCollection Extensions

# Coach Outlet

Left by Coach Outlet at 10/09/2014 9.43
Gravatar
Your article is very convincing and I appreciate your point of view.

# Toms Shoes Outlet Online

Left by Toms Shoes Outlet Online at 10/09/2014 9.45
Gravatar
Your article can be a really excellent read for me.yes, I love it.

# http://www.ralphlaurenpolooutlet2014.org/

Left by Ralph Lauren Polo Outlet at 18/09/2014 9.40
Gravatar
When the world turns its back on you, you turn your back on the world.

# Everything you see exists together in a delicate balance.

Left by cheap toms shoes at 18/09/2014 9.44
Gravatar
Everything you see exists together in a delicate balance.

# Michael Kors Outlet

Left by Michael Kors Outlet at 30/09/2014 4.42
Gravatar
Now I realize that I had been correct. lol! Thank you for that information you article.

# Continue efforts to writing it, I would recommend a friend to pay attention!

Left by Air Jordan 2014 at 09/10/2014 5.46
Gravatar
Continue efforts to writing it, I would recommend a friend to pay attention!

# Well written and look forward to your one works, I believe there will be more exciting chapter I

Left by Burberry Factory Outlet at 09/10/2014 5.52
Gravatar
Well written and look forward to your one works, I believe there will be more exciting chapter I

# Continue efforts to write it, with your talent, I'm sure you will be successful!

Left by Moncler Jackets Outlet at 09/10/2014 5.55
Gravatar
Continue efforts to write it, with your talent, I'm sure you will be successful!

# I hope someday can assure you, just write great works!

Left by burberry outlet locations at 14/10/2014 8.16
Gravatar
I hope someday can assure you, just write great works!

# This article can be seen here, I am even more convinced that this is indeed a good site.

Left by Kate Spade Outlet at 14/10/2014 8.20
Gravatar
This article can be seen here, I am even more convinced that this is indeed a good site.

# Articles written very well, we will always pay attention to your new articles!

Left by New Jordan at 14/10/2014 8.21
Gravatar
Articles written very well, we will always pay attention to your new articles!

# I'm glad you share with us the useful information. Please keep our date. Thank you for your sharing.

Left by Michael Kors Outlet Stores at 05/11/2014 4.51
Gravatar
I'm glad you share with us the useful information. Please keep our date. Thank you for your sharing.

# You have done a great job. There is no doubt that I will bing project together with the proposed separately to my local friend.

Left by Michael Michael Kors Outlet at 05/11/2014 4.53
Gravatar
You have done a great job. There is no doubt that I will bing project together with the proposed separately to my local friend. I'm sure they will be benefited from this site.

# I feel very lucky to be able to find your site. Your share is meaningful. Have a good day.

Left by UGG Clearance at 05/11/2014 4.54
Gravatar
I feel very lucky to be able to find your site. Your share is meaningful. Have a good day.

# I really enjoy it together, sharing ideas, let a person feel in love at first sight is great, we will support you.

Left by moncler jackets at 11/11/2014 7.07
Gravatar
I really enjoy it together, sharing ideas, let a person feel in love at first sight is great, we will support you.

# Appriciate

Left by college assignment help at 12/02/2015 8.43
Gravatar
Very interesting blog, your detail is really awesome. 

# Assignment Help

Left by Michael Jones at 29/10/2015 6.59
Gravatar
.Net is the excellent framework to develop a software or Application software.
I always take a help from AllAssignmenthelp which have experts to give the solution for your Assignment Writing. Assignment help
Thanks for the post.

Your comment:



 (will not be displayed)


 
 
 
Please add 5 and 8 and type the answer here:
 

Live Comment Preview:

 
«agosto»
domlunmarmergiovensab
31123456
78910111213
14151617181920
21222324252627
28293031123
45678910