﻿<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:blogChannel="http://backend.userland.com/blogChannelModule" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#">
  <channel>
    <title>della mia vita e di altre amenità</title>
    <description>L'unico blog di Andrea Boschin</description>
    <link>http://blog.boschin.it/</link>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>BlogEngine.NET 2.9.1.0</generator>
    <language>it-IT</language>
    <blogChannel:blogRoll>http://blog.boschin.it/opml.axd</blogChannel:blogRoll>
    <blogChannel:blink>http://www.dotnetblogengine.net/syndication.axd</blogChannel:blink>
    <dc:creator>Andrea Boschin</dc:creator>
    <dc:title>della mia vita e di altre amenità</dc:title>
    <geo:lat>456,585.000000</geo:lat>
    <geo:long>1,219,178.000000</geo:long>
    <item>
      <title>Al Rifugio Alpino Dino e Giovanni Chiggiato (mt 1911) segnavia 261 da località “La Stua” di Calalzo di Cadore</title>
      <description>&lt;p align="justify"&gt;Lo scorso anno verso fine estate qualcuno mi ha chiesto di pubblicare gli itinerari che avevo percorso nelle precedenti settimane attraverso le montagne del Cadore, della Val Zoldana e della Val Pusteria. Complici la ripresa delle attività invernali, e vari impegni, alla fine non ho più fatto nulla e questi piacevoli camminate sono cadute un po’ nell’oblio, rimanendo poco più di un bel ricordo nella mia testa. Quest’anno, mentre si avvicina la data ufficiale della riapertura estiva dei rifugi, ho deciso di provare ad impegnarmi a parlarvi più dettagliatamente di queste mie scorribande tra cengie e bivacchi, pubblicando assieme ai dettagli di ogni escursione anche qualche foto e le mie impressioni. Sabato 3 Giugno ho deciso di affrontare la salita ad un rifugio che tipicamente è già in attività quando gli altri ancora non hanno aperto la stagione, tanto è vero che anche nel periodo primaverile, in occasione di alcuni weekend il rifugio apre i battenti e offre l’occasione di raggiungerlo magari muniti di ciaspe e assaporare le piacevoli pietanze preparate dalla moglie del gestore. &lt;/p&gt;&lt;p align="justify"&gt;Il &lt;a href="http://www.rifugiochiggiato.it/" target="_blank"&gt;Rifugio Alpino Dino e Giovanni Chiggiato&lt;/a&gt;, si trova nella parte iniziale del Cadore, poco lontano da Calazo di Cadore, per chi proviene dalla pianura e questo è un vantaggio indiscutibile rispetto ai più blasonati rifugi dolomitici perchè è possibile raggiungerlo in giornata, anche nei giorni di maggiore frequenza, senza rischiare di fare ore e ore di coda al rientro, dato che è molto meno distante da Longarone e dall’autostrada rispetto a molti altri. Tuttavia aspettatevi comunque un po’ di coda se lo raggiungete nelle giornate più critiche come la Domenica. Quest’anno l’ho scelto come “apripista”, un po per allenare il fiato, un po’ perchè dopo averlo visitato l’anno scorso mi è rimasto impresso per la bellezza del paesaggio nel quale è collocato oltre che per la cura con cui il gestore ne conserva la struttura (Premiato nel 2015 come miglior Rifugio del Cadore). Negli anni scorsi lo avevo sempre un po’ snobbato per un errore di valutazione, complice l’altitudine non troppo elevata (1911 m.s.l.m) e il fatto che sia pubblicizzato da cartelloni all’uscita dell’autostrada, avevo erroneamente pensato si trattasse di un luogo eccessivamente frequentato dal peggiore turismo, ma in realtà ho scoperto in esso un punto da raggiungere spesso per passare una giornata immersi nella tranquillità ricavata tra alcune delle più belle cime delle Dolomiti. &lt;/p&gt;&lt;p align="justify"&gt;&lt;a href="http://blog.boschin.it/image.axd?picture=image_13.png" target="_blank"&gt;&lt;img width="610" height="480" title="image" align="left" style="margin: 0px 10px 10px 0px; border-image: none; float: left; display: inline;" alt="image" src="http://blog.boschin.it/image.axd?picture=image_thumb_11.png"&gt;&lt;/a&gt;Quest’anno ho scelto la salita più classica, il sentiero che parte dalla località “La Stua” (segnavia 261) e risale la montagna con una pendenza pressoche invariata dall’inizio alla fine. In effetti trattandosi del sentiero più battutto, costituito in gran parte da una stretta stradina ben segnata e curata – diversamente dai sentieri dei rifugi più importanti che spesso sono irti e costellati da continui sassi e radici che ostacolano il passo – si può essere portati a pensare che sia facile. In realtà, le 2 ore nominali di questo percorso si rivelano un impegno atletico “importante” dato che il sentiero non vi darà tregua, richiedendovi minuto dopo minuto di attingere a tutta l’energia che avete nelle vostre gambe per arrivare alla agognata destinazione. &lt;/p&gt;&lt;p align="justify"&gt;La partenza del sentiero è situata in località “La Stua”, raggiungibile in macchina, mantenendo la destra dopo il ponticello che si trova poco dopo la Chiesetta del Caravaggio in direzione “Praciadelan” a Calalzo di Cadore (BL). Occorre fare un po’ di attenzione perchè dopo il ponte vi si presenta una casa nel bel mezzo del bivio ma la strada che dovrete imboccare, ad un occhio poco esperto, può apparire come il viottolo che conduce al retro. Invece, superata la casa vi troverete su una stretta stradina asfaltata ma piuttosto dissestata che sale per circa 2 km in mezzo alla montagna, a ridosso del torrente. Molta attenzione dovranno porla quelli che sono dotati di una vettura bassa perchè le frequenti buche li porteranno spesso a “grattare” se non procederanno con cautela. Al termine, si arriva in un piccolo parcheggio che può ospitare almeno una decina di vetture e indossati degli adeguati scarponi e uno zainetto con un kit precauzionale da montagna si inizia la salita sulla restante parte della strada asfaltata inaccessibile alle vetture. &lt;/p&gt;&lt;p align="justify"&gt;&lt;a href="http://blog.boschin.it/image.axd?picture=WP_20170603_11_13_00_Raw_LI__highres.jpg"&gt;&lt;img width="640" height="360" title="WP_20170603_11_13_00_Raw_LI__highres" align="right" style="margin: 4px 0px 10px 14px; float: right; display: inline;" alt="WP_20170603_11_13_00_Raw_LI__highres" src="http://blog.boschin.it/image.axd?picture=WP_20170603_11_13_00_Raw_LI__highres_thumb.jpg"&gt;&lt;/a&gt;La strada assume quasi immediatamente una pendenza costante che la caratterizzerà per tutto il tortuoso percorso, aumentando gradualmente anche per effetto della stanchezza che mano a mano si accumula. Dopo aver abbandonato l’asfalto il sentiero si tramuta in una pastorale piuttosto larga e segnata dagli alti alberi che la tengono costantemente in ombra. Se la giornata non è delle più calde sarà opportuno indossare un golfino leggero per proteggersi dall’umidità del bosco. Mano a mano che si sale, si incontrano numerose deviazioni dal sentiero principale, alcune di queste sono poco più che scorciatoie che usualmente consiglio di evitare perchè, pur sembrando un’ottima idea a prima vista, alla fine logorano le nostre energie molto più velocemente del percorso più lungo ma più dolce. Il sentiero è sempre e costantemente segnato da numerosi segni rossi e bianchi, alcuni riportanti il numero 261 ben evidente. E’ davvero impossibile perdersi, anche grazie a una buona quantità - quasi eccessiva - di indicazioni per il rifugio, giustficate &lt;a href="http://blog.boschin.it/image.axd?picture=WP_20170603_11_46_04_Raw_LI__highres.jpg"&gt;&lt;img width="640" height="360" title="WP_20170603_11_46_04_Raw_LI__highres" align="left" style="margin: 4px 10px 10px 0px; float: left; display: inline;" alt="WP_20170603_11_46_04_Raw_LI__highres" src="http://blog.boschin.it/image.axd?picture=WP_20170603_11_46_04_Raw_LI__highres_thumb.jpg"&gt;&lt;/a&gt;dal fatto che nel periodo invernale segnano il sentiero dedicato alle ciaspole. Vista l’altitudine non eccessiva, la vegetazione rimane sempre molto rigogliosa garantendo una frescura per tutto il percorso e aprendosi solo per un breve tratto quando si giunge a circa venti minuti dal rifugio. In questo tratto finale i più fortunati potranno ammirare un buon numero di camosci intenti a brucare in un pendio scosceso poco distante dal sentiero. Sarete facilmente attirati dal rumore legnoso che rompe il silenzio quando le corna dei maschi si incrociano in brevi scambi incruenti. Continuando a camminare sulla salita che oramai è alla sua più impegnativa pendenza finalmente si intravvederà la bandiera che segna il punto più alto in prossimità del fabbricato in pietra corrisponente al rifugio. Questo in effetti è il primo punto che si raggiunge quando la vegetazione lascia spazio allo sguardo e, prima ancora di notare il rifugio una cinquantina di metri più sotto, sarete sicuramente rapiti dal panorama fantastico che include sulla sinistra gli Spalti di toro, più al centro l’Antelao e infine le Marmarole, in una parata che trova validi rivali sono in alcuno dei più alti e impegnativi rifugio dell’alto Cadore e del Tirolo del Sud. &lt;/p&gt;&lt;p align="justify"&gt;&lt;a href="http://blog.boschin.it/image.axd?picture=WP_20170603_13_51_35_Panorama.jpg"&gt;&lt;img width="850" height="187" title="WP_20170603_13_51_35_Panorama" align="left" style="margin: 0px 10px 10px 0px; float: left; display: inline;" alt="WP_20170603_13_51_35_Panorama" src="http://blog.boschin.it/image.axd?picture=WP_20170603_13_51_35_Panorama_thumb.jpg"&gt;&lt;br&gt;&lt;/a&gt;&lt;/p&gt;&lt;p align="justify"&gt;&lt;br&gt;&lt;/p&gt;&lt;p align="justify"&gt;&lt;br&gt;&lt;/p&gt;&lt;p align="justify"&gt;&lt;br&gt;&lt;/p&gt;&lt;p align="justify"&gt;&lt;br&gt;&lt;/p&gt;&lt;p align="justify"&gt;&lt;br&gt;&lt;/p&gt;&lt;p align="justify"&gt;&lt;br&gt;&lt;/p&gt;&lt;p align="justify"&gt;Questo punto, dotato di due tronchi di legno trasformati in panchine è di certo uno dei migliori per fermarsi prima di raggiungere il rifugio, e il prato molto ampio vi consentirà anche di godere il meritato riposo sentendo il sole di montagna scaldarvi la pelle mentre il profumo dell’erba vi rilassa le narici. Poi, dopo aver ammirato a lungo il panorama punteggiato nel basso dalla città di Calalzo e da un ampio scorcio del lago Centro Cadore, è d’obbligo recarsi al rifugio e godere delle ottime pietanze che le sapienti mani della cuoca sapranno confezionare. Potrete gustarle nella tettoia all’esterno oppure in una bellissima sala da pranzo dotata di tavoli e rivestimento in accogliente legno.&lt;/p&gt;&lt;p align="justify"&gt;&lt;a href="http://blog.boschin.it/image.axd?picture=WP_20170603_15_22_48_Panorama.jpg"&gt;&lt;img width="850" height="274" title="WP_20170603_15_22_48_Panorama" style="margin: 0px 10px 10px 0px; display: inline;" alt="WP_20170603_15_22_48_Panorama" src="http://blog.boschin.it/image.axd?picture=WP_20170603_15_22_48_Panorama_thumb.jpg"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p align="justify"&gt;Cerco sempre di protrarre a lungo la mia permanenza in questo luogo meraviglioso, magari leggendo un libro o chiacchierando mentre sorseggio una birra. Tuttavia alla fine giunge il momento di tornare. al ritorno il sentiero è nuovamente impegnativo perchè la sua pendenza insiste sulle ginocchia senza troppa pietà, ma la discesa è molto più breve e agevole della salita, e se non fosse per la pioggerella che stavolta ha bagnato l’ultimo quarto d’ora, la giornata si sarebbe potuta dire ampiamente perfetta. Ora è il momento di pensare alla prossima escursione… mi attente il &lt;a href="http://www.caiveneto.it/upld/0N/wcms_f/alleg/schederifugi/scheda%20rifugio%20Tita%20Barba.pdf" target="_blank"&gt;Rifugio Tita Barba&lt;/a&gt; fra un paio di settimane all’apertura ufficiale della stagione.&lt;/p&gt;&lt;h4 align="justify"&gt;Informazioni &lt;a href="http://blog.boschin.it/image.axd?picture=WP_20170603_14_11_21_Raw_LI__highres.jpg"&gt;&lt;img width="145" height="258" title="WP_20170603_14_11_21_Raw_LI__highres" align="right" style="margin: 0px 0px 10px 10px; float: right; display: inline;" alt="WP_20170603_14_11_21_Raw_LI__highres" src="http://blog.boschin.it/image.axd?picture=WP_20170603_14_11_21_Raw_LI__highres_thumb.jpg"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;&lt;div align="justify"&gt;&lt;font size="2"&gt;&lt;strong&gt;Destinazione: &lt;/strong&gt;Rifugio Alpino Dino e Giovanni Chiggiato (&lt;/font&gt;&lt;a href="http://www.caivenezia.it/" target="_blank"&gt;&lt;font size="2"&gt;CAI Venezia&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt;)&lt;/font&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div align="justify"&gt;&lt;font size="2"&gt;&lt;strong&gt;Data escursione: &lt;/strong&gt;Sabato 3 Giugno 2017&lt;/font&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div align="justify"&gt;&lt;font size="2"&gt;&lt;strong&gt;Posizione:&lt;/strong&gt; Marmarole Centrali (&lt;a href="https://www.google.it/maps/place/Rifugio+Chiggiato/@46.4772184,12.3449211,4336m/data=!3m1!1e3!4m5!3m4!1s0x4779b7f4ff1b7813:0x99f06225d8769765!8m2!3d46.4827775!4d12.3475252" target="_blank"&gt;mappa&lt;/a&gt;)&lt;/font&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div align="justify"&gt;&lt;font size="2"&gt;&lt;strong&gt;Durata: &lt;/strong&gt;poco più di 2 ore per gambe allenate, fino a 2:45 per i meno preparati.&lt;/font&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div align="justify"&gt;&lt;font size="2"&gt;&lt;strong&gt;Apertura: &lt;/strong&gt;Continuata da metà Giugno a fine Settembre e nei weekend di bel tempo per il resto.&lt;/font&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div align="justify"&gt;&lt;font size="2"&gt;&lt;strong&gt;Difficoltà: &lt;/strong&gt;Facile il percorso ben segnato ma richiede buona resistenza fisica e costanza nel passo.&lt;/font&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div align="justify"&gt;&lt;font size="2"&gt;&lt;strong&gt;Sentiero: &lt;/strong&gt;261 da Località La Stua (Calalzo di Cadore – BL)&lt;/font&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div align="justify"&gt;&lt;strong&gt;&lt;font size="2"&gt;Sito web: &lt;/font&gt;&lt;/strong&gt;&lt;a title="http://www.rifugiochiggiato.it/" href="http://www.rifugiochiggiato.it/"&gt;&lt;font size="2"&gt;http://www.rifugiochiggiato.it/&lt;/font&gt;&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div align="justify"&gt;&lt;font size="2"&gt;&lt;strong&gt;Telefono: &lt;/strong&gt;+39.329.0757808 - +39.346.1817182&lt;/font&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div align="justify"&gt;&lt;strong&gt;&lt;font size="2"&gt;Email: &lt;/font&gt;&lt;/strong&gt;&lt;a href="mailto:info@rifugiochiggiato.it"&gt;&lt;font size="2"&gt;info@rifugiochiggiato.it&lt;/font&gt;&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p align="justify"&gt;&lt;br&gt;&lt;/p&gt;&lt;p align="right"&gt;&lt;font size="1"&gt;Nella foto il simpatico cane del gestore mentre custodisce la mia birra… &lt;/font&gt;&lt;/p&gt;</description>
      <link>http://blog.boschin.it/post/2017/06/07/Al-Rifugio-Alpino-Dino-e-Giovanni-Chiggiato-(mt-1911)-segnavia-261-da-localita-La-Stua-di-Calalzo-di-Cadore.aspx</link>
      <comments>http://blog.boschin.it/post/2017/06/07/Al-Rifugio-Alpino-Dino-e-Giovanni-Chiggiato-(mt-1911)-segnavia-261-da-localita-La-Stua-di-Calalzo-di-Cadore.aspx#comment</comments>
      <guid>http://blog.boschin.it/post.aspx?id=8460e177-479e-4c91-a65f-431b78e44b9d</guid>
      <pubDate>Wed, 07 Jun 2017 23:45:04 +0200</pubDate>
      <dc:publisher>codeblock</dc:publisher>
      <pingback:server>http://blog.boschin.it/pingback.axd</pingback:server>
      <pingback:target>http://blog.boschin.it/post.aspx?id=8460e177-479e-4c91-a65f-431b78e44b9d</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blog.boschin.it/trackback.axd?id=8460e177-479e-4c91-a65f-431b78e44b9d</trackback:ping>
      <wfw:comment>http://blog.boschin.it/post/2017/06/07/Al-Rifugio-Alpino-Dino-e-Giovanni-Chiggiato-(mt-1911)-segnavia-261-da-localita-La-Stua-di-Calalzo-di-Cadore.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.boschin.it/syndication.axd?post=8460e177-479e-4c91-a65f-431b78e44b9d</wfw:commentRss>
    </item>
    <item>
      <title>Non c'è pace senza giustizia...</title>
      <description>&lt;p align="justify"&gt;&lt;img width="240" height="240" title="20160324032017" align="left" style="margin: 0px 10px 0px 0px; border: 0px currentcolor; border-image: none; float: left; display: inline; background-image: none;" alt="20160324032017" src="http://blog.boschin.it/image.axd?picture=20160324032017.jpg" border="0"&gt;Vi hanno mai detto che "violenza genera violenza"? Pensateci voi che esprimete violenza su Facebook, che condividete e fate vostro, il pensiero violento di un tiranno come Putin. Pensateci voi che magari siete stati cresciuti nell'insegnamento cristiano del "porgi l'altra guancia", senza comprenderne il significato. &lt;/p&gt;&lt;p align="justify"&gt;Io negli atti di Bruxelles, nelle violenze terroriste, leggo l'invidia. L'invidia per un sistema tutto sommato civile che tutela - entro i limiti dell'umana fallibilità - l'essere umano ed i suoi diritti, contrapposto alla povertà, all'ingiustizia e alla sofferenza che vivono certi popoli. &lt;/p&gt;&lt;p align="justify"&gt;Questo dovremmo avere sempre a mente e questo dovrebbe rivelarci chiara la strada per porre fine al terrorismo, alle violenza, alla guerra. "&lt;em&gt;&lt;strong&gt;Non c'è pace senza giustizia, non c'è giustizia senza il perdono&lt;/strong&gt;&lt;/em&gt;" ha detto &lt;em&gt;Karol Wojtyla&lt;/em&gt;, il Papa di cui molti hanno richiesto la santificazione ma di cui tutti scordano gli insegnamenti...&amp;nbsp; &lt;/p&gt;&lt;p align="justify"&gt;E oggi è il momento di essere forti nel perdonare, forti nel ristabilire la giustizia e soprattutto forti nel riconoscere i propri peccati... i peccati di una società, la nostra, che assorbe la ricchezza del mondo anzichè distribuirla, una società che è, essa stessa, alla base dell'ingiustizia che assieme all'ignoranza è terreno fertile per atti di violenza. &lt;/p&gt;&lt;p align="justify"&gt;Non sono bombe quelle che voglio vedere sganciate sui cittadini inermi, sugli sfortunati che sono esclusi dal benessere della civiltà occidentale... Per una volta, invece che riversare esplosivi, sganciamo ricchezza, istruzione, benessere e cultura. Accogliamo queste popolazioni, facciamo loro vedere la nostra cultura, le arti, le scienze e ascoltiamo le loro... diamogli le opportunità che abbiamo noi, rischiando così anche di perdere una parte delle nostre prerogative. Ne uscirà una eguaglianza sociale, una amalgama di usi e costumi che ci renderà finalmente un solo popolo sulla terra. Noi occidentali, noi europei, noi fortunati, non siamo per forza dalla parte giusta!&lt;/p&gt;&lt;p align="justify"&gt;Facciamo giustizia... la pace verrà...&lt;/p&gt;</description>
      <link>http://blog.boschin.it/post/2016/03/24/Non-ce-pace-senza-giustizia.aspx</link>
      <comments>http://blog.boschin.it/post/2016/03/24/Non-ce-pace-senza-giustizia.aspx#comment</comments>
      <guid>http://blog.boschin.it/post.aspx?id=3410d870-2232-4750-aacb-da5cb5bb846d</guid>
      <pubDate>Thu, 24 Mar 2016 00:45:00 +0200</pubDate>
      <category>Politica</category>
      <dc:publisher>codeblock</dc:publisher>
      <pingback:server>http://blog.boschin.it/pingback.axd</pingback:server>
      <pingback:target>http://blog.boschin.it/post.aspx?id=3410d870-2232-4750-aacb-da5cb5bb846d</pingback:target>
      <slash:comments>3</slash:comments>
      <trackback:ping>http://blog.boschin.it/trackback.axd?id=3410d870-2232-4750-aacb-da5cb5bb846d</trackback:ping>
      <wfw:comment>http://blog.boschin.it/post/2016/03/24/Non-ce-pace-senza-giustizia.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.boschin.it/syndication.axd?post=3410d870-2232-4750-aacb-da5cb5bb846d</wfw:commentRss>
    </item>
    <item>
      <title>Pere al cioccolato</title>
      <description>&lt;p align="justify"&gt;Pere al cioccolato è la prima cosa che m'è venuta in mente... Quegli squisiti frutti che divoravo cogliendoli direttamente dalla pianta nelle campagne del Cilento dove eri nato. &lt;/p&gt;&lt;p align="justify"&gt;Ma non solo... Le passeggiate a piazzale Giovanacci... il te nero con i biscotti alle quattro... le domeniche in officina Jarach &amp;amp; Cecconi... quando mi hai insegnato a smontare e rimontare il carburatore... il tuo orgoglio di Carabiniere e come mi misuravi perché mi avresti voluto Corazziere... l'accompagnarti alla caccia e infilarmi in un pantano da cui mi hai dovuto estrarre... Le corse con il carro armato nel piazzale del battaglione... la tua FIAT 127 con cui mi hai insegnato a guidare... Il paese dove eri nato 96 anni fa, il ciucci... &lt;/p&gt;&lt;p align="justify"&gt;E i tuoi interminabili racconti delle tue avvertire di guerra... Tutto questo ed altro mi hai regalato nella tua vita. Ma soprattutto il ricordo di un lavoratore indefesso e di una persona integerrima come ce ne sono poche. Se esiste il paradiso tu hai l'ingresso garantito di diritto, ma di certo esiste la vita eterna, perché ora che non ci sei più vivrai per sempre nei miei più bei ricordi. &lt;/p&gt;&lt;p align="justify"&gt;Grazie nonno Carmine...&lt;/p&gt;</description>
      <link>http://blog.boschin.it/post/2016/03/18/Pere-al-cioccolato.aspx</link>
      <comments>http://blog.boschin.it/post/2016/03/18/Pere-al-cioccolato.aspx#comment</comments>
      <guid>http://blog.boschin.it/post.aspx?id=78d51e16-10c7-4d3d-b1a2-e4abec712e56</guid>
      <pubDate>Fri, 18 Mar 2016 13:30:00 +0200</pubDate>
      <category>About me...</category>
      <dc:publisher>codeblock</dc:publisher>
      <pingback:server>http://blog.boschin.it/pingback.axd</pingback:server>
      <pingback:target>http://blog.boschin.it/post.aspx?id=78d51e16-10c7-4d3d-b1a2-e4abec712e56</pingback:target>
      <slash:comments>2</slash:comments>
      <trackback:ping>http://blog.boschin.it/trackback.axd?id=78d51e16-10c7-4d3d-b1a2-e4abec712e56</trackback:ping>
      <wfw:comment>http://blog.boschin.it/post/2016/03/18/Pere-al-cioccolato.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.boschin.it/syndication.axd?post=78d51e16-10c7-4d3d-b1a2-e4abec712e56</wfw:commentRss>
    </item>
    <item>
      <title>Un anno di silenzio…</title>
      <description>&lt;p align="justify"&gt;Mi sono reso conto oggi che è passato poco più di un anno da quando ho postato l’ultima volta in queste pagine. Da allora tante, tantissime cose, sono cambiate e questo giustifica un po’ il silenzio in cui mi sono rifugiato. Non è ancora il caso che scriva pubblicamente gli eventi che mi hanno riguardato in questi 365 giorni. Forse verrà il giorno in cui potrò e vorrò parlarne ampiamente e liberamente, ma quel momento, se mai verrà, è ancora molto remoto nel futuro. &lt;/p&gt;&lt;p align="justify"&gt;Per chi mi legge, se è ancora rimasto qualcuno che lo fa, ripensandoci oggi quello che è accaduto non è niente più di quello che in fondo sono gli imprevisti della vita che spesso ti capitano quando meno te lo aspetti, cambiandola radicalmente e cambiandoti radicalmente... oppure semplicemente facendo emergere quello che sei veramente. &lt;/p&gt;&lt;p align="justify"&gt;Quello che conta è che ci sono ancora, un po’ (molti dicono tanto) diverso, un po’ “imprevisto” io stesso. In questo periodo di grande difficoltà mista a grande rivoluzione sono riemersi un po’ di vecchi interessi e ne sono maturati molti di nuovi ed è di questo che cercherò di parlare prossimamente.&lt;/p&gt;&lt;p align="justify"&gt;Primo fra tutti quello che oggi mi spinge a tornare a redigere questo post che spero sarà seguito da molti altri. Mi riferisco alla mia passione per lo scrivere, passione che in realtà non ho mai riconosciuto come tale se non in questo ultimo periodo della mia vita, quando essa è diventata qualcosa che mi ha gratificato molto e molto mi ha aiutato a focalizzare quelli che sono i miei pensieri e le mie idee. Mi sono trovato spesso a scrivere per varie ragioni, tra le quali anche, banalmente, il fissare concetti che diversamente sarebbero svaniti nel flusso di miei pensieri o travolti dalle emozioni. Ho scritto molto, moltissimo, per comunicare e per comunicarmi, per organizzare e riorganizzare, per verificare se, alla prova dei fatti, quello che pensavo in un dato momento si rivelava ancora vero dopo tempo. &lt;/p&gt;&lt;p align="justify"&gt;Ci sono tante altre cose che mi hanno accompagnato, mia figlia, il ballo e la musica, la fotografia, la lettura, il cinema e il teatro, l'arte in generale, il mio lavoro. La montagna e talvolta il mare, la città e la campagna. In definitiva, come qualcuno mi ha insegnato, la "esperienza", questo valore fondamentale che vale oltre ad ogni denaro e ad ogni oggetto che possiamo comprare con esso... &lt;/p&gt;&lt;p align="justify"&gt;Riparto da qui, dalla voglia di comunicare qualcosa... ma non chiedetemi cosa... &lt;/p&gt;&lt;p align="justify"&gt;Bentornato Andrea.&lt;/p&gt;</description>
      <link>http://blog.boschin.it/post/2016/03/15/Un-anno-di-silenzio….aspx</link>
      <comments>http://blog.boschin.it/post/2016/03/15/Un-anno-di-silenzio….aspx#comment</comments>
      <guid>http://blog.boschin.it/post.aspx?id=f33bc3a7-ced7-46d6-be6f-d1d78aacd682</guid>
      <pubDate>Tue, 15 Mar 2016 08:30:00 +0200</pubDate>
      <category>About me...</category>
      <dc:publisher>codeblock</dc:publisher>
      <pingback:server>http://blog.boschin.it/pingback.axd</pingback:server>
      <pingback:target>http://blog.boschin.it/post.aspx?id=f33bc3a7-ced7-46d6-be6f-d1d78aacd682</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blog.boschin.it/trackback.axd?id=f33bc3a7-ced7-46d6-be6f-d1d78aacd682</trackback:ping>
      <wfw:comment>http://blog.boschin.it/post/2016/03/15/Un-anno-di-silenzio….aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.boschin.it/syndication.axd?post=f33bc3a7-ced7-46d6-be6f-d1d78aacd682</wfw:commentRss>
    </item>
    <item>
      <title>Angular and Typescript: together forever</title>
      <description>&lt;p&gt;E’ disponibile il mio guest post sul blog di MSDN Italia, una veloce analisi di come il fatto che la nuova versione di Angular 2.0 sia basata su Typescript cambierà le cose e un semplice esempio di cosa significa usare Angular e Typescript insieme oggi stesso.&lt;/p&gt;&lt;p&gt;Link: &lt;a title="http://blogs.msdn.com/b/italy/archive/2015/03/11/angular-and-typescript-together-forever.aspx" href="http://blogs.msdn.com/b/italy/archive/2015/03/11/angular-and-typescript-together-forever.aspx" target="_blank"&gt;Angular and Typescript: together forever&lt;/a&gt;&lt;/p&gt;</description>
      <link>http://blog.boschin.it/post/2015/03/11/Angular-and-Typescript-together-forever.aspx</link>
      <comments>http://blog.boschin.it/post/2015/03/11/Angular-and-Typescript-together-forever.aspx#comment</comments>
      <guid>http://blog.boschin.it/post.aspx?id=713f2b87-bac7-4eb3-914b-907ead47ffce</guid>
      <pubDate>Wed, 11 Mar 2015 16:01:40 +0200</pubDate>
      <category>Web Development</category>
      <dc:publisher>codeblock</dc:publisher>
      <pingback:server>http://blog.boschin.it/pingback.axd</pingback:server>
      <pingback:target>http://blog.boschin.it/post.aspx?id=713f2b87-bac7-4eb3-914b-907ead47ffce</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blog.boschin.it/trackback.axd?id=713f2b87-bac7-4eb3-914b-907ead47ffce</trackback:ping>
      <wfw:comment>http://blog.boschin.it/post/2015/03/11/Angular-and-Typescript-together-forever.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.boschin.it/syndication.axd?post=713f2b87-bac7-4eb3-914b-907ead47ffce</wfw:commentRss>
    </item>
    <item>
      <title>Gestire le dialog modali con Angular, Bootstrap e Typescript</title>
      <description>&lt;p&gt;Le modal dialog sono uno strumento molto usato nelle applicazioni per interagire con l’utente. Purtroppo, mentre in una applicazione Windows esse sono tutto sommato semplici da gestire dato che il framework ci mette a disposizione più o meno tutto ciò di cui abbiamo bisogno, così non è nelle applicazione web in cui abbiamo solo alert e confirm che sono quanto di meno user friendly si possa immaginare. Inoltre, inserire delle proprie dialog è più o meno complicato in quando richiede non solo l’inserimento del codice Javascript che le gestisce, ma anche sel markup HTML. Un doppio lavoro quindi che complica non poco la questione. Personalmente ho trovato molto proficuo usare un servizio di AngularJS, scritto in Typescript, per cercare di risolvere questo problema alla radice. Per farlo mi sono appoggiato alle Modal popop di bootstrap che sono semplici ed efficaci e gestiscono molto efficacemente la responsività. Vediamo il servizio come è realizzato:&lt;/p&gt;&lt;div id="codeSnippetWrapper" style="margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; border-image: none; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 200px; background-color: rgb(244, 244, 244);"&gt;&lt;div id="codeSnippet" style="padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum1" style="color: rgb(96, 96, 96);"&gt;   1:&lt;/span&gt; module sys.services&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum2" style="color: rgb(96, 96, 96);"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum3" style="color: rgb(96, 96, 96);"&gt;   3:&lt;/span&gt;     export &lt;span style="color: rgb(0, 0, 255);"&gt;class&lt;/span&gt; Constants&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum4" style="color: rgb(96, 96, 96);"&gt;   4:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum5" style="color: rgb(96, 96, 96);"&gt;   5:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt; containerId: &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; = &lt;span style="color: rgb(0, 96, 128);"&gt;'#modalContainer'&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum6" style="color: rgb(96, 96, 96);"&gt;   6:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt; defaultModalTitle: &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; = &lt;span style="color: rgb(0, 96, 128);"&gt;'Message'&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum7" style="color: rgb(96, 96, 96);"&gt;   7:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt; modalDialogId: &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; = &lt;span style="color: rgb(0, 96, 128);"&gt;'#modalDialog'&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum8" style="color: rgb(96, 96, 96);"&gt;   8:&lt;/span&gt;     &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum9" style="color: rgb(96, 96, 96);"&gt;   9:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt; Negative: &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; = &lt;span style="color: rgb(0, 96, 128);"&gt;'0'&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum10" style="color: rgb(96, 96, 96);"&gt;  10:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt; Positive: &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; = &lt;span style="color: rgb(0, 96, 128);"&gt;'1'&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum11" style="color: rgb(96, 96, 96);"&gt;  11:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt; Cancel: &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; = &lt;span style="color: rgb(0, 96, 128);"&gt;'2'&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum12" style="color: rgb(96, 96, 96);"&gt;  12:&lt;/span&gt;     &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum13" style="color: rgb(96, 96, 96);"&gt;  13:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt; modalYesNo: sys.services.IDialogCommand[] = [&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum14" style="color: rgb(96, 96, 96);"&gt;  14:&lt;/span&gt;             { id: Constants.Negative, text: &lt;span style="color: rgb(0, 96, 128);"&gt;'No'&lt;/span&gt; },&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum15" style="color: rgb(96, 96, 96);"&gt;  15:&lt;/span&gt;             { id: Constants.Positive, text: &lt;span style="color: rgb(0, 96, 128);"&gt;'Yes'&lt;/span&gt;, style: &lt;span style="color: rgb(0, 96, 128);"&gt;'btn-primary'&lt;/span&gt; }];&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum16" style="color: rgb(96, 96, 96);"&gt;  16:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt; modalYesNoCancel: sys.services.IDialogCommand[] = [&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum17" style="color: rgb(96, 96, 96);"&gt;  17:&lt;/span&gt;             { id: Constants.Cancel, text: &lt;span style="color: rgb(0, 96, 128);"&gt;'Cancel'&lt;/span&gt; },&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum18" style="color: rgb(96, 96, 96);"&gt;  18:&lt;/span&gt;             { id: Constants.Negative, text: &lt;span style="color: rgb(0, 96, 128);"&gt;'No'&lt;/span&gt; },&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum19" style="color: rgb(96, 96, 96);"&gt;  19:&lt;/span&gt;             { id: Constants.Positive, text: &lt;span style="color: rgb(0, 96, 128);"&gt;'Yes'&lt;/span&gt;, style: &lt;span style="color: rgb(0, 96, 128);"&gt;'btn-primary'&lt;/span&gt; }];&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum20" style="color: rgb(96, 96, 96);"&gt;  20:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt; modalOkCancel: sys.services.IDialogCommand[] = [&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum21" style="color: rgb(96, 96, 96);"&gt;  21:&lt;/span&gt;             { id: Constants.Cancel, text: &lt;span style="color: rgb(0, 96, 128);"&gt;'Cancel'&lt;/span&gt; },&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum22" style="color: rgb(96, 96, 96);"&gt;  22:&lt;/span&gt;             { id: Constants.Positive, text: &lt;span style="color: rgb(0, 96, 128);"&gt;'Ok'&lt;/span&gt;, style: &lt;span style="color: rgb(0, 96, 128);"&gt;'btn-primary'&lt;/span&gt; }];&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum23" style="color: rgb(96, 96, 96);"&gt;  23:&lt;/span&gt;     &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum24" style="color: rgb(96, 96, 96);"&gt;  24:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt; containerMarkup: &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; =&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum25" style="color: rgb(96, 96, 96);"&gt;  25:&lt;/span&gt;         &lt;span style="color: rgb(0, 96, 128);"&gt;'&amp;lt;span&amp;gt;&amp;lt;/span&amp;gt;'&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum26" style="color: rgb(96, 96, 96);"&gt;  26:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt; modalMarkup: &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; =&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum27" style="color: rgb(96, 96, 96);"&gt;  27:&lt;/span&gt;         &lt;span style="color: rgb(0, 96, 128);"&gt;'&amp;lt;div id="modalDialog" class="modal fade"&amp;gt;&amp;lt;div class="modal-dialog"&amp;gt;&amp;lt;div class="modal-content"&amp;gt;&amp;lt;div class="modal-header"&amp;gt;&amp;lt;h4 class="modal-title"&amp;gt;Modal title&amp;lt;/h4&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div class="modal-body"&amp;gt;&amp;lt;p&amp;gt;One fine body&amp;amp;hellip;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div class="modal-footer"&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;'&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum28" style="color: rgb(96, 96, 96);"&gt;  28:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt; modalButtonMarkup: &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; =&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum29" style="color: rgb(96, 96, 96);"&gt;  29:&lt;/span&gt;         &lt;span style="color: rgb(0, 96, 128);"&gt;'&amp;lt;button type="button" class="btn" data-dismiss="modal"&amp;gt;Close&amp;lt;/button&amp;gt;'&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum30" style="color: rgb(96, 96, 96);"&gt;  30:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum31" style="color: rgb(96, 96, 96);"&gt;  31:&lt;/span&gt;     &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum32" style="color: rgb(96, 96, 96);"&gt;  32:&lt;/span&gt;     export &lt;span style="color: rgb(0, 0, 255);"&gt;interface&lt;/span&gt; IDialogCommand&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum33" style="color: rgb(96, 96, 96);"&gt;  33:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum34" style="color: rgb(96, 96, 96);"&gt;  34:&lt;/span&gt;         id: &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum35" style="color: rgb(96, 96, 96);"&gt;  35:&lt;/span&gt;         text: &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum36" style="color: rgb(96, 96, 96);"&gt;  36:&lt;/span&gt;         style?: &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum37" style="color: rgb(96, 96, 96);"&gt;  37:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum38" style="color: rgb(96, 96, 96);"&gt;  38:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum39" style="color: rgb(96, 96, 96);"&gt;  39:&lt;/span&gt;     export &lt;span style="color: rgb(0, 0, 255);"&gt;class&lt;/span&gt; ModalManager&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum40" style="color: rgb(96, 96, 96);"&gt;  40:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum41" style="color: rgb(96, 96, 96);"&gt;  41:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;private&lt;/span&gt; container: JQuery;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum42" style="color: rgb(96, 96, 96);"&gt;  42:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;private&lt;/span&gt; modalDialog: JQuery;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum43" style="color: rgb(96, 96, 96);"&gt;  43:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum44" style="color: rgb(96, 96, 96);"&gt;  44:&lt;/span&gt;         constructor()&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum45" style="color: rgb(96, 96, 96);"&gt;  45:&lt;/span&gt;         {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum46" style="color: rgb(96, 96, 96);"&gt;  46:&lt;/span&gt;             &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.appendModals();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum47" style="color: rgb(96, 96, 96);"&gt;  47:&lt;/span&gt;         }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum48" style="color: rgb(96, 96, 96);"&gt;  48:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum49" style="color: rgb(96, 96, 96);"&gt;  49:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;private&lt;/span&gt; exists(name: &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;): boolean&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum50" style="color: rgb(96, 96, 96);"&gt;  50:&lt;/span&gt;         {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum51" style="color: rgb(96, 96, 96);"&gt;  51:&lt;/span&gt;             &lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt; (&lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.container == undefined)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum52" style="color: rgb(96, 96, 96);"&gt;  52:&lt;/span&gt;                 &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.container = $(Constants.containerId);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum53" style="color: rgb(96, 96, 96);"&gt;  53:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum54" style="color: rgb(96, 96, 96);"&gt;  54:&lt;/span&gt;             &lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.container.find(name).length != 0;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum55" style="color: rgb(96, 96, 96);"&gt;  55:&lt;/span&gt;         }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum56" style="color: rgb(96, 96, 96);"&gt;  56:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum57" style="color: rgb(96, 96, 96);"&gt;  57:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;private&lt;/span&gt; appendModals(): &lt;span style="color: rgb(0, 0, 255);"&gt;void&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum58" style="color: rgb(96, 96, 96);"&gt;  58:&lt;/span&gt;         {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum59" style="color: rgb(96, 96, 96);"&gt;  59:&lt;/span&gt;             &lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt; (!&lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.exists(Constants.containerId))&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum60" style="color: rgb(96, 96, 96);"&gt;  60:&lt;/span&gt;             {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum61" style="color: rgb(96, 96, 96);"&gt;  61:&lt;/span&gt;                 &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.container = $(Constants.containerMarkup);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum62" style="color: rgb(96, 96, 96);"&gt;  62:&lt;/span&gt;                 &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.container.appendTo($(document.body));&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum63" style="color: rgb(96, 96, 96);"&gt;  63:&lt;/span&gt;             }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum64" style="color: rgb(96, 96, 96);"&gt;  64:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum65" style="color: rgb(96, 96, 96);"&gt;  65:&lt;/span&gt;             &lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt; (!&lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.exists(Constants.modalDialogId))&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum66" style="color: rgb(96, 96, 96);"&gt;  66:&lt;/span&gt;             {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum67" style="color: rgb(96, 96, 96);"&gt;  67:&lt;/span&gt;                 &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.modalDialog = $(Constants.modalMarkup);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum68" style="color: rgb(96, 96, 96);"&gt;  68:&lt;/span&gt;                 &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.modalDialog.appendTo(&lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.container);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum69" style="color: rgb(96, 96, 96);"&gt;  69:&lt;/span&gt;             }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum70" style="color: rgb(96, 96, 96);"&gt;  70:&lt;/span&gt;         }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum71" style="color: rgb(96, 96, 96);"&gt;  71:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum72" style="color: rgb(96, 96, 96);"&gt;  72:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; showDialog(message: &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;, title: &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; = Constants.defaultModalTitle, commands?: IDialogCommand[], callback?: (id: &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;) =&amp;gt; &lt;span style="color: rgb(0, 0, 255);"&gt;void&lt;/span&gt;)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum73" style="color: rgb(96, 96, 96);"&gt;  73:&lt;/span&gt;         {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum74" style="color: rgb(96, 96, 96);"&gt;  74:&lt;/span&gt;             &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.modalDialog.find(&lt;span style="color: rgb(0, 96, 128);"&gt;'.modal-body'&lt;/span&gt;).text(message);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum75" style="color: rgb(96, 96, 96);"&gt;  75:&lt;/span&gt;             &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.modalDialog.find(&lt;span style="color: rgb(0, 96, 128);"&gt;'.modal-title'&lt;/span&gt;).text(title);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum76" style="color: rgb(96, 96, 96);"&gt;  76:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum77" style="color: rgb(96, 96, 96);"&gt;  77:&lt;/span&gt;             var footer = &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.modalDialog.find(&lt;span style="color: rgb(0, 96, 128);"&gt;'.modal-footer'&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum78" style="color: rgb(96, 96, 96);"&gt;  78:&lt;/span&gt;             footer.empty();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum79" style="color: rgb(96, 96, 96);"&gt;  79:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum80" style="color: rgb(96, 96, 96);"&gt;  80:&lt;/span&gt;             &lt;span style="color: rgb(0, 0, 255);"&gt;for&lt;/span&gt; (var i &lt;span style="color: rgb(0, 0, 255);"&gt;in&lt;/span&gt; commands)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum81" style="color: rgb(96, 96, 96);"&gt;  81:&lt;/span&gt;             {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum82" style="color: rgb(96, 96, 96);"&gt;  82:&lt;/span&gt;                 var cmd = commands[i];&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum83" style="color: rgb(96, 96, 96);"&gt;  83:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum84" style="color: rgb(96, 96, 96);"&gt;  84:&lt;/span&gt;                 var button = $(Constants.modalButtonMarkup);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum85" style="color: rgb(96, 96, 96);"&gt;  85:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum86" style="color: rgb(96, 96, 96);"&gt;  86:&lt;/span&gt;                 button.text(cmd.text);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum87" style="color: rgb(96, 96, 96);"&gt;  87:&lt;/span&gt;                 button.addClass(cmd.style == undefined ? &lt;span style="color: rgb(0, 96, 128);"&gt;'btn-default'&lt;/span&gt; : cmd.style);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum88" style="color: rgb(96, 96, 96);"&gt;  88:&lt;/span&gt;                 button.data(&lt;span style="color: rgb(0, 96, 128);"&gt;'command-id'&lt;/span&gt;, cmd.id);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum89" style="color: rgb(96, 96, 96);"&gt;  89:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum90" style="color: rgb(96, 96, 96);"&gt;  90:&lt;/span&gt;                 button.click((ev) =&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum91" style="color: rgb(96, 96, 96);"&gt;  91:&lt;/span&gt;                 {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum92" style="color: rgb(96, 96, 96);"&gt;  92:&lt;/span&gt;                     var id = $(&lt;span style="color: rgb(0, 0, 255);"&gt;event&lt;/span&gt;.srcElement).data(&lt;span style="color: rgb(0, 96, 128);"&gt;'command-id'&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum93" style="color: rgb(96, 96, 96);"&gt;  93:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum94" style="color: rgb(96, 96, 96);"&gt;  94:&lt;/span&gt;                     &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.modalDialog.modal(&lt;span style="color: rgb(0, 96, 128);"&gt;'hide'&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum95" style="color: rgb(96, 96, 96);"&gt;  95:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum96" style="color: rgb(96, 96, 96);"&gt;  96:&lt;/span&gt;                     &lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt; (callback != undefined)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum97" style="color: rgb(96, 96, 96);"&gt;  97:&lt;/span&gt;                         callback.apply(&lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;, [id]);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum98" style="color: rgb(96, 96, 96);"&gt;  98:&lt;/span&gt;                 });&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum99" style="color: rgb(96, 96, 96);"&gt;  99:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum100" style="color: rgb(96, 96, 96);"&gt; 100:&lt;/span&gt;                 button.appendTo(footer);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum101" style="color: rgb(96, 96, 96);"&gt; 101:&lt;/span&gt;             }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum102" style="color: rgb(96, 96, 96);"&gt; 102:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum103" style="color: rgb(96, 96, 96);"&gt; 103:&lt;/span&gt;             &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.modalDialog.modal(&lt;span style="color: rgb(0, 96, 128);"&gt;'show'&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum104" style="color: rgb(96, 96, 96);"&gt; 104:&lt;/span&gt;         }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum105" style="color: rgb(96, 96, 96);"&gt; 105:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum106" style="color: rgb(96, 96, 96);"&gt; 106:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Il servizio così impostato è completo di tutto ciò che serve al funzionamento. Da solo per scontato che siano reparibili le librerie suddette (AngularJS e Bootstrap). Il metodo appendModals() in particolare si occupa di creare il markup necessario utilizzando alcune stringhe costanti. Esso verifica che il markup non sia già presente ed eventualmente lo inserisce aggiungendolo al body. Questo favorisce l’utilizzo della libreria che non richiede alcuna gestione del markup HTML. L’utilizzo è molto semplice. E’ sufficiente infatti registrare il servizio assieme al controller con la seguente riga:&lt;/p&gt;&lt;div id="codeSnippetWrapper" style="margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; border-image: none; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 200px; background-color: rgb(244, 244, 244);"&gt;&lt;div id="codeSnippet" style="padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum1" style="color: rgb(96, 96, 96);"&gt;   1:&lt;/span&gt; .service(&lt;span style="color: rgb(0, 96, 128);"&gt;'$modalManager'&lt;/span&gt;,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum2" style="color: rgb(96, 96, 96);"&gt;   2:&lt;/span&gt;     () =&amp;gt; &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; sys.services.ModalManager());&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Avremo così a disposizione il servizio $modalManager che possiamo iniettare in un controller. A questo punto, potremo richiamare la gdialog molto semplicemente usando uno dei metodi del servizio:&lt;/p&gt;&lt;div id="codeSnippetWrapper" style="margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; border-image: none; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 200px; background-color: rgb(244, 244, 244);"&gt;&lt;div id="codeSnippet" style="padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum1" style="color: rgb(96, 96, 96);"&gt;   1:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.$modalManager.showDialog(&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum2" style="color: rgb(96, 96, 96);"&gt;   2:&lt;/span&gt;     &lt;span style="color: rgb(0, 96, 128);"&gt;'Are you sure you want to delete the resource'&lt;/span&gt;,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum3" style="color: rgb(96, 96, 96);"&gt;   3:&lt;/span&gt;     &lt;span style="color: rgb(0, 96, 128);"&gt;'Confirm operation'&lt;/span&gt;,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum4" style="color: rgb(96, 96, 96);"&gt;   4:&lt;/span&gt;     sys.Constants.modalYesNo,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum5" style="color: rgb(96, 96, 96);"&gt;   5:&lt;/span&gt;     (id: &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;) =&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum6" style="color: rgb(96, 96, 96);"&gt;   6:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum7" style="color: rgb(96, 96, 96);"&gt;   7:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt; (id == sys.Constants.Positive)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum8" style="color: rgb(96, 96, 96);"&gt;   8:&lt;/span&gt;         {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum9" style="color: rgb(96, 96, 96);"&gt;   9:&lt;/span&gt;             &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.clocks.push(timezone);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum10" style="color: rgb(96, 96, 96);"&gt;  10:&lt;/span&gt;         }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum11" style="color: rgb(96, 96, 96);"&gt;  11:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum12" style="color: rgb(96, 96, 96);"&gt;  12:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.selectedTimezone = undefined;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum13" style="color: rgb(96, 96, 96);"&gt;  13:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.scope().$apply();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum14" style="color: rgb(96, 96, 96);"&gt;  14:&lt;/span&gt;     });&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;La dialog è sufficientemente intelligente da gestire numerose combinazioni di pulsanti. Le costanti presenti nella dichiarazione sono di aiuto in questo ma se ne possono creare di proprie dato che si tratta a tutti gli effetti di un array di IDialogCommand. &lt;/p&gt;&lt;div id="codeSnippetWrapper" style="margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; border-image: none; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 200px; background-color: rgb(244, 244, 244);"&gt;&lt;div id="codeSnippet" style="padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum1" style="color: rgb(96, 96, 96);"&gt;   1:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt; modalOkCancel: sys.services.IDialogCommand[] = [&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum2" style="color: rgb(96, 96, 96);"&gt;   2:&lt;/span&gt;     { id: Constants.Cancel, text: &lt;span style="color: rgb(0, 96, 128);"&gt;'Cancel'&lt;/span&gt; },&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum3" style="color: rgb(96, 96, 96);"&gt;   3:&lt;/span&gt;     { id: Constants.Positive, text: &lt;span style="color: rgb(0, 96, 128);"&gt;'Ok'&lt;/span&gt;, style: &lt;span style="color: rgb(0, 96, 128);"&gt;'btn-primary'&lt;/span&gt; }];&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Senza dimenticare l’uso appropriato degli stili di bootstrap. &lt;/p&gt;</description>
      <link>http://blog.boschin.it/post/2015/03/08/Gestire-le-dialog-modali-con-Angular-Bootstrap-e-Typescript.aspx</link>
      <comments>http://blog.boschin.it/post/2015/03/08/Gestire-le-dialog-modali-con-Angular-Bootstrap-e-Typescript.aspx#comment</comments>
      <guid>http://blog.boschin.it/post.aspx?id=7b71cdb5-98d1-4620-9e6d-50c376cdf273</guid>
      <pubDate>Sun, 08 Mar 2015 15:36:00 +0200</pubDate>
      <category>Web Development</category>
      <dc:publisher>codeblock</dc:publisher>
      <pingback:server>http://blog.boschin.it/pingback.axd</pingback:server>
      <pingback:target>http://blog.boschin.it/post.aspx?id=7b71cdb5-98d1-4620-9e6d-50c376cdf273</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blog.boschin.it/trackback.axd?id=7b71cdb5-98d1-4620-9e6d-50c376cdf273</trackback:ping>
      <wfw:comment>http://blog.boschin.it/post/2015/03/08/Gestire-le-dialog-modali-con-Angular-Bootstrap-e-Typescript.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.boschin.it/syndication.axd?post=7b71cdb5-98d1-4620-9e6d-50c376cdf273</wfw:commentRss>
    </item>
    <item>
      <title>Angular 2.0 built in Typescript...</title>
      <description>&lt;p align="justify"&gt;E' di questi giorni l'annuncio che Angular 2.0 è ora completamente scritto in Typescript. Questo è forse uno dei più sorprendenti risultati della politica di Satya Nadella che sta aprendo giorno dopo giorno alle librerie open source di terze parti. E ancora più sorprendente se pensiamo che Angular è un prodotto dei team di Google che recentemente, supportato da Microsoft ha deciso di adottare questo linguaggio. La cosa che più mi entusiasma, come riportato in questo &lt;a href="http://techcrunch.com/2015/03/05/microsoft-and-google-collaborate-on-typescript-hell-has-not-frozen-over-yet/" target="_blank"&gt;post&lt;/a&gt;, è che la collaborazione sarà fonte di nuovi miglioramenti per Typescript che già dalla versione 1.5 vedrà l'introduzione delle annotations, espressamente progettate per Angular. Le annotation apriranno la strada a una sorta di Reflection che tipicamente è fonte di numerose soluzioni che risparmiano lavoro. Attendiamo con ansia... &lt;/p&gt;</description>
      <link>http://blog.boschin.it/post/2015/03/05/Angular-20-built-in-Typescript.aspx</link>
      <comments>http://blog.boschin.it/post/2015/03/05/Angular-20-built-in-Typescript.aspx#comment</comments>
      <guid>http://blog.boschin.it/post.aspx?id=ad4b8402-24dd-47c4-ba79-832a44b0c70f</guid>
      <pubDate>Thu, 05 Mar 2015 17:50:00 +0200</pubDate>
      <category>Web Development</category>
      <dc:publisher>codeblock</dc:publisher>
      <pingback:server>http://blog.boschin.it/pingback.axd</pingback:server>
      <pingback:target>http://blog.boschin.it/post.aspx?id=ad4b8402-24dd-47c4-ba79-832a44b0c70f</pingback:target>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://blog.boschin.it/trackback.axd?id=ad4b8402-24dd-47c4-ba79-832a44b0c70f</trackback:ping>
      <wfw:comment>http://blog.boschin.it/post/2015/03/05/Angular-20-built-in-Typescript.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.boschin.it/syndication.axd?post=ad4b8402-24dd-47c4-ba79-832a44b0c70f</wfw:commentRss>
    </item>
    <item>
      <title>Gestire l'asicronia dei propri metodi con Angular e Typescript</title>
      <description>&lt;p&gt;L'asincronia sta ormai diventando una questione di tutti i giorni nelle applicazioni moderne così i linguaggi come C# si sono adeguati con costrutti come async/await. Javascript, pur essendo un linguaggio ormai antico secondo i tempi cui l'informatica ci ha abituato, gestisce da sempre molte attività in modo asincrono, utilizzando il meccanismo dei callback. Un esempio è il setInterval in cui uno degli argomenti passati è la funzione da chiamare ad intervalli regolari. &lt;/p&gt;&lt;p&gt;Librerie come jQuery e Angular stesso espongono numerosi casi di utilizzo di metodi asincroni. L'http service di Angular ad esempio è uno di questi casi. Esso però non utilizza normali callback ma un sistema molto simile al Task&amp;lt;T&amp;gt; di C#. Le promise. In effetti da ciascuna chiamata asincrona è ritornato un oggetto Promise che dispone dei metodi then, catch e finally. Questi servono per associare un callback a ciascuno delle condizioni che i nomi dei metodi evocano. &lt;/p&gt;&lt;p&gt;Ma la domanda cui vogli rispondere in questo post è la seguente: come faccio ad esporre una promise da un mio metodo asicrono se esso stesso no usa un servizio che la utilizzi? E' il caso ad esempio di un metodo che visualizzi una dialog modale. Essono mo potrà mai essere sincrono perchè oltre a risultare bloccante per il browser, non sarà comunque possibile gestire una eventuale "attesa" e ritornare dal metodo alla chiusure della dialog. Quello che ci viene in soccorso è il Q service. Esso è usato dallo stesso http service è ha come unico scopo la gestione asincrona. Vediamo un esempio:&lt;/p&gt;&lt;div id="codeSnippetWrapper" style="margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; border-image: none; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 200px; background-color: rgb(244, 244, 244);"&gt;&lt;div id="codeSnippet" style="padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum1" style="color: rgb(96, 96, 96);"&gt;   1:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; showDialog(message: &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;, title: &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; = Constants.defaultModalTitle, commands?: IDialogCommand[]): ng.IPromise&amp;lt;&lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum2" style="color: rgb(96, 96, 96);"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum3" style="color: rgb(96, 96, 96);"&gt;   3:&lt;/span&gt;     &lt;span style="color: rgb(0, 0, 255);"&gt;var&lt;/span&gt; defer: ng.IDeferred&amp;lt;any&amp;gt; = &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.$q.defer&amp;lt;&lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;&amp;gt;();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum4" style="color: rgb(96, 96, 96);"&gt;   4:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum5" style="color: rgb(96, 96, 96);"&gt;   5:&lt;/span&gt;     &lt;span style="color: rgb(0, 0, 255);"&gt;try&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum6" style="color: rgb(96, 96, 96);"&gt;   6:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum7" style="color: rgb(96, 96, 96);"&gt;   7:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.modalDialog.find(&lt;span style="color: rgb(0, 96, 128);"&gt;'.modal-body'&lt;/span&gt;).text(message);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum8" style="color: rgb(96, 96, 96);"&gt;   8:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.modalDialog.find(&lt;span style="color: rgb(0, 96, 128);"&gt;'.modal-title'&lt;/span&gt;).text(title);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum9" style="color: rgb(96, 96, 96);"&gt;   9:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum10" style="color: rgb(96, 96, 96);"&gt;  10:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;var&lt;/span&gt; footer = &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.modalDialog.find(&lt;span style="color: rgb(0, 96, 128);"&gt;'.modal-footer'&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum11" style="color: rgb(96, 96, 96);"&gt;  11:&lt;/span&gt;         footer.empty();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum12" style="color: rgb(96, 96, 96);"&gt;  12:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum13" style="color: rgb(96, 96, 96);"&gt;  13:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;for&lt;/span&gt; (&lt;span style="color: rgb(0, 0, 255);"&gt;var&lt;/span&gt; i &lt;span style="color: rgb(0, 0, 255);"&gt;in&lt;/span&gt; commands)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum14" style="color: rgb(96, 96, 96);"&gt;  14:&lt;/span&gt;         {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum15" style="color: rgb(96, 96, 96);"&gt;  15:&lt;/span&gt;             &lt;span style="color: rgb(0, 0, 255);"&gt;var&lt;/span&gt; cmd = commands[i];&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum16" style="color: rgb(96, 96, 96);"&gt;  16:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum17" style="color: rgb(96, 96, 96);"&gt;  17:&lt;/span&gt;             &lt;span style="color: rgb(0, 0, 255);"&gt;var&lt;/span&gt; button = $(Constants.modalButtonMarkup);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum18" style="color: rgb(96, 96, 96);"&gt;  18:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum19" style="color: rgb(96, 96, 96);"&gt;  19:&lt;/span&gt;             button.text(cmd.text);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum20" style="color: rgb(96, 96, 96);"&gt;  20:&lt;/span&gt;             button.addClass(cmd.style == undefined ? &lt;span style="color: rgb(0, 96, 128);"&gt;'btn-default'&lt;/span&gt; : cmd.style);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum21" style="color: rgb(96, 96, 96);"&gt;  21:&lt;/span&gt;             button.data(&lt;span style="color: rgb(0, 96, 128);"&gt;'command-id'&lt;/span&gt;, cmd.id);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum22" style="color: rgb(96, 96, 96);"&gt;  22:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum23" style="color: rgb(96, 96, 96);"&gt;  23:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum24" style="color: rgb(96, 96, 96);"&gt;  24:&lt;/span&gt;             button.click((ev) =&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum25" style="color: rgb(96, 96, 96);"&gt;  25:&lt;/span&gt;             {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum26" style="color: rgb(96, 96, 96);"&gt;  26:&lt;/span&gt;                 &lt;span style="color: rgb(0, 0, 255);"&gt;var&lt;/span&gt; id = $(&lt;span style="color: rgb(0, 0, 255);"&gt;event&lt;/span&gt;.srcElement).data(&lt;span style="color: rgb(0, 96, 128);"&gt;'command-id'&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum27" style="color: rgb(96, 96, 96);"&gt;  27:&lt;/span&gt;                 &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.modalDialog.modal(&lt;span style="color: rgb(0, 96, 128);"&gt;'hide'&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum28" style="color: rgb(96, 96, 96);"&gt;  28:&lt;/span&gt;                 defer.resolve(id);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum29" style="color: rgb(96, 96, 96);"&gt;  29:&lt;/span&gt;             });&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum30" style="color: rgb(96, 96, 96);"&gt;  30:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum31" style="color: rgb(96, 96, 96);"&gt;  31:&lt;/span&gt;             button.appendTo(footer);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum32" style="color: rgb(96, 96, 96);"&gt;  32:&lt;/span&gt;         }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum33" style="color: rgb(96, 96, 96);"&gt;  33:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum34" style="color: rgb(96, 96, 96);"&gt;  34:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.modalDialog.modal(&lt;span style="color: rgb(0, 96, 128);"&gt;'show'&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum35" style="color: rgb(96, 96, 96);"&gt;  35:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum36" style="color: rgb(96, 96, 96);"&gt;  36:&lt;/span&gt;     &lt;span style="color: rgb(0, 0, 255);"&gt;catch&lt;/span&gt; (error)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum37" style="color: rgb(96, 96, 96);"&gt;  37:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum38" style="color: rgb(96, 96, 96);"&gt;  38:&lt;/span&gt;         defer.reject(error);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum39" style="color: rgb(96, 96, 96);"&gt;  39:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum40" style="color: rgb(96, 96, 96);"&gt;  40:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum41" style="color: rgb(96, 96, 96);"&gt;  41:&lt;/span&gt;     &lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt; defer.promise;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum42" style="color: rgb(96, 96, 96);"&gt;  42:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Diamo per assodato che questo metodo faccia capo ad una classe che ha ricevuto una istanza del Q service come argomento del costruttore. Come segue:&lt;/p&gt;&lt;div id="codeSnippetWrapper" style="margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; border-image: none; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 200px; background-color: rgb(244, 244, 244);"&gt;&lt;div id="codeSnippet" style="padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum1" style="color: rgb(96, 96, 96);"&gt;   1:&lt;/span&gt; constructor(&lt;span style="color: rgb(0, 0, 255);"&gt;private&lt;/span&gt; $q: ng.IQService)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum2" style="color: rgb(96, 96, 96);"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum3" style="color: rgb(96, 96, 96);"&gt;   3:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Il metodo showDialog al proprio inizio crea una istanza di una classe di tipo IDeferred&amp;lt;any&amp;gt;, dove any è il tipo del valore ritornato dal metodo in questione. L'oggetto deferred è quello che ci serve per gestire l'asincronia. Al termine del metodo infatti viene ritornata la promise che esso contiene con "defer.promise". &lt;/p&gt;&lt;p&gt;A questo punto è necessario invocare i callback di successo (then) e quello di fallimento (catch). Per farlo sono utilizzati i metodi "resolve" e "reject" dell'oggetto deferred.&lt;/p&gt;&lt;p&gt;Così facendo è possibile usare il metodo come segue:&lt;/p&gt;&lt;div id="codeSnippetWrapper" style="margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; border-image: none; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 200px; background-color: rgb(244, 244, 244);"&gt;&lt;div id="codeSnippet" style="padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum1" style="color: rgb(96, 96, 96);"&gt;   1:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.showDialog(&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum2" style="color: rgb(96, 96, 96);"&gt;   2:&lt;/span&gt;     &lt;span style="color: rgb(0, 96, 128);"&gt;'Are you sure you want to delete the item'&lt;/span&gt;,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum3" style="color: rgb(96, 96, 96);"&gt;   3:&lt;/span&gt;     &lt;span style="color: rgb(0, 96, 128);"&gt;'Confirm operation'&lt;/span&gt;,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum4" style="color: rgb(96, 96, 96);"&gt;   4:&lt;/span&gt;     sys.Constants.modalYesNo).then(&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum5" style="color: rgb(96, 96, 96);"&gt;   5:&lt;/span&gt;         (id: &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;) =&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum6" style="color: rgb(96, 96, 96);"&gt;   6:&lt;/span&gt;         {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum7" style="color: rgb(96, 96, 96);"&gt;   7:&lt;/span&gt;             &lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt; (id == sys.Constants.Positive)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum8" style="color: rgb(96, 96, 96);"&gt;   8:&lt;/span&gt;             {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum9" style="color: rgb(96, 96, 96);"&gt;   9:&lt;/span&gt;                 &lt;span style="color: rgb(0, 128, 0);"&gt;// delete the item here&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum10" style="color: rgb(96, 96, 96);"&gt;  10:&lt;/span&gt;             }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum11" style="color: rgb(96, 96, 96);"&gt;  11:&lt;/span&gt;         });&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Il sistema è l'unico consigliato. Infatti l'utilizzo dei callback normali crea problemi al sistema di databinding di AngularJS. Invece il q service è perfettamente in grado di supportarlo.&lt;/p&gt;</description>
      <link>http://blog.boschin.it/post/2015/01/15/Gestire-lasicronia-dei-propri-metodi-con-Angular-e-Typescript.aspx</link>
      <comments>http://blog.boschin.it/post/2015/01/15/Gestire-lasicronia-dei-propri-metodi-con-Angular-e-Typescript.aspx#comment</comments>
      <guid>http://blog.boschin.it/post.aspx?id=46c4124b-3549-414f-b84c-086545b5ae8c</guid>
      <pubDate>Thu, 15 Jan 2015 19:06:00 +0200</pubDate>
      <category>Web Development</category>
      <dc:publisher>codeblock</dc:publisher>
      <pingback:server>http://blog.boschin.it/pingback.axd</pingback:server>
      <pingback:target>http://blog.boschin.it/post.aspx?id=46c4124b-3549-414f-b84c-086545b5ae8c</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blog.boschin.it/trackback.axd?id=46c4124b-3549-414f-b84c-086545b5ae8c</trackback:ping>
      <wfw:comment>http://blog.boschin.it/post/2015/01/15/Gestire-lasicronia-dei-propri-metodi-con-Angular-e-Typescript.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.boschin.it/syndication.axd?post=46c4124b-3549-414f-b84c-086545b5ae8c</wfw:commentRss>
    </item>
    <item>
      <title>Angular e Partial View: la direttiva ng-include</title>
      <description>&lt;p&gt;Spesso può risultare molto comodo caricare una porzione di html dal server, magari generata da una partial view di ASP.NET MVC (o magari proprio da una View, perchè no?). con angular questo è del tutto possibile grazie alla direttiva ng-include che consente di specificare l'url da cui&amp;nbsp; caricare una risorsa all'interno della pagina. Vediamo un esempio con typescript:&lt;/p&gt;&lt;p&gt;Per prima cosa si crea una partialview&amp;nbsp; che dimostri un po' di dinamismo. Ecco un semplice esempio:&lt;/p&gt;&lt;div id="codeSnippetWrapper" style="margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; border-image: none; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 200px; background-color: rgb(244, 244, 244);"&gt;&lt;div id="codeSnippet" style="padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum1" style="color: rgb(96, 96, 96);"&gt;   1:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;h2&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;@DateTime.Now.ToLongDateString()&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;h2&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum2" style="color: rgb(96, 96, 96);"&gt;   2:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;h3&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;@DateTime.Now.ToLongTimeString()&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;h3&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;In seguito aggiungiamo al controller il codice per poterla chiamare dal browser:&lt;/p&gt;&lt;div id="codeSnippetWrapper" style="margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; border-image: none; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 200px; background-color: rgb(244, 244, 244);"&gt;&lt;div id="codeSnippet" style="padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum1" style="color: rgb(96, 96, 96);"&gt;   1:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; ActionResult _PartialContent()&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum2" style="color: rgb(96, 96, 96);"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum3" style="color: rgb(96, 96, 96);"&gt;   3:&lt;/span&gt;     &lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt; PartialView();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum4" style="color: rgb(96, 96, 96);"&gt;   4:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;A questo punto diciamo che l'url per raggiungere la partial view sia il seguente:&lt;/p&gt;&lt;p&gt;/Include/_PartialContent&lt;/p&gt;&lt;p&gt;Creaiamo quindi un controller come segue:&lt;/p&gt;&lt;div id="codeSnippetWrapper" style="margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; border-image: none; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 200px; background-color: rgb(244, 244, 244);"&gt;&lt;div id="codeSnippet" style="padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum1" style="color: rgb(96, 96, 96);"&gt;   1:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;class&lt;/span&gt; IncludeController&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum2" style="color: rgb(96, 96, 96);"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum3" style="color: rgb(96, 96, 96);"&gt;   3:&lt;/span&gt;     count: number = 0;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum4" style="color: rgb(96, 96, 96);"&gt;   4:&lt;/span&gt;     includeUri: &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; = undefined;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum5" style="color: rgb(96, 96, 96);"&gt;   5:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum6" style="color: rgb(96, 96, 96);"&gt;   6:&lt;/span&gt;     click(): &lt;span style="color: rgb(0, 0, 255);"&gt;void&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum7" style="color: rgb(96, 96, 96);"&gt;   7:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum8" style="color: rgb(96, 96, 96);"&gt;   8:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.includeUri = &lt;span style="color: rgb(0, 96, 128);"&gt;'../Include/_PartialContent?ts='&lt;/span&gt; + (++&lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.count).toString();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum9" style="color: rgb(96, 96, 96);"&gt;   9:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum10" style="color: rgb(96, 96, 96);"&gt;  10:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum11" style="color: rgb(96, 96, 96);"&gt;  11:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum12" style="color: rgb(96, 96, 96);"&gt;  12:&lt;/span&gt; angular.module(&lt;span style="color: rgb(0, 96, 128);"&gt;'include'&lt;/span&gt;, [&lt;span style="color: rgb(0, 96, 128);"&gt;'ngRoute'&lt;/span&gt;])&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum13" style="color: rgb(96, 96, 96);"&gt;  13:&lt;/span&gt;     .controller(&lt;span style="color: rgb(0, 96, 128);"&gt;'includeIndex'&lt;/span&gt;, IncludeController);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Nel controller usiamo una variabile "count" per tenere conto delle volte in cui l'utente clicca il pulsante di test. Questo valore viene accodato all'uri della partial-view per forzarne il caricamento a ciascun click. L'uri così calcolato viene riposto nella proprietà includeUri. Vediamo ora la view:&lt;/p&gt;&lt;div id="codeSnippetWrapper" style="margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; border-image: none; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 200px; background-color: rgb(244, 244, 244);"&gt;&lt;div id="codeSnippet" style="padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum1" style="color: rgb(96, 96, 96);"&gt;   1:&lt;/span&gt; @{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum2" style="color: rgb(96, 96, 96);"&gt;   2:&lt;/span&gt;     ViewBag.Title = "Test Include";&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum3" style="color: rgb(96, 96, 96);"&gt;   3:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum4" style="color: rgb(96, 96, 96);"&gt;   4:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;div&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum5" style="color: rgb(96, 96, 96);"&gt;   5:&lt;/span&gt;     &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum6" style="color: rgb(96, 96, 96);"&gt;   6:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;div&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum7" style="color: rgb(96, 96, 96);"&gt;   7:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;div&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;ng-app&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="include"&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;ng-controller&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="includeIndex as ct"&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;class&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="row"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum8" style="color: rgb(96, 96, 96);"&gt;   8:&lt;/span&gt;     &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;form&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum9" style="color: rgb(96, 96, 96);"&gt;   9:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;button&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;type&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="button"&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;class&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="btn btn-primary"&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;ng-click&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="ct.click();"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;Click Me!&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;button&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum10" style="color: rgb(96, 96, 96);"&gt;  10:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;p&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;ng-show&lt;/span&gt;="&lt;span style="color: rgb(255, 0, 0);"&gt;ct&lt;/span&gt;.&lt;span style="color: rgb(255, 0, 0);"&gt;count&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;0"&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;clicked {{ct.count}} times&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;p&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum11" style="color: rgb(96, 96, 96);"&gt;  11:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;div&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;ng-include&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="ct.includeUri"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;div&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum12" style="color: rgb(96, 96, 96);"&gt;  12:&lt;/span&gt;     &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;form&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum13" style="color: rgb(96, 96, 96);"&gt;  13:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;div&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum14" style="color: rgb(96, 96, 96);"&gt;  14:&lt;/span&gt; @section Scripts {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum15" style="color: rgb(96, 96, 96);"&gt;  15:&lt;/span&gt;     &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;script&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;src&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="~/Scripts/Views/Include/index.js"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;script&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum16" style="color: rgb(96, 96, 96);"&gt;  16:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Niente più di un normale binding, con un pulsante per invocare la funzione click(), la visualizzazione del count e l'assegnazione della direttiva ng-include sulla variabile includeUri. Il risultato è che la partial view viene inclusa all'interno delle pagina ogni volta che clicchiamo il pulsante.&lt;/p&gt;&lt;p&gt;Interessante notare che mediante questa tecnica possiamo agevolmente caricare nella pagina qualunque tipo di file il server sia in grado di servire. Se ad esempio all'url della partial sostituiamo quello del file TS vedremo apparire il codice.&lt;/p&gt;</description>
      <link>http://blog.boschin.it/post/2014/11/20/Angular-e-Partial-View-la-direttiva-ng-include.aspx</link>
      <comments>http://blog.boschin.it/post/2014/11/20/Angular-e-Partial-View-la-direttiva-ng-include.aspx#comment</comments>
      <guid>http://blog.boschin.it/post.aspx?id=1bd44bca-86c2-4c5d-943c-8fe4e6fc9218</guid>
      <pubDate>Thu, 20 Nov 2014 16:12:00 +0200</pubDate>
      <category>Web Development</category>
      <dc:publisher>codeblock</dc:publisher>
      <pingback:server>http://blog.boschin.it/pingback.axd</pingback:server>
      <pingback:target>http://blog.boschin.it/post.aspx?id=1bd44bca-86c2-4c5d-943c-8fe4e6fc9218</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blog.boschin.it/trackback.axd?id=1bd44bca-86c2-4c5d-943c-8fe4e6fc9218</trackback:ping>
      <wfw:comment>http://blog.boschin.it/post/2014/11/20/Angular-e-Partial-View-la-direttiva-ng-include.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.boschin.it/syndication.axd?post=1bd44bca-86c2-4c5d-943c-8fe4e6fc9218</wfw:commentRss>
    </item>
    <item>
      <title>Generare i proxy javascript per le WebApi</title>
      <description>&lt;p align="justify"&gt;Sempre più spesso, nelle moderne applicazioni web, il codice Javascript di una pagina ha la necessità di accedere ad una webapi. Questo è certamente il più semplice metodo per attivare la pagina caricando informazioni dal server senza necessariamente effettuare il refresh dell'intera pagina. La chiamata può essere necessaria per riempire una semplice dropdowlist il cui contenuto dipende da qualche altro valore impostato in una form, piuttosto che una lista di risultati di una ricerca. Qualunque sia il contenuto, l'operazione è sempre quella di richiemare un metodo di una webapi e in seguito alla risposta deserializzare il json per popolare l'interfaccia utente. &lt;/p&gt;&lt;p align="justify"&gt;In casi come questi ho trovato molto utile usare una classe proxy, mimando quello che avviene in C# quando si interroga un servizio WCF. La cosa interessante è che le WebApi mettono a disposizione di un ApiExplorer che è in grado di fare l'inspect della api stessa e restituire tutti i dettagli quali i metodi, i loro parametri, tipi di ritorno etc.. Grazie ad esso è possibile scrivere il seguente metodo:&lt;/p&gt;&lt;div id="codeSnippetWrapper" style="margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; border-image: none; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 200px; background-color: rgb(244, 244, 244);"&gt;&lt;div id="codeSnippet" style="padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum1" style="color: rgb(96, 96, 96);"&gt;   1:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;abstract&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;class&lt;/span&gt; ApScriptableController : ApiController&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum2" style="color: rgb(96, 96, 96);"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum3" style="color: rgb(96, 96, 96);"&gt;   3:&lt;/span&gt;     &lt;span style="color: rgb(0, 128, 0);"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum4" style="color: rgb(96, 96, 96);"&gt;   4:&lt;/span&gt;     &lt;span style="color: rgb(0, 128, 0);"&gt;/// Il metodo restituisce lo script Javascript che consente di interrogare il controller&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum5" style="color: rgb(96, 96, 96);"&gt;   5:&lt;/span&gt;     &lt;span style="color: rgb(0, 128, 0);"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum6" style="color: rgb(96, 96, 96);"&gt;   6:&lt;/span&gt;     &lt;span style="color: rgb(0, 128, 0);"&gt;/// &amp;lt;returns&amp;gt;Ritorna il &amp;lt;/returns&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum7" style="color: rgb(96, 96, 96);"&gt;   7:&lt;/span&gt;     [HttpGet]&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum8" style="color: rgb(96, 96, 96);"&gt;   8:&lt;/span&gt;     &lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; HttpResponseMessage GetScript()&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum9" style="color: rgb(96, 96, 96);"&gt;   9:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum10" style="color: rgb(96, 96, 96);"&gt;  10:&lt;/span&gt;         ApiExplorer explorer = &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; ApiExplorer(&lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.Configuration);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum11" style="color: rgb(96, 96, 96);"&gt;  11:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum12" style="color: rgb(96, 96, 96);"&gt;  12:&lt;/span&gt;         StringBuilder builder = &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; StringBuilder();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum13" style="color: rgb(96, 96, 96);"&gt;  13:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum14" style="color: rgb(96, 96, 96);"&gt;  14:&lt;/span&gt;         builder.Append(&lt;span style="color: rgb(0, 96, 128);"&gt;"var __extends = this.__extends || function (d, b) {"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum15" style="color: rgb(96, 96, 96);"&gt;  15:&lt;/span&gt;         builder.Append(&lt;span style="color: rgb(0, 96, 128);"&gt;"    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum16" style="color: rgb(96, 96, 96);"&gt;  16:&lt;/span&gt;         builder.Append(&lt;span style="color: rgb(0, 96, 128);"&gt;"    function __() { this.constructor = d; }"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum17" style="color: rgb(96, 96, 96);"&gt;  17:&lt;/span&gt;         builder.Append(&lt;span style="color: rgb(0, 96, 128);"&gt;"    __.prototype = b.prototype;"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum18" style="color: rgb(96, 96, 96);"&gt;  18:&lt;/span&gt;         builder.Append(&lt;span style="color: rgb(0, 96, 128);"&gt;"    d.prototype = new __();"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum19" style="color: rgb(96, 96, 96);"&gt;  19:&lt;/span&gt;         builder.Append(&lt;span style="color: rgb(0, 96, 128);"&gt;"};"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum20" style="color: rgb(96, 96, 96);"&gt;  20:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum21" style="color: rgb(96, 96, 96);"&gt;  21:&lt;/span&gt;         var actions = (from api &lt;span style="color: rgb(0, 0, 255);"&gt;in&lt;/span&gt; explorer.ApiDescriptions&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum22" style="color: rgb(96, 96, 96);"&gt;  22:&lt;/span&gt;                        &lt;span style="color: rgb(0, 0, 255);"&gt;where&lt;/span&gt;  api.ActionDescriptor.ControllerDescriptor.ControllerType.IsAssignableFrom(&lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.GetType())&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum23" style="color: rgb(96, 96, 96);"&gt;  23:&lt;/span&gt;                        orderby api.ActionDescriptor.ActionName ascending&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum24" style="color: rgb(96, 96, 96);"&gt;  24:&lt;/span&gt;                        select api).ToArray();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum25" style="color: rgb(96, 96, 96);"&gt;  25:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum26" style="color: rgb(96, 96, 96);"&gt;  26:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt; (actions.Count() &amp;gt; 0)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum27" style="color: rgb(96, 96, 96);"&gt;  27:&lt;/span&gt;         {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum28" style="color: rgb(96, 96, 96);"&gt;  28:&lt;/span&gt;             &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; controllerName = actions.First().ActionDescriptor.ControllerDescriptor.ControllerName;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum29" style="color: rgb(96, 96, 96);"&gt;  29:&lt;/span&gt;             controllerName = controllerName.Substring(0, 1).ToUpper() + controllerName.Remove(0, 1);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum30" style="color: rgb(96, 96, 96);"&gt;  30:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum31" style="color: rgb(96, 96, 96);"&gt;  31:&lt;/span&gt;             builder.AppendFormat(&lt;span style="color: rgb(0, 96, 128);"&gt;"var {0}Proxy = (function (_super) {{"&lt;/span&gt;, controllerName);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum32" style="color: rgb(96, 96, 96);"&gt;  32:&lt;/span&gt;             builder.AppendFormat(&lt;span style="color: rgb(0, 96, 128);"&gt;"    __extends({0}Proxy, _super);"&lt;/span&gt;, controllerName);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum33" style="color: rgb(96, 96, 96);"&gt;  33:&lt;/span&gt;             builder.AppendFormat(&lt;span style="color: rgb(0, 96, 128);"&gt;"    function {0}Proxy(baseUri, accessToken, context) {{"&lt;/span&gt;, controllerName);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum34" style="color: rgb(96, 96, 96);"&gt;  34:&lt;/span&gt;             builder.Append(&lt;span style="color: rgb(0, 96, 128);"&gt;"        _super.call(this, baseUri, accessToken);"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum35" style="color: rgb(96, 96, 96);"&gt;  35:&lt;/span&gt;             builder.Append(&lt;span style="color: rgb(0, 96, 128);"&gt;"        this.context = context;"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum36" style="color: rgb(96, 96, 96);"&gt;  36:&lt;/span&gt;             builder.Append(&lt;span style="color: rgb(0, 96, 128);"&gt;"    }"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum37" style="color: rgb(96, 96, 96);"&gt;  37:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum38" style="color: rgb(96, 96, 96);"&gt;  38:&lt;/span&gt;             &lt;span style="color: rgb(0, 0, 255);"&gt;foreach&lt;/span&gt; (var item &lt;span style="color: rgb(0, 0, 255);"&gt;in&lt;/span&gt; actions)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum39" style="color: rgb(96, 96, 96);"&gt;  39:&lt;/span&gt;             {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum40" style="color: rgb(96, 96, 96);"&gt;  40:&lt;/span&gt;                 builder.AppendFormat(&lt;span style="color: rgb(0, 96, 128);"&gt;"    {1}Proxy.prototype.{0} = function (value) {{"&lt;/span&gt;, item.ActionDescriptor.ActionName, controllerName);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum41" style="color: rgb(96, 96, 96);"&gt;  41:&lt;/span&gt;                 builder.AppendFormat(&lt;span style="color: rgb(0, 96, 128);"&gt;"        return _super.prototype.callApi.call(this, '{0}', value, this.context);"&lt;/span&gt;, item.RelativePath);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum42" style="color: rgb(96, 96, 96);"&gt;  42:&lt;/span&gt;                 builder.Append(&lt;span style="color: rgb(0, 96, 128);"&gt;"    };"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum43" style="color: rgb(96, 96, 96);"&gt;  43:&lt;/span&gt;             }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum44" style="color: rgb(96, 96, 96);"&gt;  44:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum45" style="color: rgb(96, 96, 96);"&gt;  45:&lt;/span&gt;             builder.AppendFormat(&lt;span style="color: rgb(0, 96, 128);"&gt;"    return {0}Proxy;"&lt;/span&gt;, controllerName);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum46" style="color: rgb(96, 96, 96);"&gt;  46:&lt;/span&gt;             builder.Append(&lt;span style="color: rgb(0, 96, 128);"&gt;"})(sys.net.Proxy);"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum47" style="color: rgb(96, 96, 96);"&gt;  47:&lt;/span&gt;         }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum48" style="color: rgb(96, 96, 96);"&gt;  48:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum49" style="color: rgb(96, 96, 96);"&gt;  49:&lt;/span&gt;         var response = &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; HttpResponseMessage(HttpStatusCode.OK);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum50" style="color: rgb(96, 96, 96);"&gt;  50:&lt;/span&gt;         response.Content = &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; StringContent(builder.ToString(), Encoding.UTF8, &lt;span style="color: rgb(0, 96, 128);"&gt;"text/javascript"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum51" style="color: rgb(96, 96, 96);"&gt;  51:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt; response;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum52" style="color: rgb(96, 96, 96);"&gt;  52:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum53" style="color: rgb(96, 96, 96);"&gt;  53:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p align="justify"&gt;&lt;/p&gt;&lt;p align="justify"&gt;Il codice rappresenta una classe base da utilizzare per i controller delle WebApi. Essa implementa un metodo GetScript che non fa altro che ispezionare i metodi della api stessa e genera di conseguenza un codice Javascript che rappresenterà il proxy della WebApi. In coda al metodo, le ultime righe cambiano il content-type della risposta impostandolo e text/javascript. In questo modo sarà possibile fornire l'url della api ad un tag script e di conseguenza far leggere il codice e caricarlo nel browser.&lt;/p&gt;&lt;div align="justify"&gt;&lt;div id="codeSnippetWrapper" style="margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; border-image: none; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 200px; background-color: rgb(244, 244, 244);"&gt;&lt;div id="codeSnippet" style="padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum1" style="color: rgb(96, 96, 96);"&gt;   1:&lt;/span&gt; &lt;span style="color: rgb(0, 96, 128);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;script&lt;/span&gt; src="~/api/Home/getscript"&lt;span style="color: rgb(0, 96, 128);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 96, 128);"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: rgb(0, 0, 255);"&gt;script&lt;/span&gt;&lt;span style="color: rgb(0, 96, 128);"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p align="justify"&gt;L'ultimo tassello di questo piccolo puzzle è una classe Typescript che rappresenta la base per il proxy Javascript. Il codice generato infatti fa uso delle funzioni e dei tipi presenti in questo breve snippet.&lt;/p&gt;&lt;div id="codeSnippetWrapper" style="margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; border-image: none; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 200px; background-color: rgb(244, 244, 244);"&gt;&lt;div id="codeSnippet" style="padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum1" style="color: rgb(96, 96, 96);"&gt;   1:&lt;/span&gt; module sys.net&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum2" style="color: rgb(96, 96, 96);"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum3" style="color: rgb(96, 96, 96);"&gt;   3:&lt;/span&gt;     &lt;span style="color: rgb(0, 128, 0);"&gt;// represents a base for api responses&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum4" style="color: rgb(96, 96, 96);"&gt;   4:&lt;/span&gt;     export &lt;span style="color: rgb(0, 0, 255);"&gt;interface&lt;/span&gt; IApiResponseBase &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum5" style="color: rgb(96, 96, 96);"&gt;   5:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum6" style="color: rgb(96, 96, 96);"&gt;   6:&lt;/span&gt;         HasErrors: boolean&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum7" style="color: rgb(96, 96, 96);"&gt;   7:&lt;/span&gt;         Message: &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum8" style="color: rgb(96, 96, 96);"&gt;   8:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum9" style="color: rgb(96, 96, 96);"&gt;   9:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum10" style="color: rgb(96, 96, 96);"&gt;  10:&lt;/span&gt;     &lt;span style="color: rgb(0, 128, 0);"&gt;// represents a successful response from an api&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum11" style="color: rgb(96, 96, 96);"&gt;  11:&lt;/span&gt;     export &lt;span style="color: rgb(0, 0, 255);"&gt;interface&lt;/span&gt; IApiResponse&amp;lt;T&amp;gt; extends IApiResponseBase&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum12" style="color: rgb(96, 96, 96);"&gt;  12:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum13" style="color: rgb(96, 96, 96);"&gt;  13:&lt;/span&gt;         Result: T;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum14" style="color: rgb(96, 96, 96);"&gt;  14:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum15" style="color: rgb(96, 96, 96);"&gt;  15:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum16" style="color: rgb(96, 96, 96);"&gt;  16:&lt;/span&gt;     export &lt;span style="color: rgb(0, 0, 255);"&gt;class&lt;/span&gt; Proxy &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum17" style="color: rgb(96, 96, 96);"&gt;  17:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum18" style="color: rgb(96, 96, 96);"&gt;  18:&lt;/span&gt;         &lt;span style="color: rgb(0, 128, 0);"&gt;// creates and initializes the proxy with the given base uri&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum19" style="color: rgb(96, 96, 96);"&gt;  19:&lt;/span&gt;         constructor(&lt;span style="color: rgb(0, 0, 255);"&gt;private&lt;/span&gt; baseUri: &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;, &lt;span style="color: rgb(0, 0, 255);"&gt;private&lt;/span&gt; accessToken: &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum20" style="color: rgb(96, 96, 96);"&gt;  20:&lt;/span&gt;         { }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum21" style="color: rgb(96, 96, 96);"&gt;  21:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum22" style="color: rgb(96, 96, 96);"&gt;  22:&lt;/span&gt;         &lt;span style="color: rgb(0, 128, 0);"&gt;// calls a generic API with the specified route and argument&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum23" style="color: rgb(96, 96, 96);"&gt;  23:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; callApi&amp;lt;T&amp;gt;(route: &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;, argument: any, context?: &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;): JQueryPromise&amp;lt;T&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum24" style="color: rgb(96, 96, 96);"&gt;  24:&lt;/span&gt;         {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum25" style="color: rgb(96, 96, 96);"&gt;  25:&lt;/span&gt;             &lt;span style="color: rgb(0, 0, 255);"&gt;var&lt;/span&gt; uri = &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.baseUri + route;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum26" style="color: rgb(96, 96, 96);"&gt;  26:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum27" style="color: rgb(96, 96, 96);"&gt;  27:&lt;/span&gt;             &lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt; $.Deferred(&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum28" style="color: rgb(96, 96, 96);"&gt;  28:&lt;/span&gt;                 (deferred: JQueryDeferred&amp;lt;T&amp;gt;) =&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum29" style="color: rgb(96, 96, 96);"&gt;  29:&lt;/span&gt;                 {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum30" style="color: rgb(96, 96, 96);"&gt;  30:&lt;/span&gt;                     $.ajax({&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum31" style="color: rgb(96, 96, 96);"&gt;  31:&lt;/span&gt;                         url: uri,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum32" style="color: rgb(96, 96, 96);"&gt;  32:&lt;/span&gt;                         type: &lt;span style="color: rgb(0, 96, 128);"&gt;'POST'&lt;/span&gt;,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum33" style="color: rgb(96, 96, 96);"&gt;  33:&lt;/span&gt;                         data: JSON.stringify(argument),&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum34" style="color: rgb(96, 96, 96);"&gt;  34:&lt;/span&gt;                         contentType: &lt;span style="color: rgb(0, 96, 128);"&gt;'application/json; charset=utf-8'&lt;/span&gt;,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum35" style="color: rgb(96, 96, 96);"&gt;  35:&lt;/span&gt;                         beforeSend: (xhr) =&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum36" style="color: rgb(96, 96, 96);"&gt;  36:&lt;/span&gt;                         {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum37" style="color: rgb(96, 96, 96);"&gt;  37:&lt;/span&gt;                             xhr.setRequestHeader(&lt;span style="color: rgb(0, 96, 128);"&gt;'Authorization'&lt;/span&gt;, &lt;span style="color: rgb(0, 96, 128);"&gt;'Bearer '&lt;/span&gt; + &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.accessToken);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum38" style="color: rgb(96, 96, 96);"&gt;  38:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum39" style="color: rgb(96, 96, 96);"&gt;  39:&lt;/span&gt;                             &lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt; (context != undefined)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum40" style="color: rgb(96, 96, 96);"&gt;  40:&lt;/span&gt;                                 xhr.setRequestHeader(&lt;span style="color: rgb(0, 96, 128);"&gt;'X-Tsf-Context'&lt;/span&gt;, context);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum41" style="color: rgb(96, 96, 96);"&gt;  41:&lt;/span&gt;                         }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum42" style="color: rgb(96, 96, 96);"&gt;  42:&lt;/span&gt;                     })&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum43" style="color: rgb(96, 96, 96);"&gt;  43:&lt;/span&gt;                         .done(&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum44" style="color: rgb(96, 96, 96);"&gt;  44:&lt;/span&gt;                         (retVal: IApiResponse&amp;lt;T&amp;gt;) =&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum45" style="color: rgb(96, 96, 96);"&gt;  45:&lt;/span&gt;                         {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum46" style="color: rgb(96, 96, 96);"&gt;  46:&lt;/span&gt;                             &lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt; (retVal.HasErrors)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum47" style="color: rgb(96, 96, 96);"&gt;  47:&lt;/span&gt;                                 deferred.reject(retVal);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum48" style="color: rgb(96, 96, 96);"&gt;  48:&lt;/span&gt;                             &lt;span style="color: rgb(0, 0, 255);"&gt;else&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum49" style="color: rgb(96, 96, 96);"&gt;  49:&lt;/span&gt;                                 deferred.resolve(retVal.Result);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum50" style="color: rgb(96, 96, 96);"&gt;  50:&lt;/span&gt;                         })&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum51" style="color: rgb(96, 96, 96);"&gt;  51:&lt;/span&gt;                         .fail((err: any) =&amp;gt; deferred.reject(&lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.mapToError(uri, err)));&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum52" style="color: rgb(96, 96, 96);"&gt;  52:&lt;/span&gt;                 }).promise();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum53" style="color: rgb(96, 96, 96);"&gt;  53:&lt;/span&gt;         }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum54" style="color: rgb(96, 96, 96);"&gt;  54:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum55" style="color: rgb(96, 96, 96);"&gt;  55:&lt;/span&gt;         &lt;span style="color: rgb(0, 128, 0);"&gt;// maps any error information to a common object&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum56" style="color: rgb(96, 96, 96);"&gt;  56:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;private&lt;/span&gt; mapToError(uri: &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;, err: any): IApiResponseBase&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum57" style="color: rgb(96, 96, 96);"&gt;  57:&lt;/span&gt;         {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum58" style="color: rgb(96, 96, 96);"&gt;  58:&lt;/span&gt;             &lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt; &amp;lt;IApiResponseBase&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum59" style="color: rgb(96, 96, 96);"&gt;  59:&lt;/span&gt;                 {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum60" style="color: rgb(96, 96, 96);"&gt;  60:&lt;/span&gt;                     Message: &lt;span style="color: rgb(0, 96, 128);"&gt;'Api "'&lt;/span&gt; + uri + &lt;span style="color: rgb(0, 96, 128);"&gt;'" reported an error: '&lt;/span&gt; + err.statusText,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum61" style="color: rgb(96, 96, 96);"&gt;  61:&lt;/span&gt;                     HasErrors: &lt;span style="color: rgb(0, 0, 255);"&gt;true&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum62" style="color: rgb(96, 96, 96);"&gt;  62:&lt;/span&gt;                 };&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum63" style="color: rgb(96, 96, 96);"&gt;  63:&lt;/span&gt;         }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum64" style="color: rgb(96, 96, 96);"&gt;  64:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum65" style="color: rgb(96, 96, 96);"&gt;  65:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p align="justify"&gt;Una volta che il codice sia caricato nell'ordine corretto, avremo a disposizione una classe che riporta il nome del controller seguito dalla parola Proxy. Perciò se il controller ha il nome "Home" il proxy sarà "HomeProxy". &lt;/p&gt;&lt;div id="codeSnippetWrapper" style="margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; border-image: none; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 200px; background-color: rgb(244, 244, 244);"&gt;&lt;div id="codeSnippet" style="padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum1" style="color: rgb(96, 96, 96);"&gt;   1:&lt;/span&gt; var proxy = &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; HomeProxy(sys.Application.ServiceUri, sys.Application.AccessToken, sys.Application.Context);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum2" style="color: rgb(96, 96, 96);"&gt;   2:&lt;/span&gt; proxy.GetValuesForList()&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum3" style="color: rgb(96, 96, 96);"&gt;   3:&lt;/span&gt;     .done((result) =&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum4" style="color: rgb(96, 96, 96);"&gt;   4:&lt;/span&gt;      {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum5" style="color: rgb(96, 96, 96);"&gt;   5:&lt;/span&gt;         &lt;span style="color: rgb(0, 128, 0);"&gt;// TODO: process here&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum6" style="color: rgb(96, 96, 96);"&gt;   6:&lt;/span&gt;      });&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p align="justify"&gt;Il proxy fa uso delle promise di jQuery perciò il suo utilizzo è molto semplice e gestisce perfettamente la asincronicità. &lt;/p&gt;</description>
      <link>http://blog.boschin.it/post/2014/08/20/Generare-i-proxy-javascript-per-le-WebApi.aspx</link>
      <comments>http://blog.boschin.it/post/2014/08/20/Generare-i-proxy-javascript-per-le-WebApi.aspx#comment</comments>
      <guid>http://blog.boschin.it/post.aspx?id=38faafe0-df6c-4ac2-8e3c-2bb20900b1f9</guid>
      <pubDate>Wed, 20 Aug 2014 03:25:00 +0200</pubDate>
      <category>Web Development</category>
      <dc:publisher>codeblock</dc:publisher>
      <pingback:server>http://blog.boschin.it/pingback.axd</pingback:server>
      <pingback:target>http://blog.boschin.it/post.aspx?id=38faafe0-df6c-4ac2-8e3c-2bb20900b1f9</pingback:target>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://blog.boschin.it/trackback.axd?id=38faafe0-df6c-4ac2-8e3c-2bb20900b1f9</trackback:ping>
      <wfw:comment>http://blog.boschin.it/post/2014/08/20/Generare-i-proxy-javascript-per-le-WebApi.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.boschin.it/syndication.axd?post=38faafe0-df6c-4ac2-8e3c-2bb20900b1f9</wfw:commentRss>
    </item>
    <item>
      <title>ng-Cloak e il binding visibile in angularjs</title>
      <description>&lt;p&gt;Capita talvolta (spesso in effetti), che quando entrate in una pagina in cui sia utilizzato AngularJS per una frazione di secondo appaiano le notazioni del binding che spariscono poco dopo quando il databinding viene applicato. Questo accade perchè in quella frazione di secondo in cui il browser scarica il codice e avvia angular, tutte quelle parentesi graffe sono niente più che semplice testo e in gran parte esse sono visualizzate dal browser perchè occupano posizioni "visibili". &lt;/p&gt;&lt;p&gt;Per evitare questo comportamento viene in aiuto la direttiva ng-Cloak. Essa, come testimonia la documentazione ha proprio lo scopo di applicare un "display:none" agli elementi, e questo funzione nella maggioranza dei casi. Tuttavia anche se applichiamo la direttiva ng-Cloak (ad esempio al body per generalizzare, ma anche ad un singolo elemento come invece è consigliabile) talvolta le graffe appaiono comunque. Questo è imputqabile al medesimo ritardo. Per evitarlo è opportuno aggiungere al proprio css il seguente:&lt;/p&gt;&lt;div id="codeSnippetWrapper" style="margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; border-image: none; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 200px; background-color: rgb(244, 244, 244);"&gt;&lt;div id="codeSnippet" style="padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum1" style="color: rgb(96, 96, 96);"&gt;   1:&lt;/span&gt; [ng\:cloak], [ng-cloak], &lt;span style="color: rgb(204, 102, 51);"&gt;.ng-cloak&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum2" style="color: rgb(96, 96, 96);"&gt;   2:&lt;/span&gt;   &lt;span style="color: rgb(0, 0, 255);"&gt;display&lt;/span&gt;: none &lt;span style="color: rgb(0, 96, 128);"&gt;!important;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum3" style="color: rgb(96, 96, 96);"&gt;   3:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;In questo modo il CSS cercherà tutti gli elementi con l'attributo ng-Cloak e li nasconderà automaticamente. &lt;/p&gt;&lt;p&gt;Il trick è spiegato più estensivamente qui: &lt;a title="http://stackoverflow.com/questions/11249768/angularjs-ng-cloak-ng-show-elements-blink" href="http://stackoverflow.com/questions/11249768/angularjs-ng-cloak-ng-show-elements-blink"&gt;http://stackoverflow.com/questions/11249768/angularjs-ng-cloak-ng-show-elements-blink&lt;/a&gt;&lt;/p&gt;</description>
      <link>http://blog.boschin.it/post/2014/08/08/ng-Cloak-e-il-binding-visibile-in-angularjs.aspx</link>
      <comments>http://blog.boschin.it/post/2014/08/08/ng-Cloak-e-il-binding-visibile-in-angularjs.aspx#comment</comments>
      <guid>http://blog.boschin.it/post.aspx?id=4cc9cd9f-43b4-4436-9e0e-c5084c2aab15</guid>
      <pubDate>Fri, 08 Aug 2014 18:40:00 +0200</pubDate>
      <category>Web Development</category>
      <dc:publisher>codeblock</dc:publisher>
      <pingback:server>http://blog.boschin.it/pingback.axd</pingback:server>
      <pingback:target>http://blog.boschin.it/post.aspx?id=4cc9cd9f-43b4-4436-9e0e-c5084c2aab15</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blog.boschin.it/trackback.axd?id=4cc9cd9f-43b4-4436-9e0e-c5084c2aab15</trackback:ping>
      <wfw:comment>http://blog.boschin.it/post/2014/08/08/ng-Cloak-e-il-binding-visibile-in-angularjs.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.boschin.it/syndication.axd?post=4cc9cd9f-43b4-4436-9e0e-c5084c2aab15</wfw:commentRss>
    </item>
    <item>
      <title>Il probabile e il possibile</title>
      <description>&lt;p align="justify"&gt;Ho sempre avuto l’insana convinzione che fosse meglio vivere, sempre e invariabilmente, scommettendo il possibile contro il probabile. Questo perchè in definitiva il probabile esiste e basta… è probabile, e quindi serve il minimo sforzo perchè di verifichi, ma da esso non ti puoi aspettare sorprese, niente di positivo, niente che faccia evolvere la tua situazione in meglio, niente che sia in più rispetto a quello che tutti si aspettano. Il probabile è il minimo sindacale, è l’oppressore che vince sull’oppresso, è lo stesso quotidiano tutti i giorni, è il latte consegnato all’uscio, quello che non ti fa “mandare dalla mamma”. &lt;/p&gt;&lt;p align="justify"&gt;Il possibile invece è creativo. Lui non esiste e te lo devi costruire, pezzo per pezzo, con fantasia e immaginazione. Il possibile in realtà sono i tuoi sogni, quelli che fai mentre guidi sulla via del ritorno dall’ufficio, e che tutti il più delle volte archiviano dicendo… “ah, impossibile!”. &lt;/p&gt;&lt;p align="justify"&gt;Alla fine il probabile è una vacanza in una comune località di mare dove il massimo che ti puoi aspettare è che un ombrellone sia un po’ fuori posto. Arriva il bagnino, lo sistema e tutto torna nell’ambito della semplice probabilità. Il possibile invece è una settimana in barca, alla scoperta di angoli del mondo che nemmeno ti aspettavi potessero esistere, pieno del colore, del profumo e delle sensazioni che mai avresti immaginato.&lt;/p&gt;&lt;p align="justify"&gt;Il problema è che mentre il probabile non ti delude mai, dato che non ti da nulla, il possibile è armato di scimitarra ed è pronto, in ogni istante, a menarti un fendente che ti lascia tramortito. Succede, spesso, che inseguendo il possibile si rimanga trafitti, bastonati, delusi e tramortiti, ma alla fine ne vale sempre la pena. Vale la pena il sapere di aver fatto qualcosa che ti ha cambiato o che ha cambiato, sentire la soddifazione di essere riusciti a lasciare un segno, a migliorare le cose, a… a… a… … anche se il prezzo il da pagare il più delle volte è lo stare male perchè il probabile ha vinto ancora una volta.&lt;/p&gt;&lt;p align="justify"&gt;Già, impossibile… tutti invariabilmente lo hanno detto almeno una volta, i più se lo dicono sempre con insistenza. Il risultato è l’aver dovuto archiviare con una sola parola un sogno, e aver chiuso un libro di speranze senza nemmeno provare a renderlo concreto. Anche io spesso, ma mai volentieri, cedo al probabilismo, alla tentazione della uniformità e prevedibilità. Ma spesso, soprattutto se mi fermo a pensarci, allora il possibile mi illumina e braccio a braccio al mio ottimismo mi guida alla scoperta di aspetti e possibilità che nemmeno osavo esprimere.&lt;/p&gt;&lt;p align="justify"&gt;Lasciamo la noia a quei dannati probabilisti. La vita sta nel possibile.&lt;/p&gt;</description>
      <link>http://blog.boschin.it/post/2014/07/27/Il-probabile-e-il-possibile.aspx</link>
      <comments>http://blog.boschin.it/post/2014/07/27/Il-probabile-e-il-possibile.aspx#comment</comments>
      <guid>http://blog.boschin.it/post.aspx?id=80936fec-05f9-496c-8ac0-d8ce90229809</guid>
      <pubDate>Sun, 27 Jul 2014 23:28:33 +0200</pubDate>
      <category>About me...</category>
      <dc:publisher>codeblock</dc:publisher>
      <pingback:server>http://blog.boschin.it/pingback.axd</pingback:server>
      <pingback:target>http://blog.boschin.it/post.aspx?id=80936fec-05f9-496c-8ac0-d8ce90229809</pingback:target>
      <slash:comments>3</slash:comments>
      <trackback:ping>http://blog.boschin.it/trackback.axd?id=80936fec-05f9-496c-8ac0-d8ce90229809</trackback:ping>
      <wfw:comment>http://blog.boschin.it/post/2014/07/27/Il-probabile-e-il-possibile.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.boschin.it/syndication.axd?post=80936fec-05f9-496c-8ac0-d8ce90229809</wfw:commentRss>
    </item>
    <item>
      <title>MVP da 8 anni... un saluto particolare a... Silverlight</title>
      <description>&lt;p align="justify"&gt;&lt;img width="150" height="61" title="mvplogo" align="left" style="margin: 12px 15px 0px 0px; float: left; display: inline;" alt="mvplogo" src="http://blog.boschin.it/image.axd?picture=mvplogo.jpg"&gt;Primo luglio, la calura, l'estate che arriva e anche quest'anno come da otto a questa parte è arrivata l'attesissima mail, regalandomi un'emozione cui non sono ancora riuscito ad abituarmi. &lt;strong&gt;MVP Windows Platform Development&lt;/strong&gt;.&lt;/p&gt;&lt;p align="justify"&gt;MVP ancora una volta, parte di questa straordinaria community di persone che condivisono la passione per la tecnologia, la condivisione della conoscenza e il lavoro, quello pratico, "sul pezzo", a risolvere problemi e a escogitare soluzioni.&lt;/p&gt;&lt;p align="justify"&gt;Ma un ricordo particolare va a Silverlight. Ho avuto l'onore di essere il primo italiano ad entrare nella categoria MVP su questa tecnologia e sono anche l'ultimo che la lascia. Abbiamo ormai tutti digerito i motivi che hanno portato alla trasformazione di questo splendido strumento in quello che oggi vediamo in Windows 8 e in Windows Phone... è tutta farina che viene da quella splendida esperienza. E ora Windows Platform Development ne è la logica conclusione.&lt;/p&gt;&lt;p align="justify"&gt;Grazie. Grazie a tutti, in particolare a &lt;a href="https://www.facebook.com/crisgherrero?fref=ts" target="_blank"&gt;Cristina Gonzalez Herrero&lt;/a&gt; e &lt;a href="https://www.facebook.com/marjorie.diclemente?fref=ts" target="_blank"&gt;Marjorie di Clemente&lt;/a&gt; che si occupano del programma per l'Italia. Grazie a &lt;a href="https://www.facebook.com/MicrosoftItalia?fref=ts" target="_blank"&gt;Microsoft Italia&lt;/a&gt;, Grazie al nostro "sommo" lead &lt;a href="https://www.facebook.com/aleteglia?fref=ts" target="_blank"&gt;Alessandro Teglia&lt;/a&gt; :) e in definitiva grazie a &lt;a href="https://www.facebook.com/msdnitalia?fref=ts" target="_blank"&gt;Microsoft&lt;/a&gt;.&lt;/p&gt;&lt;p align="justify"&gt;E naturalmente Grazie e tutti quelli che ci seguono, nei nostri eventi, e che ci scrivono e leggono ogni giorno.&lt;/p&gt;</description>
      <link>http://blog.boschin.it/post/2014/07/01/MVP-da-8-anni-un-saluto-particolare-a-Silverlight.aspx</link>
      <comments>http://blog.boschin.it/post/2014/07/01/MVP-da-8-anni-un-saluto-particolare-a-Silverlight.aspx#comment</comments>
      <guid>http://blog.boschin.it/post.aspx?id=c08b19c1-7109-4f48-b96f-785aca06467d</guid>
      <pubDate>Tue, 01 Jul 2014 15:21:46 +0200</pubDate>
      <category>News</category>
      <dc:publisher>codeblock</dc:publisher>
      <pingback:server>http://blog.boschin.it/pingback.axd</pingback:server>
      <pingback:target>http://blog.boschin.it/post.aspx?id=c08b19c1-7109-4f48-b96f-785aca06467d</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blog.boschin.it/trackback.axd?id=c08b19c1-7109-4f48-b96f-785aca06467d</trackback:ping>
      <wfw:comment>http://blog.boschin.it/post/2014/07/01/MVP-da-8-anni-un-saluto-particolare-a-Silverlight.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.boschin.it/syndication.axd?post=c08b19c1-7109-4f48-b96f-785aca06467d</wfw:commentRss>
    </item>
    <item>
      <title>dotNetCampus 2014 - Materiale e slide</title>
      <description>&lt;p&gt;Qui trovate le slide e il link al download del codice che ho mostrato nel corso della presentazione di stamattina. Si tratta di un talk sulle Universal Apps, il nuovo template di Visual Studio 2013 che consente di scrivere applicazioni che girano sia su Windows Phone 8.1 che su Windows 8.1&lt;/p&gt; &lt;p align="center"&gt; &lt;iframe width="402" height="327" src="https://onedrive.live.com/embed?cid=A1FF1B2BC5119492&amp;amp;resid=A1FF1B2BC5119492%21422&amp;amp;authkey=AI-I5d6a6zp4jn4&amp;amp;em=2" frameborder="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;/p&gt;&lt;p&gt;Download: &lt;a title="http://1drv.ms/1mMHKEa" href="http://1drv.ms/1mMHKEa"&gt;http://1drv.ms/1mMHKEa&lt;/a&gt;&lt;/p&gt;</description>
      <link>http://blog.boschin.it/post/2014/05/10/dotNetCampus-2014-Materiale-e-slide.aspx</link>
      <comments>http://blog.boschin.it/post/2014/05/10/dotNetCampus-2014-Materiale-e-slide.aspx#comment</comments>
      <guid>http://blog.boschin.it/post.aspx?id=108aae25-1f7c-4858-81f8-89491d4228a8</guid>
      <pubDate>Sat, 10 May 2014 19:11:40 +0200</pubDate>
      <category>Mobile development</category>
      <category>XeDotNet</category>
      <dc:publisher>codeblock</dc:publisher>
      <pingback:server>http://blog.boschin.it/pingback.axd</pingback:server>
      <pingback:target>http://blog.boschin.it/post.aspx?id=108aae25-1f7c-4858-81f8-89491d4228a8</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blog.boschin.it/trackback.axd?id=108aae25-1f7c-4858-81f8-89491d4228a8</trackback:ping>
      <wfw:comment>http://blog.boschin.it/post/2014/05/10/dotNetCampus-2014-Materiale-e-slide.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.boschin.it/syndication.axd?post=108aae25-1f7c-4858-81f8-89491d4228a8</wfw:commentRss>
    </item>
    <item>
      <title>Presentazione alla Fiera del Radioamatore (Pordenone)</title>
      <description>&lt;p&gt;Sabato ho avuto il piacere di partecipare alla Fiera del Radioamatore, &lt;a href="http://www.radioamatorepordenone.it/iniziative/windowsspace/" target="_blank"&gt;nello spazio dedicato a Windows&lt;/a&gt;, e presentare una sessione sulle novità in ambito Windows Phone 8.1. Oggetto della presentazione sono state in particolare le novità anticipate durante la recente &lt;a href="http://www.buildwindows.com/" target="_blank"&gt;BUILD&lt;/a&gt; in cui è stato evidenziato come la piattaforma sta convergendo verso una quasi totale sovrapposizione con il Windows Runtime di Windows 8.1.&lt;/p&gt;
&lt;p style="text-align: center;"&gt;&lt;iframe width="427" height="356" src="http://www.slideshare.net/slideshow/embed_code/34030962" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowfullscreen="" style="border-width: 1px 1px 0px; border-style: solid; border-color: rgb(204, 204, 204); border-image: none; margin-bottom: 5px; max-width: 100%;"&gt; &lt;/iframe&gt; &lt;div style="margin-bottom: 5px;"&gt;Ne approfitto per ringraziare &lt;a href="http://www.innovazionefvg.net/" target="_blank"&gt;1nn0va&lt;/a&gt; nella persona di Marco Parenzan per l’ottima organizzazione dell’evento che ha visto tre giorni di sessioni articolate e gli amici di &lt;a href="http://www.dotnettoscana.org/" target="_blank"&gt;dotnettoscana&lt;/a&gt; che con noi hanno lavorato per preparare il materiale e le sessioni. &lt;/div&gt;&lt;div style="margin-bottom: 5px;"&gt;Speriamo che il prossimo anno si possa migliorare ancora questo appuntamento che merita una giusta attenzione dal pubblico, che sono certo arriverà sempre più numeroso se messo a conoscenza di questi argomenti innovativi.&lt;/div&gt;</description>
      <link>http://blog.boschin.it/post/2014/04/28/Presentazione-alla-Fiera-del-Radioamatore-(Pordenone).aspx</link>
      <comments>http://blog.boschin.it/post/2014/04/28/Presentazione-alla-Fiera-del-Radioamatore-(Pordenone).aspx#comment</comments>
      <guid>http://blog.boschin.it/post.aspx?id=53fa656a-61e8-425a-b847-1e3e1299e0d4</guid>
      <pubDate>Mon, 28 Apr 2014 16:27:48 +0200</pubDate>
      <category>Mobile development</category>
      <category>XeDotNet</category>
      <dc:publisher>codeblock</dc:publisher>
      <pingback:server>http://blog.boschin.it/pingback.axd</pingback:server>
      <pingback:target>http://blog.boschin.it/post.aspx?id=53fa656a-61e8-425a-b847-1e3e1299e0d4</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blog.boschin.it/trackback.axd?id=53fa656a-61e8-425a-b847-1e3e1299e0d4</trackback:ping>
      <wfw:comment>http://blog.boschin.it/post/2014/04/28/Presentazione-alla-Fiera-del-Radioamatore-(Pordenone).aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.boschin.it/syndication.axd?post=53fa656a-61e8-425a-b847-1e3e1299e0d4</wfw:commentRss>
    </item>
    <item>
      <title>One Day Mobile 2014 - Aperte le iscrizioni!</title>
      <description>&lt;p&gt;&lt;img width="179" height="97" title="logo_xedotnet" align="left" style="margin: 5px 15px 0px 0px; float: left; display: inline;" alt="logo_xedotnet" src="http://blog.boschin.it/image.axd?picture=logo_xedotnet.png"&gt;Ci siamo, dopo lunghi preparativi è finalmente pubblico il prossimo &lt;a href="http://oneday2014.xedotnet.org/" target="_blank"&gt;One Day Mobile 2014&lt;/a&gt;, un evento di una intera giornata, con ben 7 talk a proposito dello sviluppo mobile in ambito Microsoft. Sarà una ghiotta occasione di condividere esperienze pratiche e novità, in un ambito in cui la velocità di sviluppo è la chiave del successo. Avremo quindi sessioni ad ampio spettro, sia su Windows Phone e Windows 8, ma anche su argomenti cross-platform come Xamarin e PhoneGap.&amp;nbsp; &lt;/p&gt;&lt;p&gt;L'evento si terrà il prossimo 15 Maggio 2014 presso il Novotel Castellana di Venezia Mestre e vedrà la seguente agenda:&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Andrea Dottor: &lt;/strong&gt;&lt;a href="http://oneday2014.xedotnet.org/#pnlDottor"&gt;&lt;strong&gt;App connesse con ASP.NET Web API&lt;/strong&gt;&lt;/a&gt;&lt;p&gt;&lt;em&gt;Realizzare applicazioni connesse può fare la differenza in un mercato in pieno sviluppo.&lt;br&gt;Aggiornare i dati di un catalogo, caricare/leggere gli score di un gioco, interfacciarsi con applicazioni/database esistenti...tutti validi motivi per non perdervi questa sessione, dove vedremo come sviluppare servizi ASP.NET Web API che implementino l'OAuth2 authentication ed OData, e vedremo come poterli consumare da applicazioni Windows Phone, Windows Store App e Xamarin App.&lt;/em&gt;&lt;p&gt;&lt;strong&gt;Andrea Boschin: &lt;/strong&gt;&lt;a href="http://oneday2014.xedotnet.org/#pnlBoschin"&gt;&lt;strong&gt;Condivisione del codice tra W8 e WP8&lt;/strong&gt;&lt;/a&gt;&lt;p&gt;&lt;em&gt;Lo sviluppo mobile richiede sempre più spesso di fornire applicazioni che siano disponibili su diversi device, siano essi Windows Phone o Windows 8, sfruttando le peculiarità di ciascuno. Questo pone il problema di scrivere codice che possa in qualche modo essere riutilizzato su piattaforme che pur essendo simili hanno diversità marcate. In questa sessione vedremo alcune tecniche che possono aiutare nel migliorare la condivisione del codice quando si sviluppano applicazioni per questi sistemi.&lt;/em&gt;&lt;p&gt;&lt;strong&gt;Mirco Vanini: &lt;/strong&gt;&lt;a href="http://oneday2014.xedotnet.org/#pnlVanini"&gt;&lt;strong&gt;C++ in Windows Phone Apps&lt;/strong&gt;&lt;/a&gt;&lt;p&gt;&lt;em&gt;In questa sessione vedremmo una panoramica degli strumenti messi a disposizione per lo sviluppo nativo su Windows Phone 8. Verrà posta particolare attenzione al suo utilizzo per lo sviluppo di applicazioni ibride (C#/C++) che hanno la necessità di riutilizzare algoritmi sviluppati su piattaforme desktop.&lt;/em&gt;&lt;p&gt;&lt;strong&gt;Davide Vernole: &lt;/strong&gt;&lt;a href="http://oneday2014.xedotnet.org/#pnlVernole"&gt;&lt;strong&gt;Xamarin do it better!&lt;/strong&gt;&lt;/a&gt;&lt;p&gt;&lt;em&gt;Xamarin offre un’alternativa al “Write Once, Run Anywhere Approach” permettendo agli sviluppatori di realizzare applicazioni per le principali piattaforme mobile garantendo interfacce utente native, performance native e condivisione del codice tra le diverse piattaforme utilizzando C#, il .NET Framework e Visual Studio. Lo "Xamarin Unique Approach" è il filo conduttore di questa sessione in cui impareremo a conoscerlo meglio. Sfruttate conoscenze, potenzialità e sintassi di C# per ottenere il meglio dalle vostre applicazioni cross-platform; ovviamente con Xamarin!&lt;/em&gt;&lt;p&gt;&lt;strong&gt;Lorenzo Barbieri: &lt;/strong&gt;&lt;a href="http://oneday2014.xedotnet.org/#pnlBarbieri"&gt;&lt;strong&gt;Architettura WP8&lt;/strong&gt;&lt;/a&gt;&lt;p&gt;&lt;strong&gt;Davide Senatore: &lt;/strong&gt;&lt;a href="http://oneday2014.xedotnet.org/#pnlSenatore"&gt;&lt;strong&gt;PhoneGap &amp;amp; Cordova: building cross platform mobile applications&lt;/strong&gt;&lt;/a&gt;&lt;p&gt;&lt;em&gt;In questa sessione parleremo di sviluppo mobile cross platform con PhoneGap (AKA Cordova).&lt;br&gt;Prenderemo in esame tool, skill richieste per iniziare e best practice per non incorrere in spiacevoli scoperte.&lt;br&gt;Scopriremo come l'investimento in "poche" tecnologie standard possa abilitarci allo sviluppo su tutte le piattaforme mobile al momento disponibili.&lt;br&gt;Non ultimo, confronteremo anche pro, contro e costi di sviluppo di una soluzione di questo tipo con una soluzione nativa ed una soluzione web-based, prendendo in esame applicazioni realmente sviluppate.&lt;/em&gt;&lt;p&gt;&lt;strong&gt;Marco Dal Pino: &lt;/strong&gt;&lt;a href="http://oneday2014.xedotnet.org/#pnlDalPino"&gt;&lt;strong&gt;Sviluppare e pubblicare applicazioni Gestionali (LOB) con Windows Phone&lt;/strong&gt;&lt;/a&gt;&lt;p&gt;&lt;em&gt;La piattaforma Windows Phone ha raggiunto una buona diffusione di mercato e sempre più si sente la necessità di implementare funzionalità gestionali utilizzando i device WP8. Inoltre la prossima versione di Windows Embedded 8 Handheld sarà basata proprio su Windows Phone, introducendo nuovi device industriali rugged con caratteristiche di lettura barcode o Carte magnetiche; il tutto già compreso nativamente nelle API di Windows Phone. Vediamo come affrontare lo sviluppo di queste applicazioni, quali tipici problemi vanno affrontati e come distribuire il prodotto ai nostri clienti.&lt;/em&gt;&lt;p&gt;Inutile dire che vi aspettiamo numerosi. Non aspettate a riservare la vostra poltrona perchè i posti sono davvero limitati.&lt;p&gt;&lt;a title="https://communitydevtool.microsoft.it/public/frmRegister.aspx?eventid=1203PSOSREGTFTMLKGCQHT" href="https://communitydevtool.microsoft.it/public/frmRegister.aspx?eventid=1203PSOSREGTFTMLKGCQHT"&gt;https://communitydevtool.microsoft.it/public/frmRegister.aspx?eventid=1203PSOSREGTFTMLKGCQHT&lt;/a&gt;</description>
      <link>http://blog.boschin.it/post/2014/04/01/One-Day-Mobile-2014-Aperte-le-iscrizioni!.aspx</link>
      <comments>http://blog.boschin.it/post/2014/04/01/One-Day-Mobile-2014-Aperte-le-iscrizioni!.aspx#comment</comments>
      <guid>http://blog.boschin.it/post.aspx?id=e4099780-9cc6-4e8c-ac4f-78e14e5db911</guid>
      <pubDate>Tue, 01 Apr 2014 12:48:23 +0200</pubDate>
      <category>XAML</category>
      <category>Mobile development</category>
      <category>XeDotNet</category>
      <dc:publisher>codeblock</dc:publisher>
      <pingback:server>http://blog.boschin.it/pingback.axd</pingback:server>
      <pingback:target>http://blog.boschin.it/post.aspx?id=e4099780-9cc6-4e8c-ac4f-78e14e5db911</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blog.boschin.it/trackback.axd?id=e4099780-9cc6-4e8c-ac4f-78e14e5db911</trackback:ping>
      <wfw:comment>http://blog.boschin.it/post/2014/04/01/One-Day-Mobile-2014-Aperte-le-iscrizioni!.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.boschin.it/syndication.axd?post=e4099780-9cc6-4e8c-ac4f-78e14e5db911</wfw:commentRss>
    </item>
    <item>
      <title>Usare il Behaviors SDK per Windows 8.1</title>
      <description>&lt;p align="justify"&gt;Rilasciati all'interno di Blend 3.0, nel 2009, come un mero strumento a supporto dei designer che li poteva usare per inserire sulla superficie di Blend non solo componenti di interfaccia, ma anche dei "frammenti di logica", i behavior hanno immediatamente assunto un ruolo primario nello sviluppo di applicazioni, grazie alla loro capacità di favorire la netta separazione tra logica di business e interfaccia utente. Questa capacità è rappresentata dal fatto che essi sono in grado di racchiudere e isolare porzioni di codice - con accesso diretto ai componenti di interfaccia ma pilotati dalla logica di business - inseribili facilmente direttamente nello XAML senza che sia necessaria alcuna logica accessoria. &lt;/p&gt;&lt;p align="justify"&gt;Nati in particolare all'interno di Silverlight, essi sono immediatamente diventati parte del kit di sopravvivenza dello sviluppatore, specialmente di quello che intendeva implementare il pattern MVVM con facilità ed in seguito hanno visto il porting verso Windows Phone e finalmente anche in WinRT, con il rilascio dell'ultima versione 8.1. Conoscerli e usarli opportunamente può davvero far risparmiare un sacco di tempo. Vediamo come.&lt;/p&gt;&lt;h4 align="justify"&gt;Usare i behavior esistenti&lt;/h4&gt;&lt;p align="justify"&gt;Il primo passo nell'utilizzo dei behavior è quello di inserirli nel progetto di Visual Studio e cominciare ad usare quelli esistenti. In effetti la libreria - denominata "Behaviors SDK (XAML)" porta con se una serie di classi base da cui è possibile fare ereditare i propri behavior ma anche un set abbastanza nutrito di componenti già realizzati e pronti all'uso. Essi hanno la caratteristica di essere parametrizzabili e generici così da essere fortemente riutilizzabili e quindi sono anche una buona scuola per quando dovremo realizzarne di nostri&lt;/p&gt;&lt;p align="justify"&gt;&lt;img width="559" height="235" title="untitled" align="left" style="margin: 0px 15px 0px 0px; float: left; display: inline;" alt="untitled" src="http://blog.boschin.it/image.axd?picture=untitled.png"&gt;Per inserirli nel progetto con Visual Studio 2013 è sufficiente selezionarli dalla libreria delle estensioni (vedi a lato) operando come se si dovesse aggiungere una referenza al progetto.&lt;/p&gt;&lt;p align="justify"&gt;I Behavior sono una libreria di componenti nativi e managed, e come tali possono essere usati sia in progetti C#/VB.NET sia in C++. Non richiedono particolari cautele come avviene per altri tipi di componenti perciò, una volta inserita la referenza all'SDK sarà immediatamente possibile iniziare ad usarli. Non c'è dubbio che il modo migliore è quello di usare Blend, al cui interno vengono visualizzati nella scheda degli Assets, come dei piccoli componenti che possono essere trascinati sulla superficie del designer e agganciati ai vari elementi. Una volta collegati è possibile modificarne le proprietà usando la consueta finestra di blend. &lt;/p&gt;&lt;p align="justify"&gt;Dal punto di vista dello sviluppatore un bahavior appare ne più ne meno che come una attached property che può essere valorizzata su qualunque elemento del DOM. La proprietà è dichiarata nel namespace "Microsoft.Xaml.Interactivity" e una volta inserito nel codice xaml essa appare come una collection:&lt;/p&gt;&lt;div align="justify"&gt;&lt;div id="codeSnippetWrapper" style="margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; border-image: none; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 200px; background-color: rgb(244, 244, 244);"&gt;&lt;div id="codeSnippet" style="padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum1" style="color: rgb(96, 96, 96);"&gt;   1:&lt;/span&gt; &amp;lt;Page&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum2" style="color: rgb(96, 96, 96);"&gt;   2:&lt;/span&gt;     x:Class=&lt;span style="color: rgb(0, 96, 128);"&gt;"App1.MainPage"&lt;/span&gt; mc:Ignorable=&lt;span style="color: rgb(0, 96, 128);"&gt;"d"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum3" style="color: rgb(96, 96, 96);"&gt;   3:&lt;/span&gt;     xmlns=&lt;span style="color: rgb(0, 96, 128);"&gt;"http://schemas.microsoft.com/winfx/2006/xaml/presentation"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum4" style="color: rgb(96, 96, 96);"&gt;   4:&lt;/span&gt;     xmlns:x=&lt;span style="color: rgb(0, 96, 128);"&gt;"http://schemas.microsoft.com/winfx/2006/xaml"&lt;/span&gt;    &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum5" style="color: rgb(96, 96, 96);"&gt;   5:&lt;/span&gt;     xmlns:d=&lt;span style="color: rgb(0, 96, 128);"&gt;"http://schemas.microsoft.com/expression/blend/2008"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum6" style="color: rgb(96, 96, 96);"&gt;   6:&lt;/span&gt;     xmlns:mc=&lt;span style="color: rgb(0, 96, 128);"&gt;"http://schemas.openxmlformats.org/markup-compatibility/2006"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum7" style="color: rgb(96, 96, 96);"&gt;   7:&lt;/span&gt;     xmlns:i=&lt;span style="color: rgb(0, 96, 128);"&gt;"using:Microsoft.Xaml.Interactivity"&lt;/span&gt;&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum8" style="color: rgb(96, 96, 96);"&gt;   8:&lt;/span&gt;     &amp;lt;Grid Background=&lt;span style="color: rgb(0, 96, 128);"&gt;"{ThemeResource ApplicationPageBackgroundThemeBrush}"&lt;/span&gt;&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum9" style="color: rgb(96, 96, 96);"&gt;   9:&lt;/span&gt;         &amp;lt;Rectangle x:Name=&lt;span style="color: rgb(0, 96, 128);"&gt;"rect"&lt;/span&gt; Fill=&lt;span style="color: rgb(0, 96, 128);"&gt;"Yellow"&lt;/span&gt; Width=&lt;span style="color: rgb(0, 96, 128);"&gt;"100"&lt;/span&gt; Height=&lt;span style="color: rgb(0, 96, 128);"&gt;"100"&lt;/span&gt;&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum10" style="color: rgb(96, 96, 96);"&gt;  10:&lt;/span&gt;             &amp;lt;i:Interaction.Behaviors&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum11" style="color: rgb(96, 96, 96);"&gt;  11:&lt;/span&gt;                 &amp;lt;!-- aggiungere qui &lt;span style="color: rgb(0, 0, 255);"&gt;in&lt;/span&gt; behaviors --&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum12" style="color: rgb(96, 96, 96);"&gt;  12:&lt;/span&gt;             &amp;lt;/i:Interaction.Behaviors&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum13" style="color: rgb(96, 96, 96);"&gt;  13:&lt;/span&gt;         &amp;lt;/Rectangle&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum14" style="color: rgb(96, 96, 96);"&gt;  14:&lt;/span&gt;     &amp;lt;/Grid&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum15" style="color: rgb(96, 96, 96);"&gt;  15:&lt;/span&gt; &amp;lt;/Page&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p align="justify"&gt;A questo punto va referenziato un ulteriore namespace, chiamiamolo per brevità "core", il quale contiene i behavior predefiniti di cui parlavo poco fa. In particolare essi sono "EventTriggerBehavior" e "DataTriggerBehavior". I loro nomi dovrebbero essere autoesplicativi ma per completezza diciamo che il primo lo si può agganciare ad un singolo evento di un elemento mentre il secondo fa riferimento al un valore di una proprietà.&lt;/p&gt;&lt;p align="justify"&gt;Poniamo ad esempio di voler fare in modo che il rettangolo giallo dell'esempio precedente debba diventare rosso quando cliccato. Potremmo semplicemente aggiungere il seguente snippet all'interno della collezione dei behaviors:&lt;/p&gt;&lt;div align="justify"&gt;&lt;div id="codeSnippetWrapper" style="margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; border-image: none; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 200px; background-color: rgb(244, 244, 244);"&gt;&lt;div id="codeSnippet" style="padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum1" style="color: rgb(96, 96, 96);"&gt;   1:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;core:EventTriggerBehavior&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;EventName&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="PointerPressed"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum2" style="color: rgb(96, 96, 96);"&gt;   2:&lt;/span&gt;     &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;core:ChangePropertyAction&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;PropertyName&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="Fill"&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;Value&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="Red"&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum3" style="color: rgb(96, 96, 96);"&gt;   3:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;core:EventTriggerBehavior&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p align="justify"&gt;In buona sostanza, stiamo dicendo che al verificarsi di un evento PointerPressed venga eseguita una "action" che cambia il valore di una proprietà. Le action sono un secondo livello di componenti predefiniti di cui dirò tra poco. Questa action in particolare si occupa di variare la proprietà "Fill" impostandola a "Red". Mandando in esecuzione l'esempio si vedrà che l'effetto ottenuto è proprio quello desiderato, ma anche che, a differenza di quanto avviene per il VisualStateManager, il sistema non tiene traccia dello stato originario e quindi per riportarlo allo stato precedente dovremmo aggiungere l'operazione inversa:&lt;/p&gt;&lt;div align="justify"&gt;&lt;div id="codeSnippetWrapper" style="margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; border-image: none; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 200px; background-color: rgb(244, 244, 244);"&gt;&lt;div id="codeSnippet" style="padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum1" style="color: rgb(96, 96, 96);"&gt;   1:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Rectangle&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;x:Name&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="rect"&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;Fill&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="Yellow"&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;Width&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="100"&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;Height&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="100"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum2" style="color: rgb(96, 96, 96);"&gt;   2:&lt;/span&gt;     &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;i:Interaction.Behaviors&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum3" style="color: rgb(96, 96, 96);"&gt;   3:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;core:EventTriggerBehavior&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;EventName&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="PointerPressed"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum4" style="color: rgb(96, 96, 96);"&gt;   4:&lt;/span&gt;             &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;core:ChangePropertyAction&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;PropertyName&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="Fill"&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;Value&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="Red"&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum5" style="color: rgb(96, 96, 96);"&gt;   5:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;core:EventTriggerBehavior&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum6" style="color: rgb(96, 96, 96);"&gt;   6:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;core:EventTriggerBehavior&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;EventName&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="PointerReleased"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum7" style="color: rgb(96, 96, 96);"&gt;   7:&lt;/span&gt;             &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;core:ChangePropertyAction&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;PropertyName&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="Fill"&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;Value&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="Yellow"&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum8" style="color: rgb(96, 96, 96);"&gt;   8:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;core:EventTriggerBehavior&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum9" style="color: rgb(96, 96, 96);"&gt;   9:&lt;/span&gt;     &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;i:Interaction.Behaviors&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum10" style="color: rgb(96, 96, 96);"&gt;  10:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Rectangle&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p align="justify"&gt;Le action che si possono applicare sono molteplici e coprono un vasto numero di necessità:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p align="justify"&gt;&lt;strong&gt;CallMethodAction&lt;/strong&gt;: L'action richiama un metodo dell'oggetto cui si riferisce. Assomiglia molto al collegamento di un EventHandler nel codebehind.&lt;/p&gt;&lt;li&gt;&lt;p align="justify"&gt;&lt;strong&gt;ControlStoryBoardAction&lt;/strong&gt;: Consente di collegare una o più storyboard e avviarle, così come si fa con i trigger di WPF. &lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;p align="justify"&gt;&lt;strong&gt;GoToStateAction&lt;/strong&gt;: Consente di attivare uno stato del VisualStateManager. &lt;/p&gt;&lt;li&gt;&lt;p align="justify"&gt;&lt;strong&gt;InvokeCommandAction&lt;/strong&gt;: Uno delle action più utilizzate, in ambito MVVM consente di attivare comandi in risposta a qualunque evento se usato in concomitanza con EventTriggerBehavior.&lt;/p&gt;&lt;li&gt;&lt;p align="justify"&gt;&lt;strong&gt;NavigateToPage&lt;/strong&gt;: Attiva la navigazione verso una pagina dell'applicazione&lt;/p&gt;&lt;li&gt;&lt;p align="justify"&gt;&lt;strong&gt;PlaySoundAction&lt;/strong&gt;: Esegue un suono,&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p align="justify"&gt;Una nota a parte la merita sicuramente l'InvokeCommandAction, la cui esistenza è indispensabile in scenari MVVM. Esso infatti sopperisce alla mancanza dei consueti "&lt;em&gt;Command&lt;/em&gt;" e "&lt;em&gt;CommandParameter&lt;/em&gt;" relativi la maggioranza degli eventi dei controlli XAML. Come in Silverlight, anche nelle Windows Store apps solamente ButtonBase implementa queste proprietà. E qui viene in aiuto questa action che associata ad un opportuno EventTriggerBehavior è in grado di riportare ad un Command del ViewModel qualunque iterazione dell'utente, aprendo numerose strade. &lt;/p&gt;&lt;p align="justify"&gt;L'uso del EventTriggerBehavior è sicuramente il più consueto ma non va dimenticata la presenza del meno intuitivo DataTriggerBehavior. Esso ha lo scopo di legare l'esecuzione di una o più action al cambiare del valore di una proprietà. Pensiamo ad esempio ad avere una proprietà che indica una soglia di pericolosità, aggiornata in tempo reale (magari via SignalR). L'utilizzo di un DataTriggerBehavior è specifico per questi casi e ci consente di attivare una action quando il valore va oltre una determinata soglia:&lt;/p&gt;&lt;div align="justify"&gt;&lt;div id="codeSnippetWrapper" style="margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; border-image: none; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 200px; background-color: rgb(244, 244, 244);"&gt;&lt;div id="codeSnippet" style="padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum1" style="color: rgb(96, 96, 96);"&gt;   1:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Rectangle&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;Background&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="Green"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum2" style="color: rgb(96, 96, 96);"&gt;   2:&lt;/span&gt;     &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Interactivity:Interaction.Behaviors&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum3" style="color: rgb(96, 96, 96);"&gt;   3:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Core:DataTriggerBehavior&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;Binding&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="{Binding Severity}"&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;ComparisonCondition&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="GreaterThanOrEqual"&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;Value&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="3"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum4" style="color: rgb(96, 96, 96);"&gt;   4:&lt;/span&gt;             &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Core:ChangePropertyAction&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;PropertyName&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="Background"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum5" style="color: rgb(96, 96, 96);"&gt;   5:&lt;/span&gt;                &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Core:ChangePropertyAction.Value&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum6" style="color: rgb(96, 96, 96);"&gt;   6:&lt;/span&gt;                    &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;SolidColorBrush&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;Red&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;SolidColorBrush&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum7" style="color: rgb(96, 96, 96);"&gt;   7:&lt;/span&gt;                &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Core:ChangePropertyAction.Value&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum8" style="color: rgb(96, 96, 96);"&gt;   8:&lt;/span&gt;             &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Core:ChangePropertyAction&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum9" style="color: rgb(96, 96, 96);"&gt;   9:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Core:DataTriggerBehavior&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum10" style="color: rgb(96, 96, 96);"&gt;  10:&lt;/span&gt;     &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Interactivity:Interaction.Behaviors&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum11" style="color: rgb(96, 96, 96);"&gt;  11:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Rectangle&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p align="justify"&gt;Il codice qui sopra usa una condizione, indicata dalla proprietà “Comparison Condition” per definire quale sia il valore soglia che converte. il colore da Verde a Rosso. &lt;/p&gt;&lt;p align="justify"&gt;I behavior come abbiamo visto sono uno strumento davvero insostituibile in molti casi. Ancor di più se, come vedremo nel prossimo articolo ne creiamo di nostri, con proprietà che ne parametrizzano l’azione.&lt;/p&gt;&lt;p align="justify"&gt;&lt;/p&gt;</description>
      <link>http://blog.boschin.it/post/2014/03/19/Usare-il-Behaviors-SDK-per-Windows-81.aspx</link>
      <comments>http://blog.boschin.it/post/2014/03/19/Usare-il-Behaviors-SDK-per-Windows-81.aspx#comment</comments>
      <guid>http://blog.boschin.it/post.aspx?id=9c385941-1115-4350-845e-a984b34c2663</guid>
      <pubDate>Wed, 19 Mar 2014 15:00:49 +0200</pubDate>
      <dc:publisher>codeblock</dc:publisher>
      <pingback:server>http://blog.boschin.it/pingback.axd</pingback:server>
      <pingback:target>http://blog.boschin.it/post.aspx?id=9c385941-1115-4350-845e-a984b34c2663</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blog.boschin.it/trackback.axd?id=9c385941-1115-4350-845e-a984b34c2663</trackback:ping>
      <wfw:comment>http://blog.boschin.it/post/2014/03/19/Usare-il-Behaviors-SDK-per-Windows-81.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.boschin.it/syndication.axd?post=9c385941-1115-4350-845e-a984b34c2663</wfw:commentRss>
    </item>
    <item>
      <title>Community Lab: Typescript in the real world</title>
      <description>&lt;p align="justify"&gt;Ormai più di una settimana ho tenuto il lab su &lt;strong&gt;Typescript&lt;/strong&gt; su cui da tempo stavo lavorando. Vorrei ringraziare ancora una volta tutti quelli che hanno partecipato, per la solerzia con cui hanno seguito gli esempi e hanno provato ad implementare il codice che ho preparato. Ogni giorno che passa sono sempre più convinto che Typescript sia uno strumento insostituibile e ho trovato molte conferme in questo lab vedendo le persone progredire in fretta, mano a mano che prendevano confidenza con il linguaggio e si rendevano conto delle enormi potenzialità e tutela nei confronti del pure e semplice Javascript.&lt;/p&gt;&lt;p align="center" style="align: center;"&gt;
&lt;iframe width="425" height="355" src="http://www.slideshare.net/slideshow/embed_code/32119416?rel=0" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border-width: 1px 1px 0px; border-style: solid; border-color: rgb(204, 204, 204); margin-bottom: 5px; max-width: 100%;" allowfullscreen=""&gt; &lt;/iframe&gt;&lt;/p&gt;&lt;p align="justify"&gt;Ho pubblicato tutto il materiale nel repository di XeDotNet perciò potete scaricare tutto il necessario per provare voi stessi l'esempio. In particolare seguire il documento PDF - che ho cercato di rendere il più accurato ed autonomo possibile - nel quale troverete lo step-by-step e scaricate il progetto di base da cui partire. Se poi siete pigri troverete anche l'implementazione di tutti i vari passaggi.&lt;/p&gt;&lt;p align="justify"&gt;Ecco il link al download: &lt;a href="http://1drv.ms/1flJCDT"&gt;http://1drv.ms/1flJCDT&lt;/a&gt;&lt;/p&gt;&lt;p align="justify"&gt;Al solito se avete problemi non esitate a contattarmi con la &lt;a href="http://blog.boschin.it/contact.aspx" target="_blank"&gt;form del weblog&lt;/a&gt;.&lt;/p&gt;</description>
      <link>http://blog.boschin.it/post/2014/03/10/Community-Lab-Typescript-in-the-real-world.aspx</link>
      <comments>http://blog.boschin.it/post/2014/03/10/Community-Lab-Typescript-in-the-real-world.aspx#comment</comments>
      <guid>http://blog.boschin.it/post.aspx?id=01dd913d-58ca-46d0-b6eb-bfab691ccef0</guid>
      <pubDate>Mon, 10 Mar 2014 14:36:50 +0200</pubDate>
      <category>Scripting</category>
      <category>XeDotNet</category>
      <category>Web Development</category>
      <dc:publisher>codeblock</dc:publisher>
      <pingback:server>http://blog.boschin.it/pingback.axd</pingback:server>
      <pingback:target>http://blog.boschin.it/post.aspx?id=01dd913d-58ca-46d0-b6eb-bfab691ccef0</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blog.boschin.it/trackback.axd?id=01dd913d-58ca-46d0-b6eb-bfab691ccef0</trackback:ping>
      <wfw:comment>http://blog.boschin.it/post/2014/03/10/Community-Lab-Typescript-in-the-real-world.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.boschin.it/syndication.axd?post=01dd913d-58ca-46d0-b6eb-bfab691ccef0</wfw:commentRss>
    </item>
    <item>
      <title>Typescript: il bootstrap dell’applicazione</title>
      <description>&lt;p align="justify"&gt;Di fronte alla vostra prima applicazione con Typescript, vi sarete certamente chiesti quale sia il modo migliore per dare ad essa il primo avvio. Può sembrare una domanda banale ma, essa cela delle considerazioni che dovrebbero essere tenute nella dovuta attenzione. Prima di tutto, è certamente vero che del codice Javascript è anche del codice Typescript perfettamente valido ma, se ci lasciamo prendere la mano e iniziamo a scrivere così come eravamo abituati in precedenza rischiamo di perdere i benefici che Typescript può regalarci. &lt;/p&gt;&lt;p align="justify"&gt;Primo fra tutti, sicuramente il fatto che Typescript accentua fortemente le caratteristiche object oriented e di conseguenza ci dovremmo attendere di rappresentare l’applicazione – intendendo con essa una singola pagina al cui interno gira il codice che le da vita – con una sola classe, che detenga i riferimenti ai vari elementi e naturalmente lo stato. Un po’ come avviene in una applicazione asp.net, in cui una sigola pagina è rappresentata dal suo “codebehind”. &lt;/p&gt;&lt;p align="justify"&gt;Per avviare una applicazione del genere dovremmo di conseguenza creare al più presto l’istanza della classe e dare ad essa il controllo, lasciando che gestisca il ciclo di vita della pagina fino alla sua naturale conclusione. Per questo tipo di avvio sono abituato ad utilizzare un pattern ormai abbstanza consolidato. Creaimo una classe base per la pagina, in un namespace comune che i usialmente chiamo “sys”:&lt;/p&gt;&lt;div align="justify"&gt;&lt;div id="codeSnippetWrapper" style='margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; border-image: none; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: "Courier New", courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 200px; background-color: rgb(244, 244, 244);'&gt;&lt;div id="codeSnippet" style='padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: "Courier New", courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);'&gt;
&lt;pre style='margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: "Courier New", courier, monospace; font-size: 8pt; direction: ltr; background-color: white;'&gt;&lt;span id="lnum1" style="color: rgb(96, 96, 96);"&gt;   1:&lt;/span&gt; module sys&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style='margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: "Courier New", courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);'&gt;&lt;span id="lnum2" style="color: rgb(96, 96, 96);"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style='margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: "Courier New", courier, monospace; font-size: 8pt; direction: ltr; background-color: white;'&gt;&lt;span id="lnum3" style="color: rgb(96, 96, 96);"&gt;   3:&lt;/span&gt;     export &lt;span style="color: rgb(0, 0, 255);"&gt;class&lt;/span&gt; Page&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style='margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: "Courier New", courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);'&gt;&lt;span id="lnum4" style="color: rgb(96, 96, 96);"&gt;   4:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style='margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: "Courier New", courier, monospace; font-size: 8pt; direction: ltr; background-color: white;'&gt;&lt;span id="lnum5" style="color: rgb(96, 96, 96);"&gt;   5:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt; run(page: Page): &lt;span style="color: rgb(0, 0, 255);"&gt;void&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style='margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: "Courier New", courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);'&gt;&lt;span id="lnum6" style="color: rgb(96, 96, 96);"&gt;   6:&lt;/span&gt;         {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style='margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: "Courier New", courier, monospace; font-size: 8pt; direction: ltr; background-color: white;'&gt;&lt;span id="lnum7" style="color: rgb(96, 96, 96);"&gt;   7:&lt;/span&gt;             $(() =&amp;gt; page.onLoad());&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style='margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: "Courier New", courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);'&gt;&lt;span id="lnum8" style="color: rgb(96, 96, 96);"&gt;   8:&lt;/span&gt;         }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style='margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: "Courier New", courier, monospace; font-size: 8pt; direction: ltr; background-color: white;'&gt;&lt;span id="lnum9" style="color: rgb(96, 96, 96);"&gt;   9:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style='margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: "Courier New", courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);'&gt;&lt;span id="lnum10" style="color: rgb(96, 96, 96);"&gt;  10:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; onLoad(): &lt;span style="color: rgb(0, 0, 255);"&gt;void&lt;/span&gt; { }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style='margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: "Courier New", courier, monospace; font-size: 8pt; direction: ltr; background-color: white;'&gt;&lt;span id="lnum11" style="color: rgb(96, 96, 96);"&gt;  11:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style='margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: "Courier New", courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);'&gt;&lt;span id="lnum12" style="color: rgb(96, 96, 96);"&gt;  12:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p align="justify"&gt;Come di può vedere , la classe consta di un metodo statico “run” e di un metodo virtual “onLoad”. Attenzione che in Typescript il concetto di virtuale non esiste ma in realtà qualunque metodo pubblico è anche virtual. Diamo per assodato che sia presente jQuery e all’interno del metodo run usiamo l’evento “readystatechanged” con la classica sintatti $(…) dove all’interno delle parentesi va indicata una funzione eseguita all’occorrenza di questo evento. A questo punto possiamo ereditare il codebehind concreto della pagina da sys.Page:&lt;/p&gt;&lt;div align="justify"&gt;&lt;div id="codeSnippetWrapper" style='margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; border-image: none; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: "Courier New", courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 200px; background-color: rgb(244, 244, 244);'&gt;&lt;div id="codeSnippet" style='padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: "Courier New", courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);'&gt;
&lt;pre style='margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: "Courier New", courier, monospace; font-size: 8pt; direction: ltr; background-color: white;'&gt;&lt;span id="lnum1" style="color: rgb(96, 96, 96);"&gt;   1:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;class&lt;/span&gt; DefaultPage extends sys.Page&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style='margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: "Courier New", courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);'&gt;&lt;span id="lnum2" style="color: rgb(96, 96, 96);"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style='margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: "Courier New", courier, monospace; font-size: 8pt; direction: ltr; background-color: white;'&gt;&lt;span id="lnum3" style="color: rgb(96, 96, 96);"&gt;   3:&lt;/span&gt;     constructor()&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style='margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: "Courier New", courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);'&gt;&lt;span id="lnum4" style="color: rgb(96, 96, 96);"&gt;   4:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style='margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: "Courier New", courier, monospace; font-size: 8pt; direction: ltr; background-color: white;'&gt;&lt;span id="lnum5" style="color: rgb(96, 96, 96);"&gt;   5:&lt;/span&gt;         super();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style='margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: "Courier New", courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);'&gt;&lt;span id="lnum6" style="color: rgb(96, 96, 96);"&gt;   6:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style='margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: "Courier New", courier, monospace; font-size: 8pt; direction: ltr; background-color: white;'&gt;&lt;span id="lnum7" style="color: rgb(96, 96, 96);"&gt;   7:&lt;/span&gt;         &lt;span style="color: rgb(0, 128, 0);"&gt;// inizializazione della pagina&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style='margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: "Courier New", courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);'&gt;&lt;span id="lnum8" style="color: rgb(96, 96, 96);"&gt;   8:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style='margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: "Courier New", courier, monospace; font-size: 8pt; direction: ltr; background-color: white;'&gt;&lt;span id="lnum9" style="color: rgb(96, 96, 96);"&gt;   9:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style='margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: "Courier New", courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);'&gt;&lt;span id="lnum10" style="color: rgb(96, 96, 96);"&gt;  10:&lt;/span&gt;     &lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; onLoad(): &lt;span style="color: rgb(0, 0, 255);"&gt;void&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style='margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: "Courier New", courier, monospace; font-size: 8pt; direction: ltr; background-color: white;'&gt;&lt;span id="lnum11" style="color: rgb(96, 96, 96);"&gt;  11:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style='margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: "Courier New", courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);'&gt;&lt;span id="lnum12" style="color: rgb(96, 96, 96);"&gt;  12:&lt;/span&gt;         &lt;span style="color: rgb(0, 128, 0);"&gt;// iniziamo qui il ciclo di vita&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style='margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: "Courier New", courier, monospace; font-size: 8pt; direction: ltr; background-color: white;'&gt;&lt;span id="lnum13" style="color: rgb(96, 96, 96);"&gt;  13:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style='margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: "Courier New", courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);'&gt;&lt;span id="lnum14" style="color: rgb(96, 96, 96);"&gt;  14:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p align="justify"&gt;In particolare nella classe viene riferinito il metodo onLoad che sarà chiamato automaticamente quando viene eseguito il “readystatechanged”. Potremmo così nel costruttore inizializzare i campi della classe, i valori di default, e così via mentre nell’onLoad potremmo cercare gli elementi della pagina, ed avviare eventuali operazioni di download da un servizio rest. L’avvio della pagina avviene per mezzo di una singola riga, posta usualmente in coda alla pagina o in un file ts:&lt;/p&gt;&lt;div align="justify"&gt;&lt;div id="codeSnippetWrapper" style='margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; border-image: none; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: "Courier New", courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 200px; background-color: rgb(244, 244, 244);'&gt;&lt;div id="codeSnippet" style='padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: "Courier New", courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);'&gt;
&lt;pre style='margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: "Courier New", courier, monospace; font-size: 8pt; direction: ltr; background-color: white;'&gt;&lt;span id="lnum1" style="color: rgb(96, 96, 96);"&gt;   1:&lt;/span&gt; sys.Page.run(&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; DefaultPage());&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p align="justify"&gt;La singola riga crea l’istanza della classe DefaultPage e poi vi da avvio con il metodo statico “run”. Niente di più semplice e pulito. Per estensione, se identificate all’interno della pagina diverse aree, a ciascuna delle quali risponda una classe Typescript che ne incapsuli il funzionamento, potete tranquillamente usare la stessa tecnica e ciascuna classe sarà avviata separatamente con il medesimo ciclo.&lt;/p&gt;&lt;p align="justify"&gt;Di questo e di altro parleremo in occasione del Community LAB che si terrà il prossimo 28/2/2014 a Mestre. Se vi unite a me con il vostro PC sarà mia cura guidarvi nello sviluppo con questo semplice ma “liberatorio” linguaggio. &lt;/p&gt;&lt;p align="justify"&gt;Iscrizioni e dettagli: &lt;a title="20140228" href="http://www.xedotnet.org/Home/Meeting/20140228"&gt;http://www.xedotnet.org/Home/Meeting/20140228&lt;/a&gt;&lt;/p&gt;&lt;p align="justify"&gt;&lt;br&gt;&lt;/p&gt;&lt;p align="justify"&gt;&lt;/p&gt;</description>
      <link>http://blog.boschin.it/post/2014/02/11/Typescript-il-bootstrap-dellapplicazione.aspx</link>
      <comments>http://blog.boschin.it/post/2014/02/11/Typescript-il-bootstrap-dellapplicazione.aspx#comment</comments>
      <guid>http://blog.boschin.it/post.aspx?id=66ead385-5926-4f1c-826e-223c91925d93</guid>
      <pubDate>Tue, 11 Feb 2014 08:00:00 +0200</pubDate>
      <category>Scripting</category>
      <dc:publisher>codeblock</dc:publisher>
      <pingback:server>http://blog.boschin.it/pingback.axd</pingback:server>
      <pingback:target>http://blog.boschin.it/post.aspx?id=66ead385-5926-4f1c-826e-223c91925d93</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blog.boschin.it/trackback.axd?id=66ead385-5926-4f1c-826e-223c91925d93</trackback:ping>
      <wfw:comment>http://blog.boschin.it/post/2014/02/11/Typescript-il-bootstrap-dellapplicazione.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.boschin.it/syndication.axd?post=66ead385-5926-4f1c-826e-223c91925d93</wfw:commentRss>
    </item>
    <item>
      <title>Typescript: Aperte le iscrizioni al LAB</title>
      <description>&lt;p&gt;&lt;a href="http://blog.boschin.it/image.axd?picture=typescript-banner.png"&gt;&lt;img width="457" height="239" title="typescript-banner" align="left" class="img-responsive" style="float: left; display: inline;" alt="typescript-banner" src="http://blog.boschin.it/image.axd?picture=typescript-banner_thumb.png"&gt;&lt;/a&gt;Giusto quest’oggi si sono aperte le iscrizioni al LAB su Typescript che si terrà il prossimo 28 Febbraio a Mestre – Venezia. Nell’occasione avremo modo di affrontare questo interessante linguaggio che ha il non trascurabile scopo di semlificare lo sviluppo client side all’interno dei browser. Typescript infatti gode infatti di un compilatore (che curiosamente è scritto esso stesso in Typescript) che è in grado di convertire il codice in Javascript puro, capace di essere eseguito in qualunque browser, senza necessità di un plugin addizionale. Si tratta in effetti della nemesi, regalandoci un linguaggio di alto livello – anche se mantenendo degli interessanti risvolti semantici che lo rendono flessibile come Javascript – dotato di un set di tipi verificato a compile-time. &lt;/p&gt;&lt;p&gt;Chi desiderasse approfondire lo può fare nei seguenti post:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://blog.boschin.it/post/2013/03/07/Typescript-Javascript-per-applicazioni-vere.aspx"&gt;Typescript: Javascript per applicazioni reali.&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.boschin.it/post/2013/03/18/Typescript-Static-type-checking.aspx"&gt;Typescript: Static type checking&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.boschin.it/post/2013/04/03/Typescript-organizzare-il-codice-con-interfacce-classi-e-moduli.aspx"&gt;Typescript: organizzare il codice con interfacce, classi e moduli&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.boschin.it/post/2013/05/17/Typescript-dichiarare-variabili-parametri-classi-e-interfacce.aspx"&gt;Typescript: dichiarare variabili, parametri, classi e interfacce&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.boschin.it/post/2013/06/07/Typescript-e-le-librerie-di-terze-parti.aspx"&gt;Typescript: e le librerie di terze parti&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Chi di voi invece preferisse provare direttamente un esempio, può raggiungermi il 28/2 a Mestre, iscrivendosi al seguente link. &lt;/p&gt;&lt;p&gt;&lt;a title="http://www.xedotnet.org/Home/Meeting/20140228" href="http://www.xedotnet.org/Home/Meeting/20140228"&gt;http://www.xedotnet.org/Home/Meeting/20140228&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Durante il lab darò una infarinatura iniziale del linguaggio e in seguito potrete seguire un esercizio step-by-step, e porre le domande del caso per risolvere i vostri problemi reali.&lt;/p&gt;&lt;p&gt;A presto&lt;/p&gt;</description>
      <link>http://blog.boschin.it/post/2014/01/29/Typescript-Aperte-le-iscrizioni-al-LAB.aspx</link>
      <comments>http://blog.boschin.it/post/2014/01/29/Typescript-Aperte-le-iscrizioni-al-LAB.aspx#comment</comments>
      <guid>http://blog.boschin.it/post.aspx?id=8e17a59d-58a9-4c57-aef0-d74d32fb1b55</guid>
      <pubDate>Wed, 29 Jan 2014 00:00:00 +0200</pubDate>
      <category>Scripting</category>
      <category>HTML5/CSS3</category>
      <category>HTML5/CSS3</category>
      <dc:publisher>codeblock</dc:publisher>
      <pingback:server>http://blog.boschin.it/pingback.axd</pingback:server>
      <pingback:target>http://blog.boschin.it/post.aspx?id=8e17a59d-58a9-4c57-aef0-d74d32fb1b55</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blog.boschin.it/trackback.axd?id=8e17a59d-58a9-4c57-aef0-d74d32fb1b55</trackback:ping>
      <wfw:comment>http://blog.boschin.it/post/2014/01/29/Typescript-Aperte-le-iscrizioni-al-LAB.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.boschin.it/syndication.axd?post=8e17a59d-58a9-4c57-aef0-d74d32fb1b55</wfw:commentRss>
    </item>
  </channel>
</rss>