<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3913109781491284713</id><updated>2024-11-06T02:57:44.428+00:00</updated><category term=".NET"/><category term="C#"/><category term="IoC"/><category term="Visual Studio"/><category term="WLW"/><category term="Xslt"/><category term="XsltPlugin"/><category term="Database"/><category term="T4"/><category term="ASP.NET"/><category term="CLR"/><category term="GPS"/><category term="Ninject"/><category term="NuGet"/><category term="ORM"/><category term="RDL"/><category term="SOAP"/><category term="SQL"/><category term="Subsonic"/><category term="Unity"/><category term="WP7"/><category term="WPF"/><category term="WSDL"/><category term="WebServices"/><category term="html5"/><category term="iphone"/><category term="javascript"/><category term="mobile"/><title type='text'>Code-D-Code</title><subtitle type='html'>a blog about software development</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://code-d-code.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3913109781491284713/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://code-d-code.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>gee</name><uri>http://www.blogger.com/profile/07498990196349740374</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>13</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3913109781491284713.post-4205690844390004065</id><published>2013-08-26T20:13:00.001+01:00</published><updated>2013-08-26T20:13:27.269+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="IoC"/><category scheme="http://www.blogger.com/atom/ns#" term="Unity"/><title type='text'>Unity Generic Container Interface Implementation</title><content type='html'>&lt;p&gt;An implementation of the IIoCGenericContainer interface for the Unity container.&lt;/p&gt;  &lt;div id=&quot;codeSnippetWrapper&quot;&gt;   &lt;pre id=&quot;codeSnippet&quot; class=&quot;csharpcode&quot;&gt;using System;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;using System.Linq;&lt;br /&gt;using System.Text;&lt;br /&gt;using Microsoft.Practices.Unity;&lt;br /&gt;&lt;br /&gt;namespace IoC&lt;br /&gt;{&lt;br /&gt;    public class UnityGenericContainer : IIoCGenericContainer&lt;br /&gt;    {&lt;br /&gt;        private IUnityContainer container;&lt;br /&gt;&lt;br /&gt;        public UnityGenericContainer(IUnityContainer container)&lt;br /&gt;        {&lt;br /&gt;            this.container = container;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        #region IGenericContainer Members&lt;br /&gt;&lt;br /&gt;        public TType Resolve&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;TType&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;()&lt;br /&gt;        {&lt;br /&gt;            return this.container.Resolve&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;TType&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public TType TryResolve&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;TType&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;()&lt;br /&gt;        {&lt;br /&gt;            TType result;&lt;br /&gt;&lt;br /&gt;            try&lt;br /&gt;            {&lt;br /&gt;                result = this.container.Resolve&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;TType&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;();&lt;br /&gt;            }&lt;br /&gt;            catch (Exception)&lt;br /&gt;            {&lt;br /&gt;                result = default(TType);&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            return result;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public void RegisterType&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;()&lt;br /&gt;        {&lt;br /&gt;            this.container.RegisterType&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public void RegisterType&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;(bool singleton)&lt;br /&gt;        {&lt;br /&gt;            if (singleton)&lt;br /&gt;            {&lt;br /&gt;                this.container.RegisterType&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;(new ContainerControlledLifetimeManager());&lt;br /&gt;            }&lt;br /&gt;            else&lt;br /&gt;            {&lt;br /&gt;                this.container.RegisterType&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;();&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public void RegisterType&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;TFrom&lt;/span&gt;, &lt;span class=&quot;attr&quot;&gt;TTo&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;(bool singleton) where TTo : TFrom&lt;br /&gt;        {&lt;br /&gt;            if (singleton)&lt;br /&gt;            {&lt;br /&gt;                this.container.RegisterType&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;TFrom&lt;/span&gt;, &lt;span class=&quot;attr&quot;&gt;TTo&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;(new ContainerControlledLifetimeManager());&lt;br /&gt;            }&lt;br /&gt;            else&lt;br /&gt;            {&lt;br /&gt;                this.container.RegisterType&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;TFrom&lt;/span&gt;, &lt;span class=&quot;attr&quot;&gt;TTo&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;();&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public void RegisterInstance&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;TInterface&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;(TInterface instance, bool singleton)&lt;br /&gt;        {&lt;br /&gt;            if (singleton)&lt;br /&gt;            {&lt;br /&gt;                this.container.RegisterInstance&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;TInterface&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;(instance, new ContainerControlledLifetimeManager());&lt;br /&gt;            }&lt;br /&gt;            else&lt;br /&gt;            {&lt;br /&gt;                this.container.RegisterInstance&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;TInterface&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;(instance);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public void RegisterInstance&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;TInterface&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;(TInterface instance)&lt;br /&gt;        {&lt;br /&gt;            this.container.RegisterInstance&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;TInterface&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;(instance);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        public object Resolve(Type t)&lt;br /&gt;        {&lt;br /&gt;            return this.container.Resolve(t);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public IEnumerable&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;object&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt; ResolveAll(Type t)&lt;br /&gt;        {&lt;br /&gt;            return this.container.ResolveAll(t);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public IEnumerable&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt; ResolveAll&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;()&lt;br /&gt;        {&lt;br /&gt;            return this.container.ResolveAll&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public void RegisterType&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;TFrom&lt;/span&gt;, &lt;span class=&quot;attr&quot;&gt;TTo&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;() where TTo : TFrom&lt;br /&gt;        {&lt;br /&gt;            this.container.RegisterType&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;TFrom&lt;/span&gt;, &lt;span class=&quot;attr&quot;&gt;TTo&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public void RegisterInstance(object instance)&lt;br /&gt;        {&lt;br /&gt;            this.container.RegisterInstance(instance);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        #endregion&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;  </content><link rel='replies' type='text/html' href='http://code-d-code.blogspot.com/2013/08/unity-generic-container-interface.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3913109781491284713/posts/default/4205690844390004065'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3913109781491284713/posts/default/4205690844390004065'/><link rel='alternate' type='text/html' href='http://code-d-code.blogspot.com/2013/08/unity-generic-container-interface.html' title='Unity Generic Container Interface Implementation'/><author><name>gee</name><uri>http://www.blogger.com/profile/07498990196349740374</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3913109781491284713.post-3521101693269437568</id><published>2013-08-25T20:57:00.001+01:00</published><updated>2013-08-25T20:57:23.546+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="IoC"/><category scheme="http://www.blogger.com/atom/ns#" term="Ninject"/><title type='text'>Ninject Generic Container Interface Implementation</title><content type='html'>&lt;p&gt;An implementation of the IIoCGenericContainer interface for the Ninject container.&lt;/p&gt;  &lt;div id=&quot;codeSnippetWrapper&quot;&gt;   &lt;pre id=&quot;codeSnippet&quot; class=&quot;csharpcode&quot;&gt;using System;&lt;br /&gt;using Ninject;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;&lt;br /&gt;namespace IoC&lt;br /&gt;{&lt;br /&gt;    public class NinjectGenericContainer : IIoCGenericContainer&lt;br /&gt;    {&lt;br /&gt;        IKernel kernel;&lt;br /&gt;&lt;br /&gt;        public NinjectGenericContainer(IKernel kernel)&lt;br /&gt;        {&lt;br /&gt;            this.kernel = kernel;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        public object Resolve(Type t)&lt;br /&gt;        {&lt;br /&gt;            return this.kernel.Get(t);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public T Resolve&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;()&lt;br /&gt;        {&lt;br /&gt;            return this.kernel.Get&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public T TryResolve&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;()&lt;br /&gt;        {&lt;br /&gt;            return this.kernel.TryGet&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public IEnumerable&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;object&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt; ResolveAll(Type t)&lt;br /&gt;        {&lt;br /&gt;            return this.kernel.GetAll(t);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public IEnumerable&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt; ResolveAll&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;()&lt;br /&gt;        {&lt;br /&gt;            return this.kernel.GetAll&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public void RegisterType&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;()&lt;br /&gt;        {&lt;br /&gt;            this.kernel.Bind&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;().ToSelf();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public void RegisterType&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;(bool singleton)&lt;br /&gt;        {&lt;br /&gt;            if (singleton)&lt;br /&gt;            {&lt;br /&gt;                this.kernel.Bind&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;().ToSelf().InSingletonScope();&lt;br /&gt;            }&lt;br /&gt;            else&lt;br /&gt;            {&lt;br /&gt;                this.RegisterType&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;();&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public void RegisterType&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;TFrom&lt;/span&gt;, &lt;span class=&quot;attr&quot;&gt;TTo&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;() where TTo : TFrom&lt;br /&gt;        {&lt;br /&gt;            this.kernel.Bind&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;TFrom&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;().To&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;TTo&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public void RegisterType&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;TFrom&lt;/span&gt;, &lt;span class=&quot;attr&quot;&gt;TTo&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;(bool singleton) where TTo : TFrom&lt;br /&gt;        {&lt;br /&gt;            if (singleton)&lt;br /&gt;            {&lt;br /&gt;                this.kernel.Bind&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;TFrom&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;().To&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;TTo&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;().InSingletonScope();&lt;br /&gt;            }&lt;br /&gt;            else&lt;br /&gt;            {&lt;br /&gt;                RegisterType&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;TFrom&lt;/span&gt;, &lt;span class=&quot;attr&quot;&gt;TTo&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;();&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public void RegisterInstance(object instance)&lt;br /&gt;        {&lt;br /&gt;            this.kernel.Inject(instance);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public void RegisterInstance&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;TInterface&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;(TInterface instance)&lt;br /&gt;        {&lt;br /&gt;            this.kernel.Inject(instance);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public void RegisterInstance&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;TInterface&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;(TInterface instance, bool singleton)&lt;br /&gt;        {&lt;br /&gt;            throw new NotImplementedException();&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;  </content><link rel='replies' type='text/html' href='http://code-d-code.blogspot.com/2013/08/ninject-generic-container-interface.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3913109781491284713/posts/default/3521101693269437568'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3913109781491284713/posts/default/3521101693269437568'/><link rel='alternate' type='text/html' href='http://code-d-code.blogspot.com/2013/08/ninject-generic-container-interface.html' title='Ninject Generic Container Interface Implementation'/><author><name>gee</name><uri>http://www.blogger.com/profile/07498990196349740374</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3913109781491284713.post-1866113347499032151</id><published>2013-08-25T00:35:00.000+01:00</published><updated>2013-08-25T00:35:00.482+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="IoC"/><title type='text'>IoC Generic Container Interface</title><content type='html'>&lt;p&gt;A generic interface that can be implemented for different IoC containers. By using the interface switching between container implementations would be easy, particularly helpfull when testing the use of a container.&lt;/p&gt;  &lt;div id=&quot;codeSnippetWrapper&quot;&gt;   &lt;pre id=&quot;codeSnippet&quot; class=&quot;csharpcode&quot;&gt;using System;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;&lt;br /&gt;namespace IoC&lt;br /&gt;{&lt;br /&gt;    public interface IIoCGenericContainer&lt;br /&gt;    {&lt;br /&gt;        object Resolve(Type t);&lt;br /&gt;&lt;br /&gt;        T Resolve&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;();&lt;br /&gt;&lt;br /&gt;        T TryResolve&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;();&lt;br /&gt;&lt;br /&gt;        IEnumerable&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;object&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt; ResolveAll(Type t);&lt;br /&gt;&lt;br /&gt;        IEnumerable&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt; ResolveAll&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;();&lt;br /&gt;&lt;br /&gt;        void RegisterType&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;();&lt;br /&gt;&lt;br /&gt;        void RegisterType&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;(bool singleton);&lt;br /&gt;&lt;br /&gt;        void RegisterType&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;TFrom&lt;/span&gt;, &lt;span class=&quot;attr&quot;&gt;TTo&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;() where TTo : TFrom;&lt;br /&gt;&lt;br /&gt;        void RegisterType&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;TFrom&lt;/span&gt;, &lt;span class=&quot;attr&quot;&gt;TTo&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;(bool singleton) where TTo : TFrom;&lt;br /&gt;&lt;br /&gt;        void RegisterInstance(object instance);&lt;br /&gt;&lt;br /&gt;        void RegisterInstance&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;TInterface&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;(TInterface instance);&lt;br /&gt;&lt;br /&gt;        void RegisterInstance&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;TInterface&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;(TInterface instance, bool singleton);&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;  </content><link rel='replies' type='text/html' href='http://code-d-code.blogspot.com/2013/08/ioc-generic-container-interface.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3913109781491284713/posts/default/1866113347499032151'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3913109781491284713/posts/default/1866113347499032151'/><link rel='alternate' type='text/html' href='http://code-d-code.blogspot.com/2013/08/ioc-generic-container-interface.html' title='IoC Generic Container Interface'/><author><name>gee</name><uri>http://www.blogger.com/profile/07498990196349740374</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3913109781491284713.post-50888589148729308</id><published>2012-04-30T15:45:00.001+01:00</published><updated>2012-07-18T15:38:53.363+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="GPS"/><category scheme="http://www.blogger.com/atom/ns#" term="WP7"/><title type='text'>Use Windows Phone GPS Emulator with a desktop application</title><content type='html'>Windows phone GPS emulator as the name suggests is a GPS emulator desktop application that helps you debug your windows phone 7 gps client application. You can get hold of the &lt;a href=&quot;http://create.msdn.com/en-us/education/catalog/article/GPS-Emulator&quot; target=&quot;_blank&quot; title=&quot;GPS Emulator&quot;&gt;GPS Emulator here&lt;/a&gt;.&lt;br&gt;
&lt;a href=&quot;http://code-d-code.blogspot.com/2012/04/use-windows-phone-gps-emulator-with.html#more&quot;&gt;Read more »&lt;/a&gt;</content><link rel='replies' type='text/html' href='http://code-d-code.blogspot.com/2012/04/use-windows-phone-gps-emulator-with.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3913109781491284713/posts/default/50888589148729308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3913109781491284713/posts/default/50888589148729308'/><link rel='alternate' type='text/html' href='http://code-d-code.blogspot.com/2012/04/use-windows-phone-gps-emulator-with.html' title='Use Windows Phone GPS Emulator with a desktop application'/><author><name>gee</name><uri>http://www.blogger.com/profile/07498990196349740374</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3913109781491284713.post-5282590719373345594</id><published>2012-04-20T00:26:00.001+01:00</published><updated>2012-04-20T00:28:45.461+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="WLW"/><category scheme="http://www.blogger.com/atom/ns#" term="Xslt"/><category scheme="http://www.blogger.com/atom/ns#" term="XsltPlugin"/><title type='text'>Place Google ads inline your blog post using XsltPlugin</title><content type='html'>&lt;div style=&quot;padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px&quot; id=&quot;scid:514f8bdc-1c58-4e9c-ab94-19b3945b55fd:0470e62c-664f-47c1-9c5f-d51404226c29&quot; class=&quot;wlWriterEditableSmartContent&quot;&gt;&lt;div class=&quot;&quot; style=&quot;text-align: center &quot;&gt;  &lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-4268910085464607&quot;;
/* Prog, 234x60, created 1/16/11 */
google_ad_slot = &quot;1220170560&quot;;
google_ad_width = 234;
google_ad_height = 60;
//--&gt;
&lt;/script&gt; &lt;script type=&quot;text/javascript&quot; src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;  &lt;/div&gt;&lt;/div&gt;  &lt;p&gt;Create an xml file where you will be keeping the adsense code for your ads. Between the CDATA sections you should put your adsense code for each ad. Give it a name ie. “ads.xml” and save it. It should be similar to this:&lt;/p&gt;  &lt;a href=&quot;http://code-d-code.blogspot.com/2012/04/place-google-ads-inline-your-blog-post.html#more&quot;&gt;Read more »&lt;/a&gt;</content><link rel='replies' type='text/html' href='http://code-d-code.blogspot.com/2012/04/place-google-ads-inline-your-blog-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3913109781491284713/posts/default/5282590719373345594'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3913109781491284713/posts/default/5282590719373345594'/><link rel='alternate' type='text/html' href='http://code-d-code.blogspot.com/2012/04/place-google-ads-inline-your-blog-post.html' title='Place Google ads inline your blog post using XsltPlugin'/><author><name>gee</name><uri>http://www.blogger.com/profile/07498990196349740374</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3913109781491284713.post-7674171806044043102</id><published>2012-02-19T16:57:00.001+00:00</published><updated>2012-02-20T00:22:07.840+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="WLW"/><category scheme="http://www.blogger.com/atom/ns#" term="Xslt"/><category scheme="http://www.blogger.com/atom/ns#" term="XsltPlugin"/><title type='text'>Insert Rss feed items using the WLW XsltPlugin</title><content type='html'>&lt;div style=&quot;padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px&quot; id=&quot;scid:514f8bdc-1c58-4e9c-ab94-19b3945b55fd:218bb40b-8ef4-4f05-88c5-6f4a25ce9425&quot; class=&quot;wlWriterEditableSmartContent&quot;&gt;&lt;div class=&quot;&quot; style=&quot;text-align: center &quot;&gt;  &lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-4268910085464607&quot;;
/* banner 468x60 */
google_ad_slot = &quot;2835026479&quot;;
google_ad_width = 468;
google_ad_height = 60;
//--&gt;
&lt;/script&gt; &lt;script type=&quot;text/javascript&quot; src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;  &lt;/div&gt;&lt;/div&gt;  &lt;p&gt;Choose an rss feed address. For the sake of this example we are choosing the rss feed of &lt;a href=&quot;http://feeds.mashable.com/Mashable&quot;&gt;Mashable(http://feeds.mashable.com/Mashable)&lt;/a&gt;. Now using a text editor copy and paste the following piece of xslt into a file and save it as ie. rsslinks.xslt:&lt;/p&gt;  &lt;a href=&quot;http://code-d-code.blogspot.com/2012/02/insert-rss-feed-items-using-wlw.html#more&quot;&gt;Read more »&lt;/a&gt;</content><link rel='replies' type='text/html' href='http://code-d-code.blogspot.com/2012/02/insert-rss-feed-items-using-wlw.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3913109781491284713/posts/default/7674171806044043102'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3913109781491284713/posts/default/7674171806044043102'/><link rel='alternate' type='text/html' href='http://code-d-code.blogspot.com/2012/02/insert-rss-feed-items-using-wlw.html' title='Insert Rss feed items using the WLW XsltPlugin'/><author><name>gee</name><uri>http://www.blogger.com/profile/07498990196349740374</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3913109781491284713.post-2665290143484644986</id><published>2012-02-15T16:51:00.001+00:00</published><updated>2012-04-20T00:29:43.085+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="NuGet"/><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio"/><title type='text'>Using NuGet with a central repository</title><content type='html'>&lt;p&gt;It may be suited  to your development process to use a central repository where all the NuGet packages you use in different projects are kept. That way you don’t have various packages scattered around in your pc or if you archive references you can keep doing so or if you don’t have internet connection you can still use existing packages from the central repository.&lt;/p&gt;  &lt;a href=&quot;http://code-d-code.blogspot.com/2012/02/using-nuget-with-central-repository.html#more&quot;&gt;Read more »&lt;/a&gt;</content><link rel='replies' type='text/html' href='http://code-d-code.blogspot.com/2012/02/using-nuget-with-central-repository.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3913109781491284713/posts/default/2665290143484644986'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3913109781491284713/posts/default/2665290143484644986'/><link rel='alternate' type='text/html' href='http://code-d-code.blogspot.com/2012/02/using-nuget-with-central-repository.html' title='Using NuGet with a central repository'/><author><name>gee</name><uri>http://www.blogger.com/profile/07498990196349740374</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3913109781491284713.post-2546065949456468437</id><published>2012-02-13T01:30:00.001+00:00</published><updated>2012-05-04T00:22:48.629+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="WLW"/><category scheme="http://www.blogger.com/atom/ns#" term="Xslt"/><category scheme="http://www.blogger.com/atom/ns#" term="XsltPlugin"/><title type='text'>Xslt Plugin for Windows Live Writer</title><content type='html'>&lt;p&gt;A plugin for the Windows LIve Writer blogging software was developed. A simple but yet a very powerful plugin that can make your blog posts more pretty and customised to your liking. The Xslt plugin can transform your content data. The plugin offers the benefit of preparing an xslt template that can be reused, can have css formatting and can be applied to the matched xml content data. &lt;/p&gt;  &lt;a href=&quot;http://code-d-code.blogspot.com/2012/02/xslt-plugin-for-windows-live-writer.html#more&quot;&gt;Read more »&lt;/a&gt;</content><link rel='replies' type='text/html' href='http://code-d-code.blogspot.com/2012/02/xslt-plugin-for-windows-live-writer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3913109781491284713/posts/default/2546065949456468437'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3913109781491284713/posts/default/2546065949456468437'/><link rel='alternate' type='text/html' href='http://code-d-code.blogspot.com/2012/02/xslt-plugin-for-windows-live-writer.html' title='Xslt Plugin for Windows Live Writer'/><author><name>gee</name><uri>http://www.blogger.com/profile/07498990196349740374</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3913109781491284713.post-953134576574366045</id><published>2011-01-04T17:17:00.000+00:00</published><updated>2011-01-04T20:44:22.255+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="html5"/><category scheme="http://www.blogger.com/atom/ns#" term="iphone"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="mobile"/><category scheme="http://www.blogger.com/atom/ns#" term="RDL"/><category scheme="http://www.blogger.com/atom/ns#" term="WPF"/><title type='text'>Search trip from IDisposable to RDL</title><content type='html'>&lt;p&gt;I opened the codeproject’s newsletter I am subscribed and picked a few articles. I picked those that were relevant to the things I am interested more,  I have worked in the past or relate to an idea that I am working on it. At first I read this article about &lt;a title=&quot;about IDisposable&quot; href=&quot;http://blogs.msdn.com/b/nicgrave/archive/2010/12/28/using-idisposable-objects.aspx&quot; target=&quot;_blank&quot;&gt;IDisposable&lt;/a&gt; because an article about IDisposable is always interesting. It presents the right way to use this interface or at least it attempts to. &lt;/p&gt;  &lt;a href=&quot;http://code-d-code.blogspot.com/2011/01/search-trip-from-idisposable-to-rdl.html#more&quot;&gt;Read more »&lt;/a&gt;</content><link rel='replies' type='text/html' href='http://code-d-code.blogspot.com/2011/01/search-trip-from-idisposable-to-rdl.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3913109781491284713/posts/default/953134576574366045'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3913109781491284713/posts/default/953134576574366045'/><link rel='alternate' type='text/html' href='http://code-d-code.blogspot.com/2011/01/search-trip-from-idisposable-to-rdl.html' title='Search trip from IDisposable to RDL'/><author><name>gee</name><uri>http://www.blogger.com/profile/07498990196349740374</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3913109781491284713.post-1360187139470270638</id><published>2010-12-25T23:16:00.001+00:00</published><updated>2010-12-26T04:46:24.557+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="CLR"/><category scheme="http://www.blogger.com/atom/ns#" term="Database"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><title type='text'>How to use CLR in the MSSQL server</title><content type='html'>&lt;p&gt;To use the CLR in MSSQL Server you need to enable CLR Integration first. It can be enabled in the sql server surface area configuration.&lt;/p&gt;  &lt;a href=&quot;http://code-d-code.blogspot.com/2010/12/how-to-use-clr-in-mssql-server.html#more&quot;&gt;Read more »&lt;/a&gt;</content><link rel='replies' type='text/html' href='http://code-d-code.blogspot.com/2010/12/how-to-use-clr-in-mssql-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3913109781491284713/posts/default/1360187139470270638'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3913109781491284713/posts/default/1360187139470270638'/><link rel='alternate' type='text/html' href='http://code-d-code.blogspot.com/2010/12/how-to-use-clr-in-mssql-server.html' title='How to use CLR in the MSSQL server'/><author><name>gee</name><uri>http://www.blogger.com/profile/07498990196349740374</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3913109781491284713.post-5087160390511016755</id><published>2010-05-20T17:00:00.001+01:00</published><updated>2010-12-26T04:42:11.755+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><category scheme="http://www.blogger.com/atom/ns#" term="T4"/><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio"/><title type='text'>A T4 Generator Tool for VS Express</title><content type='html'>&lt;div style=&quot;padding-bottom: 4px; margin: 0px; padding-left: 8px; padding-right: 0px; float: right; padding-top: 0px&quot;&gt;&lt;/div&gt;  &lt;p&gt;T4 stands for Text Templating Transformation Toolkit which is a transformation engine built into all VS studio editions. In a few words, you can write a text template file which consists of plain text and source code wrapped around the T4 language notation. The T4 notation is similar to the ASP.NET design page source code. You indicate directives by using &amp;lt;#@ tags, statements with &amp;lt;# tags, and expressions with &amp;lt;#= tags. Below is a simple T4 template.&lt;/p&gt;  &lt;pre class=&quot;csharpcode&quot;&gt;&amp;lt;#@ template debug=&lt;span class=&quot;str&quot;&gt;&amp;quot;true&amp;quot;&lt;/span&gt; language=&lt;span class=&quot;str&quot;&gt;&amp;quot;C#v3.5&amp;quot;&lt;/span&gt;#&amp;gt;
&amp;lt;#@ Import Namespace=&lt;span class=&quot;str&quot;&gt;&amp;quot;System.Linq&amp;quot;&lt;/span&gt; #&amp;gt;
&amp;lt;#@ Assembly Name=&lt;span class=&quot;str&quot;&gt;&amp;quot;System.Core,Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&amp;quot;&lt;/span&gt; #&amp;gt;
&amp;lt;#@ output extension=&lt;span class=&quot;str&quot;&gt;&amp;quot;.cs&amp;quot;&lt;/span&gt; #&amp;gt;
&amp;lt;# WriteLine(&lt;span class=&quot;str&quot;&gt;@&amp;quot;Hello World&amp;quot;&lt;/span&gt;);#&amp;gt;&lt;/pre&gt;

