<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>THE .NET WAY</title>
	<atom:link href="http://thedotnetway.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://thedotnetway.wordpress.com</link>
	<description>El blog Tecnológico de Emilio Torrens y Jordi Cladera</description>
	<lastBuildDate>Thu, 16 Apr 2009 10:09:01 +0000</lastBuildDate>
	<language>es</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='thedotnetway.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>THE .NET WAY</title>
		<link>http://thedotnetway.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://thedotnetway.wordpress.com/osd.xml" title="THE .NET WAY" />
	<atom:link rel='hub' href='http://thedotnetway.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Generando clases en Java desde WSDL autogenerados (asmx)</title>
		<link>http://thedotnetway.wordpress.com/2009/04/14/generando-clases-en-java-desde-wsdl-autogenerados-asmx/</link>
		<comments>http://thedotnetway.wordpress.com/2009/04/14/generando-clases-en-java-desde-wsdl-autogenerados-asmx/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 15:05:30 +0000</pubDate>
		<dc:creator>Emilio Torrens</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[WebServices]]></category>

		<guid isPermaLink="false">http://thedotnetway.wordpress.com/2009/04/14/generando-clases-en-java-desde-wsdl-autogenerados-asmx/</guid>
		<description><![CDATA[Tenemos un par de Clientes que usan Java y tienen que consumir los servicios web de nuestras aplicaciones (asmx), hemos tenido muchos problemas generando las clases desde Eclipse o el Intellij IDEA desde el wsdl autogenerado de los asmx. Al final hemos encontrado la solución, usar el XFIRE, usando ese framework de Java no hemos [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thedotnetway.wordpress.com&amp;blog=7353993&amp;post=6&amp;subd=thedotnetway&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Tenemos un par de Clientes que usan Java y tienen que consumir los servicios web de nuestras aplicaciones (asmx), hemos tenido muchos problemas generando las clases desde Eclipse o el Intellij IDEA desde el wsdl autogenerado de los asmx.</p>
<p>Al final hemos encontrado la solución, usar el XFIRE, usando ese framework de Java no hemos tenido problemas</p>
<p>Aquí hay un quickstart de cómo utilizar el plugin en el Eclipse: </p>
<p><a href="http://xfire.codehaus.org/Eclipse+Plugin">http://xfire.codehaus.org/Eclipse+Plugin</a> </p>
<p>Documentación:</p>
<p><a href="http://xfire.codehaus.org/User's+Guide">http://xfire.codehaus.org/User&#8217;s+Guide</a> </p>
<p>Hay una nueva versión que se llama CXF</p>
<p> <a href="http://cxf.apache.org/">http://cxf.apache.org/</a>
<p>Aunque no la hemos probado, así que para ir sobre seguro usa o recomienda usar XFIRE</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thedotnetway.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thedotnetway.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thedotnetway.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thedotnetway.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/thedotnetway.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/thedotnetway.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/thedotnetway.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/thedotnetway.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thedotnetway.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thedotnetway.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thedotnetway.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thedotnetway.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thedotnetway.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thedotnetway.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thedotnetway.wordpress.com&amp;blog=7353993&amp;post=6&amp;subd=thedotnetway&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://thedotnetway.wordpress.com/2009/04/14/generando-clases-en-java-desde-wsdl-autogenerados-asmx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/24b1bb0bb911737a790e9dcf1defe835?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">emiliotorrens</media:title>
		</media:content>
	</item>
		<item>
		<title>Lo que sufrimos los programadores</title>
		<link>http://thedotnetway.wordpress.com/2009/02/05/lo-que-sufrimos-los-programadores-hellip/</link>
		<comments>http://thedotnetway.wordpress.com/2009/02/05/lo-que-sufrimos-los-programadores-hellip/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 15:18:00 +0000</pubDate>
		<dc:creator>Emilio Torrens</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Frikadas]]></category>

		<guid isPermaLink="false">http://thedotnetway.wordpress.com/2009/02/05/lo-que-sufrimos-los-programadores-hellip/</guid>
		<description><![CDATA[Lo que mas sufrimos son las estimaciones y la entrega de requerimientos, que nos los dan de aquella manera … Aquí os dejo dos ejemplos, uno de Dilbert y otro de Sinergia Sin Control<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thedotnetway.wordpress.com&amp;blog=7353993&amp;post=7&amp;subd=thedotnetway&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Lo que mas sufrimos son las estimaciones y la entrega de requerimientos, que nos los dan de aquella manera … <img src='http://s2.wp.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>Aquí os dejo dos ejemplos, uno de <a href="http://www.dilbert.com/" target="_blank">Dilbert</a> </p>
<p><span style="font-size:11pt;font-family:&#39;"><a href="http://www.thedotnetway.net/images/www_thedotnetway_net/WindowsLiveWriter/Loquesufrimoslosprogramadores_C1B8/clip_image002_2.jpg"><img title="clip_image002" style="display:block;float:none;margin-left:auto;margin-right:auto;border-width:0;" height="82" alt="clip_image002" src="http://www.thedotnetway.net/images/www_thedotnetway_net/WindowsLiveWriter/Loquesufrimoslosprogramadores_C1B8/clip_image002_thumb.jpg" width="244" border="0" /></a></span></p>
<p>y otro de <a href="http://sinergiasincontrol.blogspot.com/" target="_blank">Sinergia Sin Control</a></p>
<p><span style="font-size:11pt;font-family:&#39;"><a href="http://1.bp.blogspot.com/_yaUmgkS5P-w/SIRrrFzKk5I/AAAAAAAABUY/NWv0Jt04alg/s1600-h/estimaciones.gif" target="_blank"><img title="estimacionesProgramacion" style="display:block;float:none;margin-left:auto;margin-right:auto;border-width:0;" height="335" alt="estimacionesProgramacion" src="http://www.thedotnetway.net/images/www_thedotnetway_net/WindowsLiveWriter/Loquesufrimoslosprogramadores_C1B8/estimacionesProgramacion_3.gif" width="243" border="0" /></a></span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thedotnetway.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thedotnetway.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thedotnetway.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thedotnetway.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/thedotnetway.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/thedotnetway.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/thedotnetway.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/thedotnetway.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thedotnetway.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thedotnetway.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thedotnetway.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thedotnetway.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thedotnetway.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thedotnetway.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thedotnetway.wordpress.com&amp;blog=7353993&amp;post=7&amp;subd=thedotnetway&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://thedotnetway.wordpress.com/2009/02/05/lo-que-sufrimos-los-programadores-hellip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/24b1bb0bb911737a790e9dcf1defe835?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">emiliotorrens</media:title>
		</media:content>

		<media:content url="http://www.thedotnetway.net/images/www_thedotnetway_net/WindowsLiveWriter/Loquesufrimoslosprogramadores_C1B8/clip_image002_thumb.jpg" medium="image">
			<media:title type="html">clip_image002</media:title>
		</media:content>

		<media:content url="http://www.thedotnetway.net/images/www_thedotnetway_net/WindowsLiveWriter/Loquesufrimoslosprogramadores_C1B8/estimacionesProgramacion_3.gif" medium="image">
			<media:title type="html">estimacionesProgramacion</media:title>
		</media:content>
	</item>
		<item>
		<title>LINQ to Objects, filtrando por tipo de Objeto</title>
		<link>http://thedotnetway.wordpress.com/2009/02/03/llinq-to-objects-filtrando-por-tipo-de-objeto/</link>
		<comments>http://thedotnetway.wordpress.com/2009/02/03/llinq-to-objects-filtrando-por-tipo-de-objeto/#comments</comments>
		<pubDate>Tue, 03 Feb 2009 15:20:00 +0000</pubDate>
		<dc:creator>Emilio Torrens</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[LINQ]]></category>

		<guid isPermaLink="false">http://thedotnetway.wordpress.com/2009/02/03/llinq-to-objects-filtrando-por-tipo-de-objeto/</guid>
		<description><![CDATA[El otro día estaba trabajando con unas clases que eran contenedoras de varios tipos de clases, en un array de Objetos, vi que estábamos accediendo al objeto por posición y luego haciéndole cast, suponiendo que ese tipo de objeto siempre estaría en esa posición, pero cuando se producían errores todos los objetos se movían hacia [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thedotnetway.wordpress.com&amp;blog=7353993&amp;post=8&amp;subd=thedotnetway&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>El otro día estaba trabajando con unas clases que eran contenedoras de varios tipos de clases, en un array de Objetos, vi que estábamos accediendo al objeto por posición y luego haciéndole cast, suponiendo que ese tipo de objeto siempre estaría en esa posición, pero cuando se producían errores todos los objetos se movían hacia abajo al insertar un objeto Error.</p>
<p>¿Para que suelto este rollo? pues porque me puse a probar LINQ para buscar en colecciones por tipo de objeto y, desde luego, es la manera mas elegante, cada día estoy mas enamorado de LINQ.</p>
<p>Aquí os dejo un código de ejemplo:</p>
<div style="line-height:normal;"><span style="font-size:9pt;">
<div class="wlWriterEditableSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:67b7bf68-0ba6-40e3-839b-61919a7f2345" style="display:inline;float:none;margin:0;padding:0;">
<pre style="background-color:#FFFFFF;white-space:pre-wrap;overflow:none;font-family:Microsoft Sans Serif;font-size:11px;"><span style="color:#000000;"> </span><span style="color:#0000FF;">public</span><span style="color:#000000;"> </span><span style="color:#0000FF;">static</span><span style="color:#000000;"> </span><span style="color:#0000FF;">void</span><span style="color:#000000;"> Test()
        {
            List</span><span style="color:#000000;">&lt;</span><span style="color:#0000FF;">object</span><span style="color:#000000;">&gt;</span><span style="color:#000000;"> Lista </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#0000FF;">new</span><span style="color:#000000;"> List</span><span style="color:#000000;">&lt;</span><span style="color:#0000FF;">object</span><span style="color:#000000;">&gt;</span><span style="color:#000000;">();

            Lista.Add(</span><span style="color:#800080;">1</span><span style="color:#000000;">);
            Lista.Add(</span><span style="color:#800080;">2</span><span style="color:#000000;">);
            Lista.Add(</span><span style="color:#800080;">3</span><span style="color:#000000;">);
            Lista.Add(</span><span style="color:#800080;">4</span><span style="color:#000000;">);

            Lista.Add(</span><span style="color:#800000;">"</span><span style="color:#800000;">a</span><span style="color:#800000;">"</span><span style="color:#000000;">);
            Lista.Add(</span><span style="color:#800000;">"</span><span style="color:#800000;">b</span><span style="color:#800000;">"</span><span style="color:#000000;">);
            Lista.Add(</span><span style="color:#800000;">"</span><span style="color:#800000;">c</span><span style="color:#800000;">"</span><span style="color:#000000;">);
            Lista.Add(</span><span style="color:#800000;">"</span><span style="color:#800000;">d</span><span style="color:#800000;">"</span><span style="color:#000000;">);

            Lista.Add(DateTime.Today);
            Lista.Add(DateTime.Today.AddDays(</span><span style="color:#800080;">1</span><span style="color:#000000;">));
            Lista.Add(DateTime.Today.AddDays(</span><span style="color:#800080;">2</span><span style="color:#000000;">));
            Lista.Add(DateTime.Today.AddDays(</span><span style="color:#800080;">3</span><span style="color:#000000;">));

            var IntList </span><span style="color:#000000;">=</span><span style="color:#000000;">  from i </span><span style="color:#0000FF;">in</span><span style="color:#000000;"> Lista </span><span style="color:#0000FF;">where</span><span style="color:#000000;"> i.GetType() </span><span style="color:#000000;">==</span><span style="color:#000000;"> </span><span style="color:#0000FF;">typeof</span><span style="color:#000000;"> (</span><span style="color:#0000FF;">int</span><span style="color:#000000;">) select i;

            var StringList </span><span style="color:#000000;">=</span><span style="color:#000000;"> from s </span><span style="color:#0000FF;">in</span><span style="color:#000000;"> Lista </span><span style="color:#0000FF;">where</span><span style="color:#000000;"> s.GetType() </span><span style="color:#000000;">==</span><span style="color:#000000;"> </span><span style="color:#0000FF;">typeof</span><span style="color:#000000;">(</span><span style="color:#0000FF;">string</span><span style="color:#000000;">) select s;

            var DateTimeList </span><span style="color:#000000;">=</span><span style="color:#000000;">
                from d </span><span style="color:#0000FF;">in</span><span style="color:#000000;"> Lista </span><span style="color:#0000FF;">where</span><span style="color:#000000;"> d.GetType() </span><span style="color:#000000;">==</span><span style="color:#000000;"> </span><span style="color:#0000FF;">typeof</span><span style="color:#000000;">(DateTime) select d;

            Console.WriteLine(</span><span style="color:#800000;">"</span><span style="color:#800000;">Hay {0} Integers</span><span style="color:#800000;">"</span><span style="color:#000000;">,IntList.Count());
            Console.WriteLine(</span><span style="color:#800000;">"</span><span style="color:#800000;">Hay {0} Strings</span><span style="color:#800000;">"</span><span style="color:#000000;">, StringList.Count());
            Console.WriteLine(</span><span style="color:#800000;">"</span><span style="color:#800000;">Hay {0} DateTimes</span><span style="color:#800000;">"</span><span style="color:#000000;">, DateTimeList.Count());

            Console.ReadLine();
        }
</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<p>  </span></p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thedotnetway.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thedotnetway.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thedotnetway.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thedotnetway.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/thedotnetway.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/thedotnetway.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/thedotnetway.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/thedotnetway.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thedotnetway.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thedotnetway.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thedotnetway.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thedotnetway.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thedotnetway.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thedotnetway.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thedotnetway.wordpress.com&amp;blog=7353993&amp;post=8&amp;subd=thedotnetway&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://thedotnetway.wordpress.com/2009/02/03/llinq-to-objects-filtrando-por-tipo-de-objeto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/24b1bb0bb911737a790e9dcf1defe835?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">emiliotorrens</media:title>
		</media:content>
	</item>
		<item>
		<title>Un poco de Java</title>
		<link>http://thedotnetway.wordpress.com/2009/01/27/un-poco-de-java/</link>
		<comments>http://thedotnetway.wordpress.com/2009/01/27/un-poco-de-java/#comments</comments>
		<pubDate>Tue, 27 Jan 2009 08:15:00 +0000</pubDate>
		<dc:creator>Emilio Torrens</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://thedotnetway.wordpress.com/2009/01/27/un-poco-de-java/</guid>
		<description><![CDATA[Tenia algunos problemas con un cliente que consumía un servicio mío mandando XML por HTTP-POST, el IIS bloqueaba sus peticiones y no había manera de ver porque, así que me hice un cliente exacto al suyo para poder debugear el tema. Por si os sirve, aquí os dejo el código Java: import java.io.*; import java.net.*; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thedotnetway.wordpress.com&amp;blog=7353993&amp;post=14&amp;subd=thedotnetway&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Tenia algunos problemas con un cliente que consumía un servicio mío mandando XML por HTTP-POST, el IIS bloqueaba sus peticiones y no había manera de ver porque, así que me hice un cliente exacto al suyo para poder debugear el tema.</p>
<p>Por si os sirve, aquí os dejo el código Java:</p>
<div class="wlWriterEditableSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:54751447-7dcd-4b9f-9325-0dc5448a9aec" style="display:inline;float:none;margin:0;padding:0;">
<pre style="background-color:#FFFFFF;white-space:pre-wrap;overflow:auto;font-family:Microsoft Sans Serif;font-size:11px;"><span style="color:#0000FF;">import</span><span style="color:#000000;"> java.io.</span><span style="color:#000000;">*</span><span style="color:#000000;">;
</span><span style="color:#0000FF;">import</span><span style="color:#000000;"> java.net.</span><span style="color:#000000;">*</span><span style="color:#000000;">;
</span><span style="color:#0000FF;">import</span><span style="color:#000000;"> java.util.Properties;
</span><span style="color:#0000FF;">import</span><span style="color:#000000;"> java.io.BufferedReader;
</span><span style="color:#0000FF;">import</span><span style="color:#000000;"> java.io.IOException;
</span><span style="color:#0000FF;">import</span><span style="color:#000000;"> java.io.InputStream;

</span><span style="color:#0000FF;">public</span><span style="color:#000000;"> </span><span style="color:#0000FF;">static</span><span style="color:#000000;"> String POST(String sURL, String sData)
   {
        </span><span style="color:#0000FF;">try</span><span style="color:#000000;">
        {
            URL url </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#0000FF;">new</span><span style="color:#000000;"> URL(sURL);
            URLConnection urlc </span><span style="color:#000000;">=</span><span style="color:#000000;"> url.openConnection();
            urlc.setRequestProperty(</span><span style="color:#000000;">"</span><span style="color:#000000;">Content-Type</span><span style="color:#000000;">"</span><span style="color:#000000;">,    </span><span style="color:#000000;">"</span><span style="color:#000000;">application/x-www-form-urlencoded</span><span style="color:#000000;">"</span><span style="color:#000000;">);
            urlc.setDoOutput(</span><span style="color:#0000FF;">true</span><span style="color:#000000;">);
            OutputStream os </span><span style="color:#000000;">=</span><span style="color:#000000;"> urlc.getOutputStream();

            </span><span style="color:#0000FF;">byte</span><span style="color:#000000;">[] postData </span><span style="color:#000000;">=</span><span style="color:#000000;"> sData.getBytes();
            os.write(postData);

            os.flush();
            os.close();

            InputStream is </span><span style="color:#000000;">=</span><span style="color:#000000;"> urlc.getInputStream();

            </span><span style="color:#0000FF;">return</span><span style="color:#000000;"> parseISToString(is);

        }
        </span><span style="color:#0000FF;">catch</span><span style="color:#000000;">(IOException ex)
        {
            </span><span style="color:#0000FF;">return</span><span style="color:#000000;"> ex.getMessage();
        }
   }

   </span><span style="color:#0000FF;">public</span><span style="color:#000000;"> </span><span style="color:#0000FF;">static</span><span style="color:#000000;"> String parseISToString(java.io.InputStream is)
   {

        java.io.DataInputStream din </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#0000FF;">new</span><span style="color:#000000;"> java.io.DataInputStream(is);
        StringBuffer sb </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#0000FF;">new</span><span style="color:#000000;"> StringBuffer();

        </span><span style="color:#0000FF;">try</span><span style="color:#000000;">
        {
            String line </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#0000FF;">null</span><span style="color:#000000;">;
            </span><span style="color:#0000FF;">while</span><span style="color:#000000;">((line</span><span style="color:#000000;">=</span><span style="color:#000000;">din.readLine()) </span><span style="color:#000000;">!=</span><span style="color:#000000;"> </span><span style="color:#0000FF;">null</span><span style="color:#000000;">)
            {
                sb.append(line</span><span style="color:#000000;">+</span><span style="color:#000000;">"</span><span style="color:#000000;">\n</span><span style="color:#000000;">"</span><span style="color:#000000;">);
            }
            </span><span style="color:#0000FF;">return</span><span style="color:#000000;"> sb.toString();
        }
        </span><span style="color:#0000FF;">catch</span><span style="color:#000000;">(Exception ex)
        {
            </span><span style="color:#0000FF;">return</span><span style="color:#000000;"> ex.getMessage();
        }

   }
</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thedotnetway.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thedotnetway.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thedotnetway.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thedotnetway.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/thedotnetway.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/thedotnetway.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/thedotnetway.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/thedotnetway.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thedotnetway.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thedotnetway.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thedotnetway.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thedotnetway.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thedotnetway.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thedotnetway.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thedotnetway.wordpress.com&amp;blog=7353993&amp;post=14&amp;subd=thedotnetway&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://thedotnetway.wordpress.com/2009/01/27/un-poco-de-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/24b1bb0bb911737a790e9dcf1defe835?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">emiliotorrens</media:title>
		</media:content>
	</item>
		<item>
		<title>Obtener los datos XML de un Documento SOAP</title>
		<link>http://thedotnetway.wordpress.com/2009/01/09/obtener-los-datos-xml-de-un-documento-soap/</link>
		<comments>http://thedotnetway.wordpress.com/2009/01/09/obtener-los-datos-xml-de-un-documento-soap/#comments</comments>
		<pubDate>Fri, 09 Jan 2009 08:23:00 +0000</pubDate>
		<dc:creator>Emilio Torrens</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[SOAP]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://thedotnetway.wordpress.com/2009/01/09/obtener-los-datos-xml-de-un-documento-soap/</guid>
		<description><![CDATA[Mas de mi servicio &#34;impersonal&#34; &#8230; Resulta que ahora también recibe documentos SOAP, así que tengo que extraer los datos del mensaje SOAP con este código: private XmlDocument GetSOAPBody(XmlDocument xmlSoap) { const string SOAP_NAMESPACE = "http://schemas.xmlsoap.org/soap/envelope/"; XmlNodeList nodes = xmlSoap.GetElementsByTagName("Body", SOAP_NAMESPACE); if (nodes.Count == 0) return xmlSoap; XmlElement body = (XmlElement)nodes.Item(0); nodes = body.ChildNodes; for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thedotnetway.wordpress.com&amp;blog=7353993&amp;post=17&amp;subd=thedotnetway&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Mas de mi servicio &quot;impersonal&quot; &#8230;</p>
<p>Resulta que ahora también recibe documentos SOAP, así que tengo que extraer los datos del mensaje SOAP con este código:</p>
<div class="wlWriterEditableSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:36df10a3-f25c-49cb-9410-dbd5e2b45669" style="display:inline;float:none;margin:0;padding:0;">
<pre style="background-color:#FFFFFF;white-space:pre-wrap;overflow:auto;font-family:Microsoft Sans Serif;font-size:11px;"><span style="color:#0000FF;">private</span><span style="color:#000000;"> XmlDocument GetSOAPBody(XmlDocument xmlSoap)
    {

              </span><span style="color:#0000FF;">const</span><span style="color:#000000;"> </span><span style="color:#0000FF;">string</span><span style="color:#000000;"> SOAP_NAMESPACE </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">"</span><span style="color:#800000;">http://schemas.xmlsoap.org/soap/envelope/</span><span style="color:#800000;">"</span><span style="color:#000000;">;
              XmlNodeList nodes </span><span style="color:#000000;">=</span><span style="color:#000000;"> xmlSoap.GetElementsByTagName(</span><span style="color:#800000;">"</span><span style="color:#800000;">Body</span><span style="color:#800000;">"</span><span style="color:#000000;">, SOAP_NAMESPACE);

          </span><span style="color:#0000FF;">if</span><span style="color:#000000;"> (nodes.Count </span><span style="color:#000000;">==</span><span style="color:#000000;"> </span><span style="color:#800080;">0</span><span style="color:#000000;">) </span><span style="color:#0000FF;">return</span><span style="color:#000000;"> xmlSoap;

          XmlElement body </span><span style="color:#000000;">=</span><span style="color:#000000;"> (XmlElement)nodes.Item(</span><span style="color:#800080;">0</span><span style="color:#000000;">);

          nodes </span><span style="color:#000000;">=</span><span style="color:#000000;"> body.ChildNodes;
          </span><span style="color:#0000FF;">for</span><span style="color:#000000;"> (</span><span style="color:#0000FF;">int</span><span style="color:#000000;"> i </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">0</span><span style="color:#000000;">; i </span><span style="color:#000000;">&lt;</span><span style="color:#000000;"> nodes.Count; i</span><span style="color:#000000;">++</span><span style="color:#000000;">)
          {
              XmlNode node </span><span style="color:#000000;">=</span><span style="color:#000000;"> nodes.Item(i);
              </span><span style="color:#0000FF;">if</span><span style="color:#000000;"> (node </span><span style="color:#0000FF;">is</span><span style="color:#000000;"> XmlElement)
              {
                  xmlSoap </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#0000FF;">new</span><span style="color:#000000;"> XmlDocument();
                  xmlSoap.LoadXml(node.OuterXml);
                  IsSOAP </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#0000FF;">true</span><span style="color:#000000;">;
                  </span><span style="color:#0000FF;">return</span><span style="color:#000000;"> xmlSoap;
              }
          }

          </span><span style="color:#0000FF;">return</span><span style="color:#000000;"> xmlSoap;
      }  </span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<p>Funciona bastante bien, ahora estoy con el de generar las respuestas de OK y de Error, ya lo publicare <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thedotnetway.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thedotnetway.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thedotnetway.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thedotnetway.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/thedotnetway.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/thedotnetway.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/thedotnetway.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/thedotnetway.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thedotnetway.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thedotnetway.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thedotnetway.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thedotnetway.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thedotnetway.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thedotnetway.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thedotnetway.wordpress.com&amp;blog=7353993&amp;post=17&amp;subd=thedotnetway&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://thedotnetway.wordpress.com/2009/01/09/obtener-los-datos-xml-de-un-documento-soap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/24b1bb0bb911737a790e9dcf1defe835?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">emiliotorrens</media:title>
		</media:content>
	</item>
		<item>
		<title>Pasar Credenciales en Http Header Authorization</title>
		<link>http://thedotnetway.wordpress.com/2008/11/27/pasar-credenciales-en-http-header-authorization/</link>
		<comments>http://thedotnetway.wordpress.com/2008/11/27/pasar-credenciales-en-http-header-authorization/#comments</comments>
		<pubDate>Thu, 27 Nov 2008 08:29:00 +0000</pubDate>
		<dc:creator>Emilio Torrens</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[SOAP]]></category>
		<category><![CDATA[WebServices]]></category>

		<guid isPermaLink="false">http://thedotnetway.wordpress.com/2008/11/27/pasar-credenciales-en-http-header-authorization/</guid>
		<description><![CDATA[Me he estado volviendo medio loco estos días intentando conectar con el servicio de un tercero, la documentación no era todo lo clara que uno espera&#8230; Intente pasarle las Credenciales como NetworkCredentials en el HttpRequest y nada, añadiendo cabeceras de autentificación al mensaje SOAP y nada, al final las espera en una cabecera Http. ¿Como [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thedotnetway.wordpress.com&amp;blog=7353993&amp;post=19&amp;subd=thedotnetway&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Me he estado volviendo medio loco estos días intentando conectar con el servicio de un tercero, la documentación no era todo lo clara que uno espera&#8230;</p>
<p>Intente pasarle las Credenciales como NetworkCredentials en el HttpRequest y nada, añadiendo cabeceras de autentificación al mensaje SOAP y nada, al final las espera en una cabecera Http.</p>
<p>¿Como se pasan allí? pues así:</p>
<div class="wlWriterEditableSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:e8070795-6a41-42ea-8b82-b2d0247b209e" style="display:inline;float:none;margin:0;padding:0;">
<pre style="background-color:#FFFFFF;white-space:pre-wrap;overflow:auto;font-family:Microsoft Sans Serif;font-size:11px;"><span style="color:#000000;">HttpWebRequest req </span><span style="color:#000000;">=</span><span style="color:#000000;"> (HttpWebRequest)WebRequest.Create(</span><span style="color:#800000;">"</span><span style="color:#800000;">la url del servicio</span><span style="color:#800000;">"</span><span style="color:#000000;">);

req.Headers.Add(</span><span style="color:#800000;">"</span><span style="color:#800000;">SOAPAction</span><span style="color:#800000;">"</span><span style="color:#000000;">, </span><span style="color:#800000;">"</span><span style="color:#800000;">la accion</span><span style="color:#800000;">"</span><span style="color:#000000;">);
req.ContentType </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">"</span><span style="color:#800000;">application/soap+xml</span><span style="color:#800000;">"</span><span style="color:#000000;">;
req.Accept </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">"</span><span style="color:#800000;">text/xml</span><span style="color:#800000;">"</span><span style="color:#000000;">;
req.Method </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">"</span><span style="color:#800000;">POST</span><span style="color:#800000;">"</span><span style="color:#000000;">;
</span><span style="color:#0000FF;">byte</span><span style="color:#000000;">[] authBytes </span><span style="color:#000000;">=</span><span style="color:#000000;"> Encoding.UTF8.GetBytes((</span><span style="color:#800000;">"</span><span style="color:#800000;">Usuario:Pass</span><span style="color:#800000;">"</span><span style="color:#000000;">).ToCharArray());
req.Headers.Add(</span><span style="color:#800000;">"</span><span style="color:#800000;">Authorization</span><span style="color:#800000;">"</span><span style="color:#000000;">, </span><span style="color:#800000;">"</span><span style="color:#800000;">Basic </span><span style="color:#800000;">"</span><span style="color:#000000;"> </span><span style="color:#000000;">+</span><span style="color:#000000;"> Convert.ToBase64String(authBytes));       </span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<p><span style="font-size:10pt;"><span style="font-size:10pt;"></span></span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thedotnetway.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thedotnetway.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thedotnetway.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thedotnetway.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/thedotnetway.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/thedotnetway.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/thedotnetway.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/thedotnetway.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thedotnetway.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thedotnetway.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thedotnetway.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thedotnetway.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thedotnetway.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thedotnetway.wordpress.com/19/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thedotnetway.wordpress.com&amp;blog=7353993&amp;post=19&amp;subd=thedotnetway&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://thedotnetway.wordpress.com/2008/11/27/pasar-credenciales-en-http-header-authorization/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/24b1bb0bb911737a790e9dcf1defe835?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">emiliotorrens</media:title>
		</media:content>
	</item>
		<item>
		<title>String Compile</title>
		<link>http://thedotnetway.wordpress.com/2008/11/25/string-compile/</link>
		<comments>http://thedotnetway.wordpress.com/2008/11/25/string-compile/#comments</comments>
		<pubDate>Tue, 25 Nov 2008 08:34:00 +0000</pubDate>
		<dc:creator>Emilio Torrens</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://thedotnetway.wordpress.com/2008/11/25/string-compile/</guid>
		<description><![CDATA[Con CSharpCodeProvider y&#160; ICodeCompiler podemos escribir y ejecutar código al vuelo. Cuando vi esto en una demo de Microsoft no me pareció algo excesivamente útil, pero estos días me he encontrado con un problema que he podido resolver gracias a esto. Resulta que tengo un servicio al que le envían documentos XML y no tengo [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thedotnetway.wordpress.com&amp;blog=7353993&amp;post=22&amp;subd=thedotnetway&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Con CSharpCodeProvider y&#160; ICodeCompiler podemos escribir y ejecutar código al vuelo.</p>
<p>Cuando vi esto en una demo de Microsoft no me pareció algo excesivamente útil, pero estos días me he encontrado con un problema que he podido resolver gracias a esto.</p>
<p>Resulta que tengo un servicio al que le envían documentos XML y no tengo una manera fija para saber quien envía esos documentos, algunos es por el Document Element, otros por un valor de XPath, y cosas así, así que para resolverlo dejo que el usuario configure la condición y la compilo y la ejecuto.</p>
<p>Aquí dejo un ejemplo de código:</p>
<div class="wlWriterEditableSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:1f747c5d-8de9-494e-b226-b18e30744493" style="display:inline;float:none;margin:0;padding:0;">
<pre style="background-color:#FFFFFF;white-space:pre-wrap;overflow:auto;font-family:Microsoft Sans Serif;font-size:11px;"><span style="color:#0000FF;">using</span><span style="color:#000000;"> System;
</span><span style="color:#0000FF;">using</span><span style="color:#000000;"> System.CodeDom.Compiler;
</span><span style="color:#0000FF;">using</span><span style="color:#000000;"> System.Reflection;
</span><span style="color:#0000FF;">using</span><span style="color:#000000;"> System.Text;
</span><span style="color:#0000FF;">using</span><span style="color:#000000;"> Microsoft.CSharp;

</span><span style="color:#0000FF;">namespace</span><span style="color:#000000;"> Macros
{
    </span><span style="color:#0000FF;">public</span><span style="color:#000000;"> </span><span style="color:#0000FF;">interface</span><span style="color:#000000;"> IStrCode
    {
        </span><span style="color:#0000FF;">bool</span><span style="color:#000000;"> Eval(</span><span style="color:#0000FF;">string</span><span style="color:#000000;"> Condicion);
    }

    </span><span style="color:#0000FF;">public</span><span style="color:#000000;"> </span><span style="color:#0000FF;">class</span><span style="color:#000000;"> StrCodeManager
    {
        </span><span style="color:#0000FF;">public</span><span style="color:#000000;"> </span><span style="color:#0000FF;">static</span><span style="color:#000000;"> </span><span style="color:#0000FF;">void</span><span style="color:#000000;"> Test()
        {
            </span><span style="color:#0000FF;">bool</span><span style="color:#000000;"> result </span><span style="color:#000000;">=</span><span style="color:#000000;"> IsValid(</span><span style="color:#800000;">"</span><span style="color:#800000;">\"1234\".Length == 4</span><span style="color:#800000;">"</span><span style="color:#000000;">);
            result </span><span style="color:#000000;">=</span><span style="color:#000000;"> IsValid(</span><span style="color:#800000;">"</span><span style="color:#800000;">2 + 2 == 5</span><span style="color:#800000;">"</span><span style="color:#000000;">);
            result </span><span style="color:#000000;">=</span><span style="color:#000000;"> IsValid(</span><span style="color:#800000;">"</span><span style="color:#800000;">\"Hola Que tal\".IndexOf(\"Hola\") != 0</span><span style="color:#800000;">"</span><span style="color:#000000;">);
        }

        </span><span style="color:#0000FF;">public</span><span style="color:#000000;"> </span><span style="color:#0000FF;">static</span><span style="color:#000000;"> </span><span style="color:#0000FF;">bool</span><span style="color:#000000;"> IsValid(</span><span style="color:#0000FF;">string</span><span style="color:#000000;"> Condicion)
        {
            </span><span style="color:#0000FF;">string</span><span style="color:#000000;"> SourceString </span><span style="color:#000000;">=</span><span style="color:#000000;">
                </span><span style="color:#800000;">@"</span><span style="color:#800000;">using Macros;
                        public class StrCode : IStrCode
                        {
                            public bool Eval(string Condicion)
                            {
                                return @@Condicion@@;
                            }
                        }</span><span style="color:#800000;">"</span><span style="color:#000000;">
                    .Replace(</span><span style="color:#800000;">"</span><span style="color:#800000;">@@Condicion@@</span><span style="color:#800000;">"</span><span style="color:#000000;">, Condicion);

            CSharpCodeProvider codeProvider </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#0000FF;">new</span><span style="color:#000000;"> CSharpCodeProvider();
            ICodeCompiler icc </span><span style="color:#000000;">=</span><span style="color:#000000;"> codeProvider.CreateCompiler();

            CompilerParameters parameters </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#0000FF;">new</span><span style="color:#000000;"> CompilerParameters();
            parameters.GenerateExecutable </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#0000FF;">false</span><span style="color:#000000;">;
            </span><span style="color:#008000;">//</span><span style="color:#008000;">Aqui añadimos las referencias necesarias</span><span style="color:#008000;">
</span><span style="color:#000000;">            parameters.ReferencedAssemblies.Add(</span><span style="color:#800000;">"</span><span style="color:#800000;">System.dll</span><span style="color:#800000;">"</span><span style="color:#000000;">);
            </span><span style="color:#008000;">//</span><span style="color:#008000;">Esta es la referencia a esta dll para que tenga acceso al interface</span><span style="color:#008000;">
</span><span style="color:#000000;">            parameters.ReferencedAssemblies.Add(</span><span style="color:#800000;">"</span><span style="color:#800000;">My.dll</span><span style="color:#800000;">"</span><span style="color:#000000;">);
            CompilerResults results </span><span style="color:#000000;">=</span><span style="color:#000000;"> icc.CompileAssemblyFromSource(parameters, SourceString);

            </span><span style="color:#0000FF;">if</span><span style="color:#000000;"> (results.Errors.Count </span><span style="color:#000000;">!=</span><span style="color:#000000;"> </span><span style="color:#800080;">0</span><span style="color:#000000;">)
            {
                StringBuilder stringBuilder </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#0000FF;">new</span><span style="color:#000000;"> StringBuilder();
                </span><span style="color:#0000FF;">foreach</span><span style="color:#000000;"> (CompilerError CompErr </span><span style="color:#0000FF;">in</span><span style="color:#000000;"> results.Errors)
                {
                    stringBuilder.AppendLine(CompErr.ErrorText);
                }

                </span><span style="color:#0000FF;">throw</span><span style="color:#000000;"> </span><span style="color:#0000FF;">new</span><span style="color:#000000;"> Exception(stringBuilder.ToString());
            }

            Assembly As </span><span style="color:#000000;">=</span><span style="color:#000000;"> results.CompiledAssembly;

            </span><span style="color:#0000FF;">foreach</span><span style="color:#000000;"> (Type tipo </span><span style="color:#0000FF;">in</span><span style="color:#000000;"> As.GetTypes())
            {
                </span><span style="color:#0000FF;">if</span><span style="color:#000000;"> (tipo.GetInterface(</span><span style="color:#800000;">"</span><span style="color:#800000;">IStrCode</span><span style="color:#800000;">"</span><span style="color:#000000;">) </span><span style="color:#000000;">!=</span><span style="color:#000000;"> </span><span style="color:#0000FF;">null</span><span style="color:#000000;">)
                {
                    IStrCode eval </span><span style="color:#000000;">=</span><span style="color:#000000;"> (IStrCode) Activator.CreateInstance(tipo);
                    </span><span style="color:#0000FF;">return</span><span style="color:#000000;"> eval.Eval(Condicion);
                }
            }

            </span><span style="color:#0000FF;">throw</span><span style="color:#000000;"> </span><span style="color:#0000FF;">new</span><span style="color:#000000;"> Exception(</span><span style="color:#800000;">""</span><span style="color:#000000;">);
        }
    }
}</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<div style="margin:0 0 10pt;"><span style="font-size:10pt;line-height:115%;"></span></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thedotnetway.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thedotnetway.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thedotnetway.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thedotnetway.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/thedotnetway.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/thedotnetway.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/thedotnetway.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/thedotnetway.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thedotnetway.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thedotnetway.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thedotnetway.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thedotnetway.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thedotnetway.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thedotnetway.wordpress.com/22/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thedotnetway.wordpress.com&amp;blog=7353993&amp;post=22&amp;subd=thedotnetway&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://thedotnetway.wordpress.com/2008/11/25/string-compile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/24b1bb0bb911737a790e9dcf1defe835?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">emiliotorrens</media:title>
		</media:content>
	</item>
		<item>
		<title>Web.config y configSource</title>
		<link>http://thedotnetway.wordpress.com/2008/11/21/webconfig-y-confisource/</link>
		<comments>http://thedotnetway.wordpress.com/2008/11/21/webconfig-y-confisource/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 08:40:00 +0000</pubDate>
		<dc:creator>Emilio Torrens</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ASP.NET]]></category>

		<guid isPermaLink="false">http://thedotnetway.wordpress.com/2008/11/21/webconfig-y-confisource/</guid>
		<description><![CDATA[configSource es un atributo que nos permite indicar otro fichero .config para una sección. Por ejemplo, que queremos tener nuestra configuración especifica en un fichero aparte para que sea menos lioso &#60;appSettings configSource =&#34;mySettings.config&#34; /&#62; Que queremos tener las cadenas de conexión de SQL en otro sitio &#60;connectionStrings configSource=&#34;MyConns.config&#34; /&#62; Esto nos permite tener un [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thedotnetway.wordpress.com&amp;blog=7353993&amp;post=24&amp;subd=thedotnetway&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>configSource es un atributo que nos permite indicar otro fichero .config para una sección.</p>
<p>Por ejemplo, que queremos tener nuestra configuración especifica en un fichero aparte para que sea menos lioso</p>
<div style="margin:0 0 10pt;"><span style="font-size:10pt;color:blue;line-height:115%;">&lt;</span><span style="font-size:10pt;color:#a31515;line-height:115%;">appSettings </span><span style="font-size:10pt;color:red;line-height:115%;">configSource</span><span style="font-size:10pt;color:blue;line-height:115%;"> =</span><span style="font-size:10pt;line-height:115%;">&quot;<span style="color:blue;">mySettings.config</span>&quot; /<span style="color:blue;">&gt;</span></span></div>
<p><font face="Arial">Que queremos tener las cadenas de conexión de SQL en otro sitio</font></p>
<div style="margin:0 0 10pt;"><span style="font-size:10pt;color:blue;line-height:115%;">&lt;</span><span style="font-size:10pt;color:#a31515;line-height:115%;">connectionStrings </span><span style="font-size:10pt;color:red;line-height:115%;">configSource</span><span style="font-size:10pt;color:blue;line-height:115%;">=</span><span style="font-size:10pt;line-height:115%;">&quot;<span style="color:blue;">MyConns.config</span>&quot; /<span style="color:blue;">&gt;</span></span></div>
<p>Esto nos permite tener un web.config menos lioso, dejar que gente de menos nivel configure las aplicaciones sin tocar el web.config e incluso pasar a producción sin tener que acordarte de todos los cambios que tienes que hacer en el web.config.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thedotnetway.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thedotnetway.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thedotnetway.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thedotnetway.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/thedotnetway.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/thedotnetway.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/thedotnetway.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/thedotnetway.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thedotnetway.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thedotnetway.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thedotnetway.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thedotnetway.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thedotnetway.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thedotnetway.wordpress.com/24/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thedotnetway.wordpress.com&amp;blog=7353993&amp;post=24&amp;subd=thedotnetway&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://thedotnetway.wordpress.com/2008/11/21/webconfig-y-confisource/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/24b1bb0bb911737a790e9dcf1defe835?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">emiliotorrens</media:title>
		</media:content>
	</item>
		<item>
		<title>Como saltarse los certificados al hacer conexiones HTTPS</title>
		<link>http://thedotnetway.wordpress.com/2008/11/20/como-saltarse-los-certificados-al-hacer-conexiones-http/</link>
		<comments>http://thedotnetway.wordpress.com/2008/11/20/como-saltarse-los-certificados-al-hacer-conexiones-http/#comments</comments>
		<pubDate>Thu, 20 Nov 2008 08:43:00 +0000</pubDate>
		<dc:creator>Emilio Torrens</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[HTTP]]></category>

		<guid isPermaLink="false">http://thedotnetway.wordpress.com/2008/11/20/como-saltarse-los-certificados-al-hacer-conexiones-http/</guid>
		<description><![CDATA[Si queremos hacer peticiones a un sitio https y no tenemos el certificado o no queremos usarlo la manera es la siguiente: 1- Crear una clase que implemente ICertificatePolicy donde la validación siempre devuelva true para pasársela al&#160; CertificatePolicy del ServicePointManager public class TrustAllCertificatePolicy :ICertificatePolicy { public TrustAllCertificatePolicy() { } #region ICertificatePolicy Members public bool [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thedotnetway.wordpress.com&amp;blog=7353993&amp;post=25&amp;subd=thedotnetway&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Si queremos hacer peticiones a un sitio https y no tenemos el certificado o no queremos usarlo la manera es la siguiente:</p>
<p>1- Crear una clase que implemente ICertificatePolicy donde la validación siempre devuelva true para pasársela al&#160; CertificatePolicy del ServicePointManager </p>
<div class="wlWriterEditableSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:2be9b35a-10ea-427b-a9ee-403d5452efbe" style="display:inline;float:none;margin:0;padding:0;">
<pre style="background-color:#FFFFFF;white-space:pre-wrap;overflow:auto;font-family:Microsoft Sans Serif;font-size:11px;"><span style="color:#000000;"> </span><span style="color:#0000FF;">public</span><span style="color:#000000;"> </span><span style="color:#0000FF;">class</span><span style="color:#000000;"> TrustAllCertificatePolicy :ICertificatePolicy
    {
        </span><span style="color:#0000FF;">public</span><span style="color:#000000;"> TrustAllCertificatePolicy()
        {
        }

        </span><span style="color:#0000FF;">#region</span><span style="color:#000000;"> ICertificatePolicy Members</span><span style="color:#000000;">

        </span><span style="color:#0000FF;">public</span><span style="color:#000000;"> </span><span style="color:#0000FF;">bool</span><span style="color:#000000;"> CheckValidationResult(ServicePoint sp,
                      X509Certificate cert,
                      WebRequest req,
                      </span><span style="color:#0000FF;">int</span><span style="color:#000000;"> problem)
        {
            </span><span style="color:#0000FF;">return</span><span style="color:#000000;"> </span><span style="color:#0000FF;">true</span><span style="color:#000000;">;
        }

        </span><span style="color:#0000FF;">#endregion</span><span style="color:#000000;">
    }
</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<p>2-Pasarle la clase al ServicePointManager antes de hacer la petición</p>
<div class="wlWriterEditableSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:2e7ba089-7bd4-49c7-a991-c8f35bb6e5a3" style="display:inline;float:none;margin:0;padding:0;">
<pre style="background-color:#FFFFFF;white-space:pre-wrap;overflow:auto;font-family:Microsoft Sans Serif;font-size:11px;"><span style="color:#000000;">HttpWebRequest req </span><span style="color:#000000;">=</span><span style="color:#000000;"> (HttpWebRequest)WebRequest.Create(url);
ServicePointManager.CertificatePolicy </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#0000FF;">new</span><span style="color:#000000;"> TrustAllCertificatePolicy();</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<div style="line-height:normal;"><span style="font-size:10pt;"></span></div>
<p>A partir de eso podemos hacer las peticiones sin el certificado.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thedotnetway.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thedotnetway.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thedotnetway.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thedotnetway.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/thedotnetway.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/thedotnetway.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/thedotnetway.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/thedotnetway.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thedotnetway.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thedotnetway.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thedotnetway.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thedotnetway.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thedotnetway.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thedotnetway.wordpress.com/25/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thedotnetway.wordpress.com&amp;blog=7353993&amp;post=25&amp;subd=thedotnetway&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://thedotnetway.wordpress.com/2008/11/20/como-saltarse-los-certificados-al-hacer-conexiones-http/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/24b1bb0bb911737a790e9dcf1defe835?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">emiliotorrens</media:title>
		</media:content>
	</item>
		<item>
		<title>Leer ficheros y ordenar el resultado.</title>
		<link>http://thedotnetway.wordpress.com/2008/10/30/leer-ficheros-y-ordenar-ficheros/</link>
		<comments>http://thedotnetway.wordpress.com/2008/10/30/leer-ficheros-y-ordenar-ficheros/#comments</comments>
		<pubDate>Thu, 30 Oct 2008 13:29:00 +0000</pubDate>
		<dc:creator>Emilio Torrens</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://thedotnetway.wordpress.com/2008/11/30/leer-ficheros-y-ordenar-ficheros/</guid>
		<description><![CDATA[El otro día tenia que escribir un código para cargar unos archivos XML y procesarlos, pero debía procesarlos según la fecha en que habían sido creados. Como el GetFiles no tiene un método para recoger los archivos ordenados tuve que cargarlos en una clase y obtener su fecha de creación para luego ordenarlos, aquí el [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thedotnetway.wordpress.com&amp;blog=7353993&amp;post=29&amp;subd=thedotnetway&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><font face="Arial">El otro día tenia que escribir un código para cargar unos archivos XML y procesarlos, pero debía procesarlos según la fecha en que habían sido creados.</font></p>
<p><font face="Arial">Como el GetFiles no tiene un método para recoger los archivos ordenados tuve que cargarlos en una clase y obtener su fecha de creación para luego ordenarlos, aquí el código:</font></p>
</p>
<p> <font face="Arial">
<div style="line-height:normal;"><span style="font-size:10pt;">
<div style="line-height:normal;">
<div style="line-height:normal;">
<div style="line-height:normal;"></div>
</p></div>
</p></div>
</p>
<p>     </span>
<div class="wlWriterEditableSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:3cfbbe53-4daf-4789-a741-9556f7923b1b" style="display:inline;float:none;margin:0;padding:0;">
<pre style="background-color:#FFFFFF;white-space:pre-wrap;overflow:auto;font-family:Microsoft Sans Serif;font-size:11px;"><span style="color:#000000;">        </span><span style="color:#0000FF;">public</span><span style="color:#000000;"> </span><span style="color:#0000FF;">class</span><span style="color:#000000;"> MyFile
        {
            </span><span style="color:#0000FF;">public</span><span style="color:#000000;"> </span><span style="color:#0000FF;">string</span><span style="color:#000000;"> Fichero { </span><span style="color:#0000FF;">get</span><span style="color:#000000;">; </span><span style="color:#0000FF;">set</span><span style="color:#000000;">; }
            </span><span style="color:#0000FF;">public</span><span style="color:#000000;"> DateTime Creado { </span><span style="color:#0000FF;">get</span><span style="color:#000000;">; </span><span style="color:#0000FF;">set</span><span style="color:#000000;">;}
        }

        </span><span style="color:#0000FF;">private</span><span style="color:#000000;"> </span><span style="color:#0000FF;">static</span><span style="color:#000000;"> </span><span style="color:#0000FF;">void</span><span style="color:#000000;"> LoadFiles()
        {

            </span><span style="color:#0000FF;">string</span><span style="color:#000000;"> Path </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">@"</span><span style="color:#800000;">c:\ficheros</span><span style="color:#800000;">"</span><span style="color:#000000;">;

            </span><span style="color:#0000FF;">string</span><span style="color:#000000;">[] ficheros </span><span style="color:#000000;">=</span><span style="color:#000000;"> Directory.GetFiles(Path, </span><span style="color:#800000;">"</span><span style="color:#800000;">*.xml</span><span style="color:#800000;">"</span><span style="color:#000000;">);

            List</span><span style="color:#000000;">&lt;</span><span style="color:#000000;">MyFile</span><span style="color:#000000;">&gt;</span><span style="color:#000000;"> Files </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#0000FF;">new</span><span style="color:#000000;"> List</span><span style="color:#000000;">&lt;</span><span style="color:#000000;">MyFile</span><span style="color:#000000;">&gt;</span><span style="color:#000000;">();

            </span><span style="color:#0000FF;">foreach</span><span style="color:#000000;"> (</span><span style="color:#0000FF;">string</span><span style="color:#000000;"> fichero </span><span style="color:#0000FF;">in</span><span style="color:#000000;"> ficheros)
            {
                  Files.Add(
                  </span><span style="color:#0000FF;">new</span><span style="color:#000000;"> MyFile() {Creado </span><span style="color:#000000;">=</span><span style="color:#000000;"> File.GetCreationTime(fichero), Fichero</span><span style="color:#000000;">=</span><span style="color:#000000;"> fichero}
                  );
            }

            Files.Sort((x, y) </span><span style="color:#000000;">=&gt;</span><span style="color:#000000;"> x.Creado.CompareTo(y.Creado));

            </span><span style="color:#0000FF;">foreach</span><span style="color:#000000;"> (MyFile myFile </span><span style="color:#0000FF;">in</span><span style="color:#000000;"> Files)
            {
            }
        }

</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
</p></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thedotnetway.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thedotnetway.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thedotnetway.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thedotnetway.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/thedotnetway.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/thedotnetway.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/thedotnetway.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/thedotnetway.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thedotnetway.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thedotnetway.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thedotnetway.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thedotnetway.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thedotnetway.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thedotnetway.wordpress.com/29/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thedotnetway.wordpress.com&amp;blog=7353993&amp;post=29&amp;subd=thedotnetway&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://thedotnetway.wordpress.com/2008/10/30/leer-ficheros-y-ordenar-ficheros/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/24b1bb0bb911737a790e9dcf1defe835?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">emiliotorrens</media:title>
		</media:content>
	</item>
	</channel>
</rss>
