Sonny Man (Marco Bonera) http://blogs.ugidotnet.org/sonny/Default.aspx chiedi e ti sarà datato...magari non subito... it-IT Sonny Subtext Version 2.6.0.0 Sonny Man (Marco Bonera) http://blogs.ugidotnet.org/images/RSS2Image.gif http://blogs.ugidotnet.org/sonny/Default.aspx 77 60 Build Window 8 http://blogs.ugidotnet.org/sonny/archive/2011/09/14/build-window-8.aspx <p>Curiosi di provare la Build di Window 8 scaricatela…</p> <p><a href="http://msdn.microsoft.com/en-us/windows/home/"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="br229518.home_bannerv3(en-us,MSDN.10)" border="0" alt="br229518.home_bannerv3(en-us,MSDN.10)" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/sonny/WindowsLiveWriter/BuildWindow8_7EBE/br229518.home_bannerv3(en-us,MSDN.10)_3.png" width="244" height="126" /></a> </p> <p><a href="http://msdn.microsoft.com/en-us/windows/home/">http://msdn.microsoft.com/en-us/windows/home/</a></p><img src="http://blogs.ugidotnet.org/sonny/aggbug/100340.aspx" width="1" height="1" /> Sonny http://blogs.ugidotnet.org/sonny/archive/2011/09/14/build-window-8.aspx Wed, 14 Sep 2011 10:00:48 GMT http://blogs.ugidotnet.org/sonny/archive/2011/09/14/build-window-8.aspx#feedback 2 http://blogs.ugidotnet.org/sonny/comments/commentRss/100340.aspx http://blogs.ugidotnet.org/sonny/services/trackbacks/100340.aspx Applicazioni Mobile con Javascript http://blogs.ugidotnet.org/sonny/archive/2011/04/03/applicazioni-mobile-con-javascript.aspx <p>E’ da qualche mese che sto sviluppando un applicazione per Mobile e voglio condividere la mia esperienza. Certo lo sviluppo Window Phone 7 sarebbe una pacchia, ma il mio scopo è raggiungere più vasti mercati e allora che fare ? Non mi metto certo ad imparare Object C, comprare un Mac, scaricare SDK di Android, scaricare SDK per il BalckBerry ecc… In questi ultimi anni stanno nascendo svariate applicazioni create in Javascript. Qualcuno di voi strabuzzerà gli occhi !! Come Javascript ?!? Certo Javascript funziona egregiamente, molti di noi lo conoscono bene, perché non sfruttarlo !! Ci sono 2 principali framework adatti per lo sviluppo che sono ormai maturi uno di questi è il ben noto JQuery e l’altro EXTJS.</p> <p>Ricordo a tutti che i browser moderni ( Safari in testa ) sono in grado di sfruttare le potenzialità del HTML5 unite al CSS3. Quindi multi piattaforma e multi browser…</p> <p> <a href="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/sonny/WindowsLiveWriter/ApplicazioniMobileconJavascript_A53/image_15.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/sonny/WindowsLiveWriter/ApplicazioniMobileconJavascript_A53/image_thumb_1.png" width="200" height="69" /></a>  All’indirizzo <a href="http://jquerymobile.com/">http://jquerymobile.com/</a> troviamo il framework di Jquery molte sono le cose che si possono fare e vi invito a dagli un occhio, ricordando sempre che sotto c’è il nostro fantastico Jquery.</p> <p><a href="http://www.sencha.com/products/touch/"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/sonny/WindowsLiveWriter/ApplicazioniMobileconJavascript_A53/image_6.png" width="244" height="23" /></a>  All’indirizzo <a href="http://www.sencha.com/products/touch/">http://www.sencha.com/products/touch/</a> troviamo il framework di ExtJs sempre molto professional.</p> <p><a href="http://jqtouch.com/"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/sonny/WindowsLiveWriter/ApplicazioniMobileconJavascript_A53/image_9.png" width="244" height="67" /></a>  Per chi vuole sviluppare in modo specifico su IPhone.</p> <p>Le applicazioni girano magnificamente e con l’aspetto di un’applicazione nativa il che non guasta. Ma che fare se voglio accedere a delle funzioni del telefono tipo fotocamera, accellerometro, gps ecc… nessun problema mi serve un’altro framework <a href="http://www.phonegap.com/"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/sonny/WindowsLiveWriter/ApplicazioniMobileconJavascript_A53/image_12.png" width="175" height="82" /></a> PhoneGap che incapsula queste funzioni richiamandole direttamente dal Javascript.</p> <p>Quindi ora non ci sono più scuse per uno sviluppo “consapevole”. Una domanda, qualcuno di voi ha già percorso questa strada ??</p> <p><a href="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/sonny/WindowsLiveWriter/ApplicazioniMobileconJavascript_A53/image_14.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/sonny/WindowsLiveWriter/ApplicazioniMobileconJavascript_A53/image_thumb_4.png" width="490" height="226" /></a></p><img src="http://blogs.ugidotnet.org/sonny/aggbug/99900.aspx" width="1" height="1" /> Sonny http://blogs.ugidotnet.org/sonny/archive/2011/04/03/applicazioni-mobile-con-javascript.aspx Sun, 03 Apr 2011 01:44:05 GMT http://blogs.ugidotnet.org/sonny/archive/2011/04/03/applicazioni-mobile-con-javascript.aspx#feedback 3 http://blogs.ugidotnet.org/sonny/comments/commentRss/99900.aspx http://blogs.ugidotnet.org/sonny/services/trackbacks/99900.aspx Programming Windows Phone 7 FREE EBOOK http://blogs.ugidotnet.org/sonny/archive/2010/11/01/programming-windows-phone-7-free-ebook.aspx <h5><a href="http://blogs.msdn.com/b/microsoft_press/archive/2010/10/28/free-ebook-programming-windows-phone-7-by-charles-petzold.aspx"><img alt="9780735643352x" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-17-44-metablogapi/6558.9780735643352x_5F00_thumb_5F00_6E9D86B6.jpg" /></a></h5><img src="http://blogs.ugidotnet.org/sonny/aggbug/99423.aspx" width="1" height="1" /> Sonny http://blogs.ugidotnet.org/sonny/archive/2010/11/01/programming-windows-phone-7-free-ebook.aspx Mon, 01 Nov 2010 13:53:28 GMT http://blogs.ugidotnet.org/sonny/archive/2010/11/01/programming-windows-phone-7-free-ebook.aspx#feedback 2 http://blogs.ugidotnet.org/sonny/comments/commentRss/99423.aspx http://blogs.ugidotnet.org/sonny/services/trackbacks/99423.aspx KEYNOTES PDC 2010 LIVE http://blogs.ugidotnet.org/sonny/archive/2010/10/28/keynotes-pdc-2010-live.aspx <p><font size="6">INIZIATA:::</font></p> <p><a href="http://www.microsoft.com/italy/pdc2010/?WT.mc_id=nlc-n-it-loc-PDC10">http://www.microsoft.com/italy/pdc2010/?WT.mc_id=nlc-n-it-loc-PDC10</a></p><img src="http://blogs.ugidotnet.org/sonny/aggbug/99416.aspx" width="1" height="1" /> Sonny http://blogs.ugidotnet.org/sonny/archive/2010/10/28/keynotes-pdc-2010-live.aspx Thu, 28 Oct 2010 19:07:04 GMT http://blogs.ugidotnet.org/sonny/archive/2010/10/28/keynotes-pdc-2010-live.aspx#feedback http://blogs.ugidotnet.org/sonny/comments/commentRss/99416.aspx http://blogs.ugidotnet.org/sonny/services/trackbacks/99416.aspx KEYNOTES PDC 2010 LIVE IN ITALIANO http://blogs.ugidotnet.org/sonny/archive/2010/10/28/keynotes-pdc-2010-live-in-italiano.aspx <p>Ricordo che questa sera alle 18 c’è la keynotes con STEVE BALLMER e BOB MUGLIA</p> <p><a href="https://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032465835&amp;EventCategory=2&amp;culture=it-IT&amp;CountryCode=IT"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="pdc" border="0" alt="pdc" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/sonny/WindowsLiveWriter/KEYNOTESPDC2010LIVEINITALIANO_BBEE/pdc_1.jpg" width="199" height="69" /></a> </p> <p><a href="https://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032465835&amp;EventCategory=2&amp;culture=it-IT&amp;CountryCode=IT">https://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032465835&amp;EventCategory=2&amp;culture=it-IT&amp;CountryCode=IT</a></p> <p>Da non perdere, iscrivetevi numerosi !!</p><img src="http://blogs.ugidotnet.org/sonny/aggbug/99413.aspx" width="1" height="1" /> Sonny http://blogs.ugidotnet.org/sonny/archive/2010/10/28/keynotes-pdc-2010-live-in-italiano.aspx Thu, 28 Oct 2010 14:21:47 GMT http://blogs.ugidotnet.org/sonny/archive/2010/10/28/keynotes-pdc-2010-live-in-italiano.aspx#feedback 1 http://blogs.ugidotnet.org/sonny/comments/commentRss/99413.aspx http://blogs.ugidotnet.org/sonny/services/trackbacks/99413.aspx ADO.Net Entity Framework in .Net 4.0 http://blogs.ugidotnet.org/sonny/archive/2010/05/10/ado.net-entity-framework-in-.net-4.0.aspx <p>Per chi vuole assaggiare il nuovo EF e si è perso questo video della PDC</p> <p><a href="http://microsoftpdc.com/Videos"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/sonny/WindowsLiveWriter/ADO.NetEntityFrameworkin.Net4.0_A86D/image_3.png" width="421" height="34" /></a> </p> <p>Impressionante l’esposizione dei due speaker semplicemente fantastici.</p> <p>Sonny</p> <p>PS: scaricate il video in alta qualità.</p><img src="http://blogs.ugidotnet.org/sonny/aggbug/98535.aspx" width="1" height="1" /> Sonny http://blogs.ugidotnet.org/sonny/archive/2010/05/10/ado.net-entity-framework-in-.net-4.0.aspx Mon, 10 May 2010 12:58:29 GMT http://blogs.ugidotnet.org/sonny/archive/2010/05/10/ado.net-entity-framework-in-.net-4.0.aspx#feedback 1 http://blogs.ugidotnet.org/sonny/comments/commentRss/98535.aspx http://blogs.ugidotnet.org/sonny/services/trackbacks/98535.aspx Rimuovere la precedente installazione&hellip; http://blogs.ugidotnet.org/sonny/archive/2010/05/01/rimuovere-la-precedente-installazionehellip.aspx <p>Avete installato Win7 su una macchina dove era presente un’altro sistema operativo ? Win7 è stato installato correttamente ma non riuscite a rimuovere la cartella window.old ? Io ho fatto il calcolo 13GB sono un po’ troppi per non essere eliminati ; )</p> <p>Bene seguite questi semplici passi:</p> <p>Accessories – System Tools – Disk Cleanup</p> <p><a href="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/sonny/WindowsLiveWriter/Rimuoverelaprecedenteinstallazione_67/image_2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/sonny/WindowsLiveWriter/Rimuoverelaprecedenteinstallazione_67/image_thumb.png" width="228" height="278" /></a> </p> <p>Selezioniamo il pulsante Clean up system files. Riparte il calcolo dei file da cancellare. Selezionare Previous Window installation(s)</p> <p><a href="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/sonny/WindowsLiveWriter/Rimuoverelaprecedenteinstallazione_67/image_4.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/sonny/WindowsLiveWriter/Rimuoverelaprecedenteinstallazione_67/image_thumb_1.png" width="244" height="39" /></a> </p> <p>Ed il gioco è fatto..</p> <p>Sonny</p><img src="http://blogs.ugidotnet.org/sonny/aggbug/98475.aspx" width="1" height="1" /> Sonny http://blogs.ugidotnet.org/sonny/archive/2010/05/01/rimuovere-la-precedente-installazionehellip.aspx Sat, 01 May 2010 01:01:57 GMT http://blogs.ugidotnet.org/sonny/archive/2010/05/01/rimuovere-la-precedente-installazionehellip.aspx#feedback 1 http://blogs.ugidotnet.org/sonny/comments/commentRss/98475.aspx http://blogs.ugidotnet.org/sonny/services/trackbacks/98475.aspx HTML5 la rivoluzione &egrave; cominciata !! http://blogs.ugidotnet.org/sonny/archive/2010/04/22/html5-la-rivoluzione-egrave-cominciata.aspx <p>Open Standard Media Player questo è il nome del progetto <strong>open</strong> che combina HTML5 + JQuery + Css </p> <p> <a href="http://www.mediafront.org/getting-started"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/sonny/WindowsLiveWriter/HTML5larivoluzionecominciata_8D68/image_5.png" width="244" height="36" /></a> </p> <p /> <p><a href="http://www.mediafront.org/getting-started"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/sonny/WindowsLiveWriter/HTML5larivoluzionecominciata_8D68/image_6.png" width="244" height="188" /></a></p> <p>Flash Player bye bye,</p> <p>Sonny</p><img src="http://blogs.ugidotnet.org/sonny/aggbug/98421.aspx" width="1" height="1" /> Sonny http://blogs.ugidotnet.org/sonny/archive/2010/04/22/html5-la-rivoluzione-egrave-cominciata.aspx Thu, 22 Apr 2010 11:03:35 GMT http://blogs.ugidotnet.org/sonny/archive/2010/04/22/html5-la-rivoluzione-egrave-cominciata.aspx#feedback 1 http://blogs.ugidotnet.org/sonny/comments/commentRss/98421.aspx http://blogs.ugidotnet.org/sonny/services/trackbacks/98421.aspx [OT] WinScape Spettacolo in azione&hellip; http://blogs.ugidotnet.org/sonny/archive/2010/04/22/ot-winscape-spettacolo-in-azionehellip.aspx <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:034d458c-b2fa-4bf0-ac9c-bbd02b681d44" class="wlWriterEditableSmartContent"><div id="a7ea6c55-d5dd-4e21-9836-870cd70b8e11" style="margin: 0px; padding: 0px; display: inline;"><div><a href="http://www.youtube.com/watch?v=Vqu9NuINKbc&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;hl=en_US&amp;feature=player_embedded&amp;fs=1" target="_new"><img src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/sonny/WindowsLiveWriter/OTWinScapeSpettacoloinazione_8671/video66f14d44830f.jpg" style="border-style: none" galleryimg="no" onload="var downlevelDiv = document.getElementById('a7ea6c55-d5dd-4e21-9836-870cd70b8e11'); downlevelDiv.innerHTML = &quot;&lt;div&gt;&lt;object width=\&quot;425\&quot; height=\&quot;355\&quot;&gt;&lt;param name=\&quot;movie\&quot; value=\&quot;http://www.youtube.com/v/Vqu9NuINKbc&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;hl=en_US&amp;feature=player_embedded&amp;fs=1&amp;hl=en\&quot;&gt;&lt;\/param&gt;&lt;embed src=\&quot;http://www.youtube.com/v/Vqu9NuINKbc&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;hl=en_US&amp;feature=player_embedded&amp;fs=1&amp;hl=en\&quot; type=\&quot;application/x-shockwave-flash\&quot; width=\&quot;425\&quot; height=\&quot;355\&quot;&gt;&lt;\/embed&gt;&lt;\/object&gt;&lt;\/div&gt;&quot;;" alt="" /></a></div></div></div> <p>che dire..spettacolo..</p> <p>Sonny</p><img src="http://blogs.ugidotnet.org/sonny/aggbug/98420.aspx" width="1" height="1" /> Sonny http://blogs.ugidotnet.org/sonny/archive/2010/04/22/ot-winscape-spettacolo-in-azionehellip.aspx Thu, 22 Apr 2010 10:33:48 GMT http://blogs.ugidotnet.org/sonny/archive/2010/04/22/ot-winscape-spettacolo-in-azionehellip.aspx#feedback http://blogs.ugidotnet.org/sonny/comments/commentRss/98420.aspx http://blogs.ugidotnet.org/sonny/services/trackbacks/98420.aspx Microsoft WPF Ribbon http://blogs.ugidotnet.org/sonny/archive/2010/04/18/microsoft-wpf-ribbon.aspx <p>Per rendere più professionali le vostre applicazioni è interessante utilizzare i Ribbon style Office 2007. Molti di voi si saranno affidati ad librerie di terze parti </p> <p><a href="http://www.devexpress.com/"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/sonny/WindowsLiveWriter/MicrosoftWPFRibbon_B412/image_3.png" width="181" height="63" /></a>  <a href="http://www.componentfactory.com/"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/sonny/WindowsLiveWriter/MicrosoftWPFRibbon_B412/image_6.png" width="244" height="41" /></a> <a href="http://www.componentone.com/"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/sonny/WindowsLiveWriter/MicrosoftWPFRibbon_B412/image_9.png" width="210" height="66" /></a> </p> <p>solo per citarne qualcuno ( una semplice ricerca “WPF Ribbon”).</p> <p /> <p /> <p>Esistono da tempo anche progetti open come <a href="http://www.codeproject.com/KB/WPF/ribboncontrol.aspx">http://www.codeproject.com/KB/WPF/ribboncontrol.aspx</a> oppure <a href="http://odyssey.codeplex.com/">http://odyssey.codeplex.com/</a></p> <p>Se volessimo rimanere in casa Microsoft potremmo utilizzare <a href="http://wpf.codeplex.com/wikipage?title=WPF%20Ribbon%20Preview&amp;ProjectName=wpf">WPF Ribbon Library</a> messa a disposizione con licenza <a href="http://msdn.microsoft.com/it-it/office/aa973809.aspx">Office UI Licensing site</a><strong> gratuita</strong> per intenderci.</p> <p>Buon lavoro,</p> <p>Sonny</p><img src="http://blogs.ugidotnet.org/sonny/aggbug/98394.aspx" width="1" height="1" /> Sonny http://blogs.ugidotnet.org/sonny/archive/2010/04/18/microsoft-wpf-ribbon.aspx Sun, 18 Apr 2010 13:48:27 GMT http://blogs.ugidotnet.org/sonny/archive/2010/04/18/microsoft-wpf-ribbon.aspx#feedback 1 http://blogs.ugidotnet.org/sonny/comments/commentRss/98394.aspx http://blogs.ugidotnet.org/sonny/services/trackbacks/98394.aspx [OT] Un tuffo nei game anni 80 http://blogs.ugidotnet.org/sonny/archive/2010/04/09/ot-un-tuffo-nei-game-anni-80.aspx <p>Questo video è fantastico.</p> <p><object width="480" height="270"><param name="movie" value="http://dailymotion.virgilio.it/swf/video/xcv6dv" /><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><embed type="application/x-shockwave-flash" src="http://dailymotion.virgilio.it/swf/video/xcv6dv" width="480" height="270" allowfullscreen="true" allowscriptaccess="always" /></object> <br /><b><a href="http://dailymotion.virgilio.it/video/xcv6dv_pixels-by-patrick-jean_creation">PIXELS by PATRICK JEAN.</a></b> <br /><i>Caricato da <a href="http://dailymotion.virgilio.it/onemoreprod">onemoreprod</a>. - <a href="http://dailymotion.virgilio.it/it/channel/creation/featured/1">Produzioni web indipendenti.</a></i></p> <p> </p> <p><a href="http://dailymotion.virgilio.it/video/xcv6dv_pixels-by-patrick-jean_creation">http://dailymotion.virgilio.it/video/xcv6dv_pixels-by-patrick-jean_creation</a></p><img src="http://blogs.ugidotnet.org/sonny/aggbug/98336.aspx" width="1" height="1" /> Sonny http://blogs.ugidotnet.org/sonny/archive/2010/04/09/ot-un-tuffo-nei-game-anni-80.aspx Fri, 09 Apr 2010 13:09:02 GMT http://blogs.ugidotnet.org/sonny/archive/2010/04/09/ot-un-tuffo-nei-game-anni-80.aspx#feedback 1 http://blogs.ugidotnet.org/sonny/comments/commentRss/98336.aspx http://blogs.ugidotnet.org/sonny/services/trackbacks/98336.aspx [Tip] Come convertire una stringa in un enumerativo http://blogs.ugidotnet.org/sonny/archive/2010/03/31/tip-come-convertire-una-stringa-in-un-enumerativo.aspx <p>Mi piace molto usare gli enum per dare pulizia al codice e non rischiare di commettere errori. Ma quando bisogna convertire una stringa in un enum che fare? Come al solito ci viene in aiuto il buon framework .Net. Fingiamo di avere un enumerativo che elenca le marche di alcune automobili</p> <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"> <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1"> 1:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">enum</span> CarMakes</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2"> 2:</span> {</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3"> 3:</span> BMW,</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4"> 4:</span> Ford,</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5"> 5:</span> GeneralMotors,</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6"> 6:</span> GruppoFiat,</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7"> 7:</span> Honda,</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8"> 8:</span> Hyundai,</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9"> 9:</span> KiaMotors,</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10"> 10:</span> Mazda,</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11"> 11:</span> Mitsubishi,</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum12"> 12:</span> Nissan,</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum13"> 13:</span> Renault,</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum14"> 14:</span> Suzuki,</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum15"> 15:</span> Toyota,</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum16"> 16:</span> Volkswagen,</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum17"> 17:</span> }</pre> <!--CRLF--></div> </div> <p>E mi viene data la marca “Ford” come posso convertirla nel enumerativo CarMakes.Ford ?</p> <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"> <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1"> 1:</span> <span style="color: #0000ff">object</span> Enum.Parse(System.Type enumType, <span style="color: #0000ff">string</span> <span style="color: #0000ff">value</span>, <span style="color: #0000ff">bool</span> ignoreCase)</pre> <!--CRLF--></div> </div> <p>Questo sembra proprio fare al caso nostro</p> <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"> <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1"> 1:</span> CarMakes makes = (CarMakes) Enum.Parse(<span style="color: #0000ff">typeof</span>(CarMakes), <span style="color: #006080">"Ford"</span>, <span style="color: #0000ff">true</span>)</pre> <!--CRLF--></div> </div> <p>Ma se non siamo sicuri che possa esistere? Nulla di male</p> <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"> <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1"> 1:</span> var makeNotExist = <span style="color: #006080">"SonnyMake"</span>;</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2"> 2:</span> <span style="color: #0000ff">if</span> (Enum.IsDefined(<span style="color: #0000ff">typeof</span>(CarMakes), makeNotExist))</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3"> 3:</span> {</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4"> 4:</span> CarMakes makes = (CarMakes)Enum.Parse(<span style="color: #0000ff">typeof</span>(CarMakes), makeNotExist, <span style="color: #0000ff">true</span>);</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5"> 5:</span> Console.WriteLine(makes);</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6"> 6:</span> }</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7"> 7:</span> <span style="color: #0000ff">else</span></pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8"> 8:</span> Console.WriteLine(<span style="color: #006080">"Ops Error!"</span>);</pre> <!--CRLF--></div> </div> <p>Be la prossima volta mi compro una casa automobilistica così sono sicuro. ;)</p> <p>Sonny</p><img src="http://blogs.ugidotnet.org/sonny/aggbug/98286.aspx" width="1" height="1" /> Sonny http://blogs.ugidotnet.org/sonny/archive/2010/03/31/tip-come-convertire-una-stringa-in-un-enumerativo.aspx Wed, 31 Mar 2010 01:15:19 GMT http://blogs.ugidotnet.org/sonny/archive/2010/03/31/tip-come-convertire-una-stringa-in-un-enumerativo.aspx#feedback 1 http://blogs.ugidotnet.org/sonny/comments/commentRss/98286.aspx http://blogs.ugidotnet.org/sonny/services/trackbacks/98286.aspx XmlSerializer perch&eacute; no? http://blogs.ugidotnet.org/sonny/archive/2010/03/30/xmlserializer-percheacute-no.aspx <p>Oggi mi è capitata una cosa curiosa. Stavo lavorando sul mio “solito” database xml nativo ( ormai sono quasi 7 anni che ci “combatto”) e un mio collaboratore mi mostra un pezzo di codice che salva la entity Customer creandola con <a href="http://msdn.microsoft.com/it-it/library/system.xml.xmldocument(VS.80).aspx">XmlDocument</a>. Chiunque abbia messo mani sul formato xml ha dovuto fare i conti con questa classe. Mi spiego meglio, salvare la classe creando “a mano“ tutte le proprietà (document.CreateElement, document.CreateAttribute ecc) per poi fare il contrario recuperandola. Mi sa tanto di serializzazione dico io. Così ho scritto una classe di serializzazione e deserializzazione che fa lo stesso lavoro ma per qualsiasi entità.</p> <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"> <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1"> 1:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> <span style="color: #0000ff">class</span> StoringState&lt;T&gt;</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2"> 2:</span> {</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3"> 3:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> <span style="color: #0000ff">string</span> SerializeObject(<span style="color: #0000ff">object</span> pObject)</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4"> 4:</span> {</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5"> 5:</span> </pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6"> 6:</span> var xmlSerializer = <span style="color: #0000ff">new</span> XmlSerializer(<span style="color: #0000ff">typeof</span>(T));</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7"> 7:</span>  </pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8"> 8:</span> <span style="color: #0000ff">using</span> (var stringWriter = <span style="color: #0000ff">new</span> StringWriter())</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9"> 9:</span> {</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10"> 10:</span> xmlSerializer.Serialize(stringWriter, pObject);</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11"> 11:</span> <span style="color: #0000ff">return</span> stringWriter.ToString();</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum12"> 12:</span> }</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum13"> 13:</span> </pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum14"> 14:</span> }</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum15"> 15:</span>  </pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum16"> 16:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> <span style="color: #0000ff">object</span> DeserializeObject(<span style="color: #0000ff">string</span> pXmlizedString)</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum17"> 17:</span> {</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum18"> 18:</span> </pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum19"> 19:</span> var xmlSerializer = <span style="color: #0000ff">new</span> XmlSerializer(<span style="color: #0000ff">typeof</span>(T));</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum20"> 20:</span>  </pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum21"> 21:</span> <span style="color: #0000ff">using</span> (var stringReader = <span style="color: #0000ff">new</span> StringReader(pXmlizedString))</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum22"> 22:</span> <span style="color: #0000ff">return</span> (T)xmlSerializer.Deserialize(stringReader);</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum23"> 23:</span> </pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum24"> 24:</span> }</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum25"> 25:</span> }</pre> <!--CRLF--></div> </div> <p>Spesso i tempi stretti e la pigrizia ci impediscono di studiare meglio il nostro amato Framework e che dire <a href="http://msdn.microsoft.com/it-it/library/system.xml.serialization.xmlserializer(VS.80).aspx">XmlSerializer</a> c’è dalla versione 2.0.</p> <p>S.</p><img src="http://blogs.ugidotnet.org/sonny/aggbug/98278.aspx" width="1" height="1" /> Sonny http://blogs.ugidotnet.org/sonny/archive/2010/03/30/xmlserializer-percheacute-no.aspx Tue, 30 Mar 2010 00:58:09 GMT http://blogs.ugidotnet.org/sonny/archive/2010/03/30/xmlserializer-percheacute-no.aspx#feedback 1 http://blogs.ugidotnet.org/sonny/comments/commentRss/98278.aspx http://blogs.ugidotnet.org/sonny/services/trackbacks/98278.aspx Attraversare ricorsivamente un grafo di oggetti http://blogs.ugidotnet.org/sonny/archive/2010/03/29/attraversare-ricorsivamente-un-grafo-di-oggetti.aspx <p>Spesso mi capita di dover attraversare ricorsivamente un grafo di oggetti, pensate a delle folder che hanno all’interno delle altre folder che hanno all’interno delle altre folder e via così.. Mi sono chiesto è possibile creare un Extension Method che faccia questo lavoro e in base ad una condizione mi restituisca, ad esempio, la folder con un nome o un id voluto ?</p> <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"> <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1"> 1:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> <span style="color: #0000ff">class</span> FindRecorsive</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2"> 2:</span> {</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3"> 3:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> IEnumerable&lt;T&gt; Traverse&lt;T&gt;(<span style="color: #0000ff">this</span> IEnumerable&lt;T&gt; source, Func&lt;T, IEnumerable&lt;T&gt;&gt; fnRecurse)</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4"> 4:</span> {</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5"> 5:</span> <span style="color: #0000ff">foreach</span> (T item <span style="color: #0000ff">in</span> source)</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6"> 6:</span> {</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7"> 7:</span> <span style="color: #0000ff">yield</span> <span style="color: #0000ff">return</span> item;</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8"> 8:</span>  </pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9"> 9:</span> var seqRecurse = fnRecurse(item);</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10"> 10:</span>  </pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11"> 11:</span> <span style="color: #0000ff">if</span> (seqRecurse != <span style="color: #0000ff">null</span>)</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum12"> 12:</span> <span style="color: #0000ff">foreach</span> (T itemRecurse <span style="color: #0000ff">in</span> Traverse(seqRecurse, fnRecurse))</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum13"> 13:</span> <span style="color: #0000ff">yield</span> <span style="color: #0000ff">return</span> itemRecurse;</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum14"> 14:</span> }</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum15"> 15:</span> }</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum16"> 16:</span> }</pre> <!--CRLF--></div> </div> <p>Bene ora è semplice utilizzare questo Extension Method per raggiungere il nostro scopo</p> <p>Entità</p> <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"> <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1"> 1:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">class</span> Item</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2"> 2:</span> {</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3"> 3:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">int</span> Id { get; set; }</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4"> 4:</span> <span style="color: #0000ff">public</span> List&lt;Item&gt; Items { get; set; }</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5"> 5:</span> }</pre> <!--CRLF--></div> </div> <p>Utilizzo</p> <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"> <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1"> 1:</span> var find = items.Traverse(item =&gt; item.Items).FirstOrDefault(i =&gt; i.Id == 100);</pre> <!--CRLF--></div> </div> <p>Sonny</p><img src="http://blogs.ugidotnet.org/sonny/aggbug/98273.aspx" width="1" height="1" /> Sonny http://blogs.ugidotnet.org/sonny/archive/2010/03/29/attraversare-ricorsivamente-un-grafo-di-oggetti.aspx Mon, 29 Mar 2010 10:39:32 GMT http://blogs.ugidotnet.org/sonny/archive/2010/03/29/attraversare-ricorsivamente-un-grafo-di-oggetti.aspx#feedback http://blogs.ugidotnet.org/sonny/comments/commentRss/98273.aspx http://blogs.ugidotnet.org/sonny/services/trackbacks/98273.aspx Microsoft Visual Studio 2010 Express for Window Phone http://blogs.ugidotnet.org/sonny/archive/2010/03/27/microsoft-visual-studio-2010-express-for-window-phone.aspx <p>Guardando i video del MIX mi è venuta voglia di provare a fare un piccolo programma in Window Phone per la lettura dei feed RSS. Così presi armi e bagagli mi sono documentato ed ecco qua in pochi click ho il mio lettore.</p> <p><a href="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/sonny/WindowsLiveWriter/MicrosoftVisualStudio2010ExpressforWindo_300/image_2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/sonny/WindowsLiveWriter/MicrosoftVisualStudio2010ExpressforWindo_300/image_thumb.png" width="152" height="297" /></a> </p> <p>Ma è così difficile ? Non direi proprio anzi ( una goduria… ) Prima di tutto ho scaricato dal sito <a href="http://www.microsoft.com/express/phone/">http://www.microsoft.com/express/phone/</a> la mia versione di Microsoft Visual Studio 2010 Express for Window Phone che contiene “solo” IExplorer ( la prima cosa che ho fatto è stata collegarmi a facebook ed inserire un post ). Poi al solito creo un nuovo progetto e mi si apre una fantastica schermata ( xaml a destra ed emulatore a sinistra ).</p> <p><a href="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/sonny/WindowsLiveWriter/MicrosoftVisualStudio2010ExpressforWindo_300/image_4.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/sonny/WindowsLiveWriter/MicrosoftVisualStudio2010ExpressforWindo_300/image_thumb_1.png" width="335" height="209" /></a> </p> <p>inizio ad inserire i miei Textbox, Button, Label come se fossi su un’applicazione Silverlight</p> <p>Xaml</p> <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"> <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1"> 1:</span> &lt;phoneNavigation:PhoneApplicationPage </pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2"> 2:</span> x:Class=<span style="color: #006080">"WindowsPhoneApp.MainPage"</span></pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3"> 3:</span> xmlns=<span style="color: #006080">"http://schemas.microsoft.com/winfx/2006/xaml/presentation"</span></pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4"> 4:</span> xmlns:x=<span style="color: #006080">"http://schemas.microsoft.com/winfx/2006/xaml"</span></pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5"> 5:</span> xmlns:phoneNavigation=<span style="color: #006080">"clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Navigation"</span></pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6"> 6:</span> xmlns:d=<span style="color: #006080">"http://schemas.microsoft.com/expression/blend/2008"</span></pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7"> 7:</span> xmlns:mc=<span style="color: #006080">"http://schemas.openxmlformats.org/markup-compatibility/2006"</span></pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8"> 8:</span> mc:Ignorable=<span style="color: #006080">"d"</span> d:DesignWidth=<span style="color: #006080">"480"</span> d:DesignHeight=<span style="color: #006080">"800"</span></pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9"> 9:</span> FontFamily=<span style="color: #006080">"{StaticResource PhoneFontFamilyNormal}"</span></pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10"> 10:</span> FontSize=<span style="color: #006080">"{StaticResource PhoneFontSizeNormal}"</span></pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11"> 11:</span> Foreground=<span style="color: #006080">"{StaticResource PhoneForegroundBrush}"</span>&gt;</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum12"> 12:</span>  </pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum13"> 13:</span> </pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum14"> 14:</span> &lt;Grid x:Name=<span style="color: #006080">"LayoutRoot"</span> HorizontalAlignment=<span style="color: #006080">"Stretch"</span></pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum15"> 15:</span> Background=<span style="color: #006080">"{StaticResource PhoneBackgroundBrush}"</span>&gt;</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum16"> 16:</span> &lt;Grid.RowDefinitions&gt;</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum17"> 17:</span> &lt;RowDefinition Height=<span style="color: #006080">"Auto"</span>/&gt;</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum18"> 18:</span> &lt;RowDefinition Height=<span style="color: #006080">"Auto"</span>/&gt;</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum19"> 19:</span> &lt;RowDefinition Height=<span style="color: #006080">"*"</span>/&gt;</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum20"> 20:</span> &lt;/Grid.RowDefinitions&gt;</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum21"> 21:</span> </pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum22"> 22:</span> &lt;Grid x:Name=<span style="color: #006080">"TitleGrid"</span> Grid.Row=<span style="color: #006080">"0"</span>&gt;</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum23"> 23:</span> &lt;TextBlock Text=<span style="color: #006080">"MY APPLICATION"</span> Grid.Row=<span style="color: #006080">"0"</span> x:Name=<span style="color: #006080">"textBlockPageTitle"</span> Style=<span style="color: #006080">"{StaticResource PhoneTextPageTitle1Style}"</span>/&gt;</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum24"> 24:</span> &lt;TextBlock Text=<span style="color: #006080">"RSS Reader"</span> Grid.Row=<span style="color: #006080">"0"</span> x:Name=<span style="color: #006080">"textBlockListTitle"</span> Style=<span style="color: #006080">"{StaticResource PhoneTextPageTitle2Style}"</span>/&gt;</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum25"> 25:</span> &lt;/Grid&gt;</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum26"> 26:</span> &lt;StackPanel Grid.Row=<span style="color: #006080">"1"</span> Orientation=<span style="color: #006080">"Horizontal"</span>&gt;</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum27"> 27:</span> &lt;TextBlock HorizontalAlignment=<span style="color: #006080">"Left"</span> Margin=<span style="color: #006080">"10,30,10,10"</span> Text=<span style="color: #006080">"Url :"</span> VerticalAlignment=<span style="color: #006080">"Top"</span> /&gt;</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum28"> 28:</span> &lt;TextBox HorizontalAlignment=<span style="color: #006080">"Left"</span> Text=<span style="color: #006080">"http://blogs.ugidotnet.org/sonny/Rss.aspx"</span> Width=<span style="color: #006080">"310"</span></pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum29"> 29:</span> Name=<span style="color: #006080">"_tbUrl"</span> VerticalAlignment=<span style="color: #006080">"Top"</span> HorizontalContentAlignment=<span style="color: #006080">"Stretch"</span>/&gt;</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum30"> 30:</span> &lt;Button Content=<span style="color: #006080">"Read"</span> HorizontalAlignment=<span style="color: #006080">"Left"</span> Name=<span style="color: #006080">"_bRead"</span> VerticalAlignment=<span style="color: #006080">"Top"</span> Click=<span style="color: #006080">"_bRead_Click"</span> /&gt;</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum31"> 31:</span> &lt;/StackPanel&gt;</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum32"> 32:</span> &lt;ListBox Grid.Row=<span style="color: #006080">"2"</span> HorizontalAlignment=<span style="color: #006080">"Left"</span> HorizontalContentAlignment=<span style="color: #006080">"Stretch"</span></pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum33"> 33:</span> Name=<span style="color: #006080">"_lbRssItems"</span> VerticalAlignment=<span style="color: #006080">"Top"</span>&gt;</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum34"> 34:</span> &lt;ListBox.ItemTemplate&gt;</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum35"> 35:</span> &lt;DataTemplate&gt;</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum36"> 36:</span> &lt;StackPanel Orientation=<span style="color: #006080">"Horizontal"</span> Height=<span style="color: #006080">"132"</span>&gt;</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum37"> 37:</span> &lt;StackPanel Width=<span style="color: #006080">"390"</span>&gt;</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum38"> 38:</span> &lt;TextBlock Text=<span style="color: #006080">"{Binding Title}"</span> Foreground=<span style="color: #006080">"#FFC8AB14"</span> FontSize=<span style="color: #006080">"28"</span> /&gt;</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum39"> 39:</span> &lt;TextBlock Text=<span style="color: #006080">"{Binding Description}"</span> Height=<span style="color: #006080">"100"</span> TextWrapping=<span style="color: #006080">"Wrap"</span> FontSize=<span style="color: #006080">"24"</span> /&gt;</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum40"> 40:</span> &lt;HyperlinkButton NavigateUri=<span style="color: #006080">"{Binding Link}"</span> Content=<span style="color: #006080">"Apri Feed"</span> /&gt;</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum41"> 41:</span> &lt;/StackPanel&gt;</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum42"> 42:</span> &lt;/StackPanel&gt;</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum43"> 43:</span> &lt;/DataTemplate&gt;</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum44"> 44:</span> &lt;/ListBox.ItemTemplate&gt;</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum45"> 45:</span>  </pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum46"> 46:</span> &lt;/ListBox&gt;</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum47"> 47:</span> &lt;/Grid&gt;</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum48"> 48:</span> </pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum49"> 49:</span> &lt;/phoneNavigation:PhoneApplicationPage&gt;</pre> <!--CRLF--></div> </div> <p /> <p>Metto in ordine i miei Binding, creo la mia entità RSSItem </p> <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"> <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1"> 1:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">class</span> RSSItem</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2"> 2:</span> {</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3"> 3:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">string</span> Title { get; set; }</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4"> 4:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">string</span> Link { get; set; }</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5"> 5:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">string</span> Description { get; set; }</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6"> 6:</span> }</pre> <!--CRLF--></div> </div> <p>Ed inizio a scrivere nella mia classe MainPage</p> <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"> <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1"> 1:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">partial</span> <span style="color: #0000ff">class</span> MainPage : PhoneApplicationPage</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2"> 2:</span> {</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3"> 3:</span> <span style="color: #0000ff">public</span> MainPage()</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4"> 4:</span> {</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5"> 5:</span> InitializeComponent();</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6"> 6:</span>  </pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7"> 7:</span> SupportedOrientations = SupportedPageOrientation.Portrait | SupportedPageOrientation.Landscape;</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8"> 8:</span> }</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9"> 9:</span>  </pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10"> 10:</span> <span style="color: #0000ff">private</span> <span style="color: #0000ff">void</span> _bRead_Click(<span style="color: #0000ff">object</span> sender, RoutedEventArgs e)</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11"> 11:</span> {</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum12"> 12:</span> GetRSSfile();</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum13"> 13:</span> }</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum14"> 14:</span>  </pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum15"> 15:</span> <span style="color: #0000ff">private</span> <span style="color: #0000ff">void</span> GetRSSfile()</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum16"> 16:</span> {</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum17"> 17:</span> <span style="color: #0000ff">if</span> (_tbUrl.Text == <span style="color: #0000ff">string</span>.Empty) <span style="color: #0000ff">return</span>;</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum18"> 18:</span>  </pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum19"> 19:</span> System.Uri uri = <span style="color: #0000ff">new</span> Uri(_tbUrl.Text);</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum20"> 20:</span> HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(uri);</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum21"> 21:</span> httpWebRequest.AllowReadStreamBuffering = <span style="color: #0000ff">false</span>;</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum22"> 22:</span> IAsyncResult result = (IAsyncResult)httpWebRequest.BeginGetResponse(</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum23"> 23:</span> <span style="color: #0000ff">new</span> AsyncCallback(RespCallback), httpWebRequest);</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum24"> 24:</span> }</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum25"> 25:</span>  </pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum26"> 26:</span> <span style="color: #0000ff">private</span> <span style="color: #0000ff">void</span> RespCallback(IAsyncResult asynchronousResult)</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum27"> 27:</span> { </pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum28"> 28:</span> HttpWebRequest myHttpWebRequest2 = (HttpWebRequest)asynchronousResult.AsyncState;</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum29"> 29:</span> HttpWebResponse response = (HttpWebResponse)myHttpWebRequest2.EndGetResponse(asynchronousResult);</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum30"> 30:</span>  </pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum31"> 31:</span> <span style="color: #0000ff">string</span> text;</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum32"> 32:</span> <span style="color: #0000ff">using</span>(StreamReader sr = <span style="color: #0000ff">new</span> StreamReader(response.GetResponseStream()))</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum33"> 33:</span> text = sr.ReadToEnd();</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum34"> 34:</span>  </pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum35"> 35:</span> LoadRSSItems(text); </pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum36"> 36:</span> }</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum37"> 37:</span>  </pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum38"> 38:</span> <span style="color: #0000ff">private</span> <span style="color: #0000ff">void</span> LoadRSSItems(<span style="color: #0000ff">string</span> text)</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum39"> 39:</span> {</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum40"> 40:</span> <span style="color: #0000ff">if</span> (text == <span style="color: #0000ff">string</span>.Empty) <span style="color: #0000ff">return</span>;</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum41"> 41:</span>  </pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum42"> 42:</span> XElement element = XElement.Parse(text);</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum43"> 43:</span>  </pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum44"> 44:</span> var ents = from node <span style="color: #0000ff">in</span> element.Descendants(<span style="color: #006080">"channel"</span>).Descendants(<span style="color: #006080">"item"</span>)</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum45"> 45:</span> select <span style="color: #0000ff">new</span> RSSItem</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum46"> 46:</span> {</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum47"> 47:</span> Title = node.Descendants(<span style="color: #006080">"title"</span>).FirstOrDefault().Value,</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum48"> 48:</span> Link = node.Descendants(<span style="color: #006080">"link"</span>).FirstOrDefault().Value,</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum49"> 49:</span> Description = HttpUtility.HtmlDecode(</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum50"> 50:</span> node.Descendants(<span style="color: #006080">"description"</span>).FirstOrDefault().Value),</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum51"> 51:</span> };</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum52"> 52:</span>  </pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum53"> 53:</span> Dispatcher.BeginInvoke(() =&gt; { _lbRssItems.ItemsSource = ents; }); </pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum54"> 54:</span> }</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum55"> 55:</span> }</pre> <!--CRLF--></div> </div> <p>F5 e voilà parte l’emulatore</p> <p><a href="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/sonny/WindowsLiveWriter/MicrosoftVisualStudio2010ExpressforWindo_300/image_2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/sonny/WindowsLiveWriter/MicrosoftVisualStudio2010ExpressforWindo_300/image_thumb.png" width="260" height="456" /></a> </p> <p>Certo, c’è sicuramente qualcosa da sistemare ( vedi la descrizione in html ) ma per mezz’ora di divertimento ne vale proprio la pena.</p> <p>Sonny</p><img src="http://blogs.ugidotnet.org/sonny/aggbug/98270.aspx" width="1" height="1" /> Sonny http://blogs.ugidotnet.org/sonny/archive/2010/03/27/microsoft-visual-studio-2010-express-for-window-phone.aspx Sat, 27 Mar 2010 01:13:18 GMT http://blogs.ugidotnet.org/sonny/archive/2010/03/27/microsoft-visual-studio-2010-express-for-window-phone.aspx#feedback http://blogs.ugidotnet.org/sonny/comments/commentRss/98270.aspx http://blogs.ugidotnet.org/sonny/services/trackbacks/98270.aspx IE9 provare per credere http://blogs.ugidotnet.org/sonny/archive/2010/03/18/ie9-provare-per-credere.aspx <p>Dal Mix spuntano mirabolanti soprese ma per provarle?</p> <p><a href="http://ie.microsoft.com/testdrive/"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/sonny/WindowsLiveWriter/IE9provarepercredere_B1AD/image_3.png" width="338" height="100" /></a> </p> <p>La versione di prova non ha nemmeno la barra degli indirizzi e i menu di navigazione ma si puo’ usare tranquillamente per i propri test attraverso delle scorciatoie da tastiera oppure navigando sui menu del programma.</p> <p>Ecco gli shorcuts disponibili:</p> <p>Ctrl + O:  Apre una pagina web <br />F5: Refresh <br />F10: Home <br />F12: Developer Toolbar <br />Alt + 5: Forza in modalità di rendering IE5 <br />Alt + 7: Forza in modalità di rendering IE7 <br />Alt + 8: Forza in modalità di rendering IE8 <br />Alt + 9: Forza in modalità di rendering IE9 <br />Alt + 0: Resetta al default <br />Ctrl +/-: zoom in e out <br />Alt + ?: Help <br />Ctrl + S: Salva la pagina web come… <br />Alt + /: Informazioni su…</p> <p>Dai che si va ;)</p> <p>S.</p><img src="http://blogs.ugidotnet.org/sonny/aggbug/98230.aspx" width="1" height="1" /> Sonny http://blogs.ugidotnet.org/sonny/archive/2010/03/18/ie9-provare-per-credere.aspx Thu, 18 Mar 2010 13:38:16 GMT http://blogs.ugidotnet.org/sonny/archive/2010/03/18/ie9-provare-per-credere.aspx#feedback http://blogs.ugidotnet.org/sonny/comments/commentRss/98230.aspx http://blogs.ugidotnet.org/sonny/services/trackbacks/98230.aspx Mix2010 Spettacolo !! http://blogs.ugidotnet.org/sonny/archive/2010/03/18/mix2010-spettacolo.aspx <p>Per tutti quelli che amano lo Spettacolo lascio il link dei video.</p> <p><a href="http://www.microsoft.com/presspass/events/mix/VideoGallery.aspx">Video Gallery</a> e <a href="http://live.visitmix.com/Videos">qui</a></p> <p><a href="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/sonny/WindowsLiveWriter/Mix2010Spettacolo_83F1/image_2.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/sonny/WindowsLiveWriter/Mix2010Spettacolo_83F1/image_thumb.png" width="375" height="211" /></a></p><img src="http://blogs.ugidotnet.org/sonny/aggbug/98227.aspx" width="1" height="1" /> Sonny http://blogs.ugidotnet.org/sonny/archive/2010/03/18/mix2010-spettacolo.aspx Thu, 18 Mar 2010 10:23:30 GMT http://blogs.ugidotnet.org/sonny/archive/2010/03/18/mix2010-spettacolo.aspx#feedback http://blogs.ugidotnet.org/sonny/comments/commentRss/98227.aspx http://blogs.ugidotnet.org/sonny/services/trackbacks/98227.aspx Microsoft is Evil or not ? http://blogs.ugidotnet.org/sonny/archive/2010/03/09/microsoft-is-evil-or-not.aspx <p>Microsoft, nel modo informatico e anche nella cinematografia ( avete fatto caso che i computer dei protagonisti sono tutti Mac ? ), è sempre stata vista come il male assoluto: è la compagnia che vuole avere tutto sempre in causa con l’antitrust. Ma è proprio così ? Avete mai pensato a Google in ottica negativa? Eppure il ‘grande fratello’ Google raccoglie un sacco di dati su di noi e potrebbe avere un’enorme influenza sulla nostra navigazione. Ecco un’altro punto di vista.</p> <p>Buona visione,</p> <p><object width="400" height="300"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=9925756&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=9925756&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300" /></object></p> <p><a href="http://vimeo.com/9925756">THE BEAST FILE: GOOGLE</a> from <a href="http://vimeo.com/user1840160">Hungry Beast</a> on <a href="http://vimeo.com">Vimeo</a>.</p> <p>Sonny</p><img src="http://blogs.ugidotnet.org/sonny/aggbug/98160.aspx" width="1" height="1" /> Sonny http://blogs.ugidotnet.org/sonny/archive/2010/03/09/microsoft-is-evil-or-not.aspx Tue, 09 Mar 2010 11:00:14 GMT http://blogs.ugidotnet.org/sonny/archive/2010/03/09/microsoft-is-evil-or-not.aspx#feedback 1 http://blogs.ugidotnet.org/sonny/comments/commentRss/98160.aspx http://blogs.ugidotnet.org/sonny/services/trackbacks/98160.aspx Regular Expressions divertendosi ; ) http://blogs.ugidotnet.org/sonny/archive/2010/01/27/regular-expressions-divertendosi.aspx <p>Molti di voi leggendo questo titolo diranno : “Ma è pazzo!” Una parte delle persone che mi conosce ne è convinto, ma dovendo scrivere una RegEx particolare per un particolare problema e giocando un po’ con la fluent interface sono capitato su questo <a href="http://flimflan.com/blog/ReadableRegularExpressions.aspx">sito</a>. Questo caro ragazzo ha avuto il coraggio ( e il merito ) di rendere una cosa noiosa( e prona agli errori) come la scrittura di una RegEx, in un operazione divertente. Non ci credete facciamo due esempi:</p> <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"> <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1"> 1:</span> Regex socialSecurityNumberCheck = <span style="color: #0000ff">new</span> Regex(<span style="color: #006080">@"^\d{3}-?\d{2}-?\d{4}$"</span>);</pre> <!--CRLF--></div> </div> <style type="text/css"><![CDATA[ .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; }]]></style><style type="text/css"><![CDATA[ .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; }]]></style> <p>è diventata</p> <p /> <div class="csharpcode"> <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"> <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1"> 1:</span> Regex socialSecurityNumberCheck = <span style="color: #0000ff">new</span> Regex(Pattern.With.AtBeginning</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2"> 2:</span> .Digit.Repeat.Exactly(3)</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3"> 3:</span> .Literal(<span style="color: #006080">"-"</span>).Repeat.Optional</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4"> 4:</span> .Digit.Repeat.Exactly(2)</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5"> 5:</span> .Literal(<span style="color: #006080">"-"</span>).Repeat.Optional</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6"> 6:</span> .Digit.Repeat.Exactly(4)</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7"> 7:</span> .AtEnd);</pre> <!--CRLF--></div> </div> </div> <style type="text/css"><![CDATA[ .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; }]]></style> <p>e questa</p> <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"> <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1"> 1:</span> <span style="color: #0000ff">const</span> <span style="color: #0000ff">string</span> findGamesPattern = <span style="color: #006080">@"&lt;div\s*class="</span><span style="color: #006080">"game"</span><span style="color: #006080">"\s*id="</span><span style="color: #006080">"(?&lt;gameID&gt;\d+)-game"</span><span style="color: #006080">"(?&lt;content&gt;.*?)&lt;!--gameStatus\s*=\s*(?&lt;gameState&gt;\d+)--&gt;"</span>;</pre> <!--CRLF--></div> </div> <style type="text/css"><![CDATA[ .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; }]]></style> <p /> <p>è diventata</p> <div class="csharpcode"> <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"> <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1"> 1:</span> Pattern findGamesPattern = Pattern.With.Literal(<span style="color: #006080">@"&lt;div"</span>)</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2"> 2:</span> .WhiteSpace.Repeat.ZeroOrMore</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3"> 3:</span> .Literal(<span style="color: #006080">@"class="</span><span style="color: #006080">"game"</span><span style="color: #006080">""</span>).WhiteSpace.Repeat.ZeroOrMore.Literal(<span style="color: #006080">@"id="</span><span style="color: #006080">""</span>)</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4"> 4:</span> .NamedGroup(<span style="color: #006080">"gameId"</span>, Pattern.With.Digit.Repeat.OneOrMore)</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5"> 5:</span> .Literal(<span style="color: #006080">@"-game"</span><span style="color: #006080">""</span>)</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6"> 6:</span> .NamedGroup(<span style="color: #006080">"content"</span>, Pattern.With.Anything.Repeat.Lazy.ZeroOrMore)</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7"> 7:</span> .Literal(<span style="color: #006080">@"&lt;!--gameStatus"</span>)</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8"> 8:</span> .WhiteSpace.Repeat.ZeroOrMore.Literal(<span style="color: #006080">"="</span>).WhiteSpace.Repeat.ZeroOrMore</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9"> 9:</span> .NamedGroup(<span style="color: #006080">"gameState"</span>, Pattern.With.Digit.Repeat.OneOrMore)</pre> <!--CRLF--> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10"> 10:</span> .Literal(<span style="color: #006080">"--&gt;"</span>);</pre> <!--CRLF--></div> </div> </div> <style type="text/css"><![CDATA[ .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; }]]></style> <p /> <p>veramente un buon lavoro grazie <a href="http://flimflan.com/blog/default.aspx">Joshua Flanagan</a></p> <p>Per il link alla libreria ReadableRex <a href="http://flimflan.com/files/ReadableRex_source.zip">Source</a> e <a href="http://flimflan.com/files/ReadableRex_DLL.zip">Dll</a></p> <p>Sonny</p><img src="http://blogs.ugidotnet.org/sonny/aggbug/97910.aspx" width="1" height="1" /> Sonny http://blogs.ugidotnet.org/sonny/archive/2010/01/27/regular-expressions-divertendosi.aspx Wed, 27 Jan 2010 23:31:20 GMT http://blogs.ugidotnet.org/sonny/archive/2010/01/27/regular-expressions-divertendosi.aspx#feedback 1 http://blogs.ugidotnet.org/sonny/comments/commentRss/97910.aspx http://blogs.ugidotnet.org/sonny/services/trackbacks/97910.aspx V&deg; UGIALT.net Conference http://blogs.ugidotnet.org/sonny/archive/2010/01/24/vdeg-ugialt.net-conference.aspx <p>Oggi si è tenuta la UgiALT Conference a Milano, che dire, sicuramente una conference ad alto livello. Track veramente stimolanti ci hanno accompagnato tutto il giorno. Le mie preferite :</p> <h6>TDD: Migliaia di Red-Green-Refactor dopo...</h6> <i>Speaker:</i> <b>Omid Ehsani</b> <br />Per molti abbracciare il Test Driven Development è come avere un’illuminazione: il prodotto che ne risulta è notevolmente più robusto e manutenibile, e si riconquista il piacere di scrivere codice. Ma, come accade a volte, a un grande entusiasmo iniziale può seguire una disillusione se non si mantiene una costante consapevolezza che i test automatici fanno parte della base del codice, e come tali vanno organizzati e mantenuti. In questa sessione si discutono temi come l’organizzazione, l’affidabilità, la manutenibilità, e la leggibilità dei test automatici. <br /> <br /><a></a><a></a> <h6>Behavior Driven Development</h6> <i>Speaker:</i> <b>Hadi Hariri</b> <br />Behavior Driven Development is not just TDD with a different name. In this session we'll examine the differences and look at how to leverage BDD with traditional frameworks such as NUnit or more specific frameworks such as MSpec. <br /><a></a><a></a> <h6> </h6> <h6>Mocking: come, quando, perchè e perchè no. (talk + openspace)</h6> <i>Speaker:</i> <b>Emanuele DelBono</b> <br />Nella pratica dello unit testing e ancora di più nel test driven development diventa spesso necessario utilizzare stub e mock per poter testare una classe in modo indipendente dalle altre. L'introduzione di questi oggetti porta spesso alla complicazione dei test e ad una fragilità troppo elevata che si nota non appena si inzia a fare refactoring. La sessione sarà suddivisa in parti: nella prima parleremo di mock objects, di framework di mock e di come e perchè questi ci possono aiutare nella scrittura dei test. Nella seconda parte discuteremo per capire come usarli senza rendere i nostri test troppo fragili e poco leggibili.  <br /> <p> </p> <p>Ho trovato che la soluzione OpenSpace &amp; OpenMind è sempre la più interessante. Ringrazio Omid per la bella chiacchierata.</p> <p>Un ringraziamento doveroso va agli organizzatori <a href="http://blog.codiceplastico.com/">Emanuele</a> <a href="http://blogs.ugidotnet.org/makka/Default.aspx">Scott</a> e <a href="http://codeclimber.net.nz/">Simone</a> </p> <p>Come al solito il clima amichevole ha contribuito alla buona riuscita.</p> <p>Sonny</p><img src="http://blogs.ugidotnet.org/sonny/aggbug/97901.aspx" width="1" height="1" /> Sonny http://blogs.ugidotnet.org/sonny/archive/2010/01/24/vdeg-ugialt.net-conference.aspx Sun, 24 Jan 2010 00:04:53 GMT http://blogs.ugidotnet.org/sonny/archive/2010/01/24/vdeg-ugialt.net-conference.aspx#feedback http://blogs.ugidotnet.org/sonny/comments/commentRss/97901.aspx http://blogs.ugidotnet.org/sonny/services/trackbacks/97901.aspx Window 7 parte lentamente http://blogs.ugidotnet.org/sonny/archive/2010/01/20/window-7-parte-lentamente.aspx <p>Mi è capitato di impostare un colore a tinta unita come sfondo del desktop e all’avvio ottenevo un ritardo nel quale il computer resta in attesa sulla schermata iniziale di Windows (logon). La cosa non accadeva se impostavo un immagine di sfondo. Ma che succede?! Dico io.</p> <p>Ho scoperto che si tratta di un bug di Window 7 e Windows Server 2008 R2</p> <p><a href="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/sonny/WindowsLiveWriter/Window7partelentamente_AF18/image_2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/sonny/WindowsLiveWriter/Window7partelentamente_AF18/image_thumb.png" width="222" height="45" /></a> </p> <p>ecco qui la <a href="http://support.microsoft.com/kb/977346">fix</a>.</p> <p>Sonny</p><img src="http://blogs.ugidotnet.org/sonny/aggbug/97887.aspx" width="1" height="1" /> Sonny http://blogs.ugidotnet.org/sonny/archive/2010/01/20/window-7-parte-lentamente.aspx Wed, 20 Jan 2010 13:27:01 GMT http://blogs.ugidotnet.org/sonny/archive/2010/01/20/window-7-parte-lentamente.aspx#feedback http://blogs.ugidotnet.org/sonny/comments/commentRss/97887.aspx http://blogs.ugidotnet.org/sonny/services/trackbacks/97887.aspx Office 2010 &ldquo;gela&rdquo; Visual Studio2008 http://blogs.ugidotnet.org/sonny/archive/2010/01/16/office-2010-ldquogelardquo-visual-studio2008.aspx <p>Oggi ho riscontrato un problema veramente assurdo: installando la versione beta di Office 2010 mi ha “congelato” il designer di Visual Studio sulla modifica della pagine aspx. All’inizio non avevo legato le due situazioni, ma come dicono spesso i clienti, “Io non ho modificato niente e ad un tratto ha smesso di funzionare.” Aprendo una pagina Aspx con il designer di Visual Studio mi partiva l’installazione di qualcosa, senza indicarmi “che cosa??”, vani erano i tentativi di ripristino e l’unico modo era eliminare il task.</p> <p>Veniamo a noi, da una ricerca ho capito che poteva essere l’installazione di Office a provocarmi il problema. In particolare “Microsoft Visual Studio Web Authoring Component” una parte di Office 2007 veniva sovrascritta causando il problema di “congelamento”. Sapete con sto freddo !! :)</p> <p>L’unico modo di risolvere il problema è avviare Office 2007 e ripristinare la versione precedente di “Microsoft Visual Studio Web Authoring Component”</p> <p><a href="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/sonny/WindowsLiveWriter/Office2010gelaVisualStudio2008_13B8/image_2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/sonny/WindowsLiveWriter/Office2010gelaVisualStudio2008_13B8/image_thumb.png" width="311" height="264" /></a> </p> <p>Ho capito che questo componente è in comune con più applicazioni quindi anche se sembra non essere importante causa il problema.</p> <p>Per dovere di cronaca il setup si trova sotto:</p> <p><strong>Windows 64bit</strong></p> <p>C:\Program Files (x86)\Common Files\microsoft shared\OFFICE12\Office Setup Controller\Setup.exe</p> <p><strong>Windows 32bit</strong></p> <p>C:\Program Files\Common Files\microsoft shared\OFFICE12\Office Setup Controller\Setup.exe</p> Sonny <img src="http://blogs.ugidotnet.org/sonny/aggbug/97870.aspx" width="1" height="1" /> Sonny http://blogs.ugidotnet.org/sonny/archive/2010/01/16/office-2010-ldquogelardquo-visual-studio2008.aspx Sat, 16 Jan 2010 02:24:23 GMT http://blogs.ugidotnet.org/sonny/archive/2010/01/16/office-2010-ldquogelardquo-visual-studio2008.aspx#feedback 1 http://blogs.ugidotnet.org/sonny/comments/commentRss/97870.aspx http://blogs.ugidotnet.org/sonny/services/trackbacks/97870.aspx Windows 7: come aggiornare dalla RC (o beta ) alla RTM http://blogs.ugidotnet.org/sonny/archive/2009/09/04/windows-7-come-aggiornare-dalla-rc-o-beta-alla.aspx <p>Prima di “piallare tutto” e installare la RTM mi sono chiesto se era possibile fare un Update. Molti di voi, come me, hanno potuto apprezzare Window7 e magari hanno già già installato molti applicativi. Quindi è possibile risparmiare tempo ? La risposta è semplice SI. Preciso subito che questa procedura non è consigliata da Microsoft e praticamente nessuno si assume la responsabilità su eventuali danni al computer, traumi esistenziali, perdite di capelli, dolori al pancreas etc. Io ho provato con Windows 7 Ultimate e qui tutto è andato per il meglio.</p> <p>Partiamo con la nostra bella iso già scaricata.</p> <ol> <li>Per prima cosa aprire e scompattare l’immagine ISO di Windows 7 RTM in una cartella a scelta </li> <li>Aprire con il notepad il file cversion.ini che si trova sotto la cartella Sources</li> <li>Modificare il valore MinClient in 7000 per la beta e in 7100 per la RC chiudere e salvare.</li> <li>Avviare il programma setup.exe contenuto nella cartella copiata sull’HDD. </li> <li>Quando è richiesto, scegliere l’opzione di Aggiornamento e procedere con l’installazione.</li> </ol> <p>Spero che questo articolo possa essere utile</p><img src="http://blogs.ugidotnet.org/sonny/aggbug/96997.aspx" width="1" height="1" /> Sonny http://blogs.ugidotnet.org/sonny/archive/2009/09/04/windows-7-come-aggiornare-dalla-rc-o-beta-alla.aspx Fri, 04 Sep 2009 15:43:23 GMT http://blogs.ugidotnet.org/sonny/archive/2009/09/04/windows-7-come-aggiornare-dalla-rc-o-beta-alla.aspx#feedback 1 http://blogs.ugidotnet.org/sonny/comments/commentRss/96997.aspx http://blogs.ugidotnet.org/sonny/services/trackbacks/96997.aspx Qualcuno di voi sta provando Window7 ? http://blogs.ugidotnet.org/sonny/archive/2009/06/11/qualcuno-di-voi-sta-provando-window7.aspx <p>Chiaramente la domanda è ironica visto la percentuale di download di Window7. Vi ricordate i vecchi programmi di tweaking, come erano comodi per velocizzare, configurare i nostri amati o odiati sistemi operativi.</p> <p>Ora anche per Window7 ho scovato un programma di tweaking che ci permette di fare moltissime cose cito dal sito:</p> <h5>“EnhanceMySe7en Free </h5> <br />Windows 7 is fast and it is quite satisfying in the role of replacing Windows XP and Vista, but you can make it much faster and responsible with EnhanceMySe7en. <br />EnhanceMySe7en helps users to control many aspects of the system with maximum convenience. <br />You will get everything needed for maintaining Windows 7 in a perfect condition. The program offers tools that take care of the registry, disk space and its defragmentation, installed software, HDD temperature and all sorts of things related to system's health. Also there are lots of other options helping to boost your system's performance. <p>With a clean and simple interface it brings you an All-in-One set of powerful and neatly classified tools, settings and tweaks”</p> <p>Perche non provare?</p> <p><a href="http://seriousbit.com/tweak_windows_7/"><img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="189" alt="image" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/sonny/WindowsLiveWriter/QualcunodivoistaprovandoWindow7_14C35/image_3.png" width="244" border="0" /></a></p><img src="http://blogs.ugidotnet.org/sonny/aggbug/96402.aspx" width="1" height="1" /> Sonny http://blogs.ugidotnet.org/sonny/archive/2009/06/11/qualcuno-di-voi-sta-provando-window7.aspx Thu, 11 Jun 2009 00:37:29 GMT http://blogs.ugidotnet.org/sonny/archive/2009/06/11/qualcuno-di-voi-sta-provando-window7.aspx#feedback http://blogs.ugidotnet.org/sonny/comments/commentRss/96402.aspx http://blogs.ugidotnet.org/sonny/services/trackbacks/96402.aspx [OT] Come uso la tastiera http://blogs.ugidotnet.org/sonny/archive/2009/06/11/ot-come-uso-la-tastiera.aspx <p>Tutti noi scriviamo sulla tastiera a nostro modo, c’è chi usa una mano sola, c’è chi non guarda neppure le lettere, c’è chi usa tastiere completamente nere ( per chi mi conosce il riferimento è certamente “casuale”) e via discorrendo.</p> <p>Ma vi siete mai chiesti come si scrive correttamente? Curiosamente mi sono imbattuto su questo sito <a title="http://www.typingweb.com/typingtutor/" href="http://www.typingweb.com/typingtutor/">http://www.typingweb.com/typingtutor/</a> e devo dire, che dopo essermi iscritto, ne ho scoperte delle belle. Seguendo i tutorial si impara l’arte di padroneggiare la tastiera. Per noi sviluppatori può essere un valido aiuto.</p> <p>Che ne pensate?</p> <p><a href="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/sonny/WindowsLiveWriter/OTComeusolatastiera_147D6/image_2.png"><img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="56" alt="image" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/sonny/WindowsLiveWriter/OTComeusolatastiera_147D6/image_thumb.png" width="244" border="0" /></a></p><img src="http://blogs.ugidotnet.org/sonny/aggbug/96401.aspx" width="1" height="1" /> Sonny http://blogs.ugidotnet.org/sonny/archive/2009/06/11/ot-come-uso-la-tastiera.aspx Thu, 11 Jun 2009 00:18:49 GMT http://blogs.ugidotnet.org/sonny/archive/2009/06/11/ot-come-uso-la-tastiera.aspx#feedback 1 http://blogs.ugidotnet.org/sonny/comments/commentRss/96401.aspx http://blogs.ugidotnet.org/sonny/services/trackbacks/96401.aspx