&lt;a href=&quot;http://code-d-code.blogspot.com/2010/05/t4-generator-tool-for-vs-express.html#more&quot;&gt;Read more »&lt;/a&gt;</content><link rel='replies' type='text/html' href='http://code-d-code.blogspot.com/2010/05/t4-generator-tool-for-vs-express.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3913109781491284713/posts/default/5087160390511016755'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3913109781491284713/posts/default/5087160390511016755'/><link rel='alternate' type='text/html' href='http://code-d-code.blogspot.com/2010/05/t4-generator-tool-for-vs-express.html' title='A T4 Generator Tool for VS Express'/><author><name>gee</name><uri>http://www.blogger.com/profile/07498990196349740374</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3913109781491284713.post-1413563717832266094</id><published>2010-04-18T19:28:00.000+01:00</published><updated>2010-12-26T04:55:41.496+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="SOAP"/><category scheme="http://www.blogger.com/atom/ns#" term="WebServices"/><category scheme="http://www.blogger.com/atom/ns#" term="WSDL"/><title type='text'>Reverse Engineer a Web Service from the existing WSDL</title><content type='html'>&lt;p&gt;Sometimes you need to create the web service methods and you only have the web service description file(wsdl) as a staring point. You can utilise the wsdl.exe tool to generate the web service&amp;#39;s server stub methods. This file exists in Program Files\Microsoft SDKs\Windows\v6.0A\bin\ if you have the VS express edition installed or somewhere in the VS installation folders if you have other editions. Just by running : &lt;/p&gt;  &lt;a href=&quot;http://code-d-code.blogspot.com/2010/04/reverse-engineer-web-service-from.html#more&quot;&gt;Read more »&lt;/a&gt;</content><link rel='replies' type='text/html' href='http://code-d-code.blogspot.com/2010/04/reverse-engineer-web-service-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3913109781491284713/posts/default/1413563717832266094'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3913109781491284713/posts/default/1413563717832266094'/><link rel='alternate' type='text/html' href='http://code-d-code.blogspot.com/2010/04/reverse-engineer-web-service-from.html' title='Reverse Engineer a Web Service from the existing WSDL'/><author><name>gee</name><uri>http://www.blogger.com/profile/07498990196349740374</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3913109781491284713.post-4994836010291437449</id><published>2010-03-30T17:56:00.000+01:00</published><updated>2010-12-26T05:06:20.635+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Database"/><category scheme="http://www.blogger.com/atom/ns#" term="ORM"/><category scheme="http://www.blogger.com/atom/ns#" term="Subsonic"/><category scheme="http://www.blogger.com/atom/ns#" term="T4"/><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio"/><title type='text'>How to use Subsonic 3 T4 templates in VS Express</title><content type='html'>&lt;p&gt;Subsonic is an ORM tool that works up your database access and can speed your development cycle. It can be downloaded from &lt;a title=&quot;Subsonic&quot; href=&quot;http://subsonicproject.com/&quot; rel=&quot;tag&quot; target=&quot;_blank&quot;&gt;Subsonic&lt;/a&gt;. To use subsonic in your visual studio express project you can follow the steps below:&lt;/p&gt;  &lt;a href=&quot;http://code-d-code.blogspot.com/2010/03/how-to-use-subsonic-3-t4-templates-in.html#more&quot;&gt;Read more »&lt;/a&gt;</content><link rel='replies' type='text/html' href='http://code-d-code.blogspot.com/2010/03/how-to-use-subsonic-3-t4-templates-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3913109781491284713/posts/default/4994836010291437449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3913109781491284713/posts/default/4994836010291437449'/><link rel='alternate' type='text/html' href='http://code-d-code.blogspot.com/2010/03/how-to-use-subsonic-3-t4-templates-in.html' title='How to use Subsonic 3 T4 templates in VS Express'/><author><name>gee</name><uri>http://www.blogger.com/profile/07498990196349740374</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>