Commit 7e72e49

mo khan <mo@mokhan.ca>
2010-04-25 06:24:30
hooked up unit of work around receving messages from queue.
1 parent 7142a80
product/client/presentation.windows/bootstrappers/Bootstrapper.cs
@@ -11,7 +11,6 @@ using gorilla.commons.utility;
 using MoMoney.Service.Infrastructure.Eventing;
 using MoMoney.Service.Infrastructure.Threading;
 using presentation.windows.common;
-using presentation.windows.common.messages;
 using presentation.windows.presenters;
 using presentation.windows.queries;
 using presentation.windows.service.infrastructure;
@@ -25,7 +24,10 @@ namespace presentation.windows.bootstrappers
         static public ShellWindow create_window()
         {
             var builder = new ContainerBuilder();
-            Resolve.initialize_with(new AutofacDependencyRegistryBuilder(builder).build());
+            var registry = new AutofacDependencyRegistryBuilder(builder).build();
+            Resolve.initialize_with(registry);
+            builder.Register(x => registry).As<DependencyRegistry>().SingletonScoped();
+
             var shell_window = new ShellWindow();
             builder.Register(x => shell_window).SingletonScoped();
             builder.Register(x => shell_window).As<RegionManager>().SingletonScoped();
@@ -39,7 +41,7 @@ namespace presentation.windows.bootstrappers
             builder.Register<Log4NetLogFactory>().As<LogFactory>().SingletonScoped();
             builder.Register<DefaultMapper>().As<Mapper>().SingletonScoped();
 
-            var manager = new QueueManager(new IPEndPoint(IPAddress.Loopback, 2201),"client.esent");
+            var manager = new QueueManager(new IPEndPoint(IPAddress.Loopback, 2201), "client.esent");
             manager.CreateQueues("client");
             builder.Register(x => new RhinoPublisher("server", 2200, manager)).As<ServiceBus>().SingletonScoped();
             builder.Register(x => new RhinoReceiver(manager.GetQueue("client"))).As<RhinoReceiver>().As<Receiver>().SingletonScoped();
@@ -68,7 +70,6 @@ namespace presentation.windows.bootstrappers
             builder.Register<WpfCommandBuilder>().As<UICommandBuilder>();
 
             // queries
-            builder.Register<FindAllFamily>();
             builder.Register<ContainerAwareQueryBuilder>().As<QueryBuilder>();
 
             Resolve.the<IEnumerable<NeedStartup>>().each(x => x.run());
product/client/presentation.windows/bootstrappers/StartServiceBus.cs
@@ -1,4 +1,3 @@
-using System;
 using System.Threading;
 using Gorilla.Commons.Infrastructure.Container;
 using presentation.windows.common;
@@ -11,8 +10,16 @@ namespace presentation.windows.bootstrappers
         public void run()
         {
             var receiver = Resolve.the<RhinoReceiver>();
-            receiver.register(x => Console.Out.WriteLine(x));
-            ThreadPool.QueueUserWorkItem(x => receiver.run());
+            var handler = new MessageHandler(Resolve.the<DependencyRegistry>());
+            receiver.register(x =>
+            {
+                // synchronize with ui thread?
+                handler.handler(x);
+            });
+            ThreadPool.QueueUserWorkItem(x =>
+            {
+                receiver.run();
+            });
 
             Resolve.the<ServiceBus>().publish<StartedApplication>(x => x.message = "client");
         }
product/client/service.infrastructure/transactions/IUnitOfWorkFactory.cs
@@ -1,6 +1,6 @@
-using gorilla.commons.utility;
-
-namespace momoney.service.infrastructure.transactions
-{
-    public interface IUnitOfWorkFactory : Factory<IUnitOfWork> {}
+using gorilla.commons.utility;
+
+namespace momoney.service.infrastructure.transactions
+{
+    public interface IUnitOfWorkFactory : Factory<IUnitOfWork> {}
 }
\ No newline at end of file
product/presentation.windows.common/messages/AddedNewFamilyMember.cs
@@ -1,13 +1,18 @@
 using System;
 using MoMoney.Service.Infrastructure.Eventing;
+using ProtoBuf;
 
 namespace presentation.windows.common.messages
 {
     [Serializable]
+    [ProtoContract]
     public class AddedNewFamilyMember : IEvent
     {
+        [ProtoMember(1)]
         public Guid id { get; set; }
+        [ProtoMember(2)]
         public string first_name { get; set; }
+        [ProtoMember(3)]
         public string last_name { get; set; }
     }
 }
\ No newline at end of file
product/presentation.windows.common/messages/CreateNewAccount.cs
@@ -1,11 +1,15 @@
 using System;
+using ProtoBuf;
 
 namespace presentation.windows.common.messages
 {
     [Serializable]
+    [ProtoContract]
     public class CreateNewAccount
     {
+        [ProtoMember(1)]
         public string account_name { get; set; }
+        [ProtoMember(2)]
         public string currency { get; set; }
     }
 }
\ No newline at end of file
product/presentation.windows.common/messages/FamilyMemberToAdd.cs
@@ -1,14 +1,17 @@
 using System;
+using ProtoBuf;
 
 namespace presentation.windows.common.messages
 {
     [Serializable]
+    [ProtoContract]
     public class FamilyMemberToAdd
     {
+        [ProtoMember(1)]
         public string first_name { get; set; }
-
+        [ProtoMember(2)]
         public string last_name { get; set; }
-
+        [ProtoMember(3)]
         public DateTime date_of_birth { get; set; }
     }
 }
\ No newline at end of file
product/presentation.windows.common/messages/FindAllFamily.cs
@@ -1,7 +1,9 @@
 using System;
+using ProtoBuf;
 
 namespace presentation.windows.common.messages
 {
     [Serializable]
+    [ProtoContract]
     public class FindAllFamily {}
 }
\ No newline at end of file
product/presentation.windows.common/messages/NewAccountCreated.cs
@@ -1,10 +1,13 @@
 using System;
+using ProtoBuf;
 
 namespace presentation.windows.common.messages
 {
     [Serializable]
+    [ProtoContract]
     public class NewAccountCreated
     {
+        [ProtoMember(1)]
         public string name { get; set; }
     }
 }
\ No newline at end of file
product/presentation.windows.common/messages/StartedApplication.cs
@@ -1,10 +1,13 @@
 using System;
+using ProtoBuf;
 
 namespace presentation.windows.common.messages
 {
     [Serializable]
+    [ProtoContract]
     public class StartedApplication
     {
+        [ProtoMember(1)]
         public string message { get; set; }
     }
 }
\ No newline at end of file
product/presentation.windows.common/AbstractHandler.cs
@@ -0,0 +1,19 @@
+using System;
+
+namespace presentation.windows.common
+{
+    public abstract class AbstractHandler<T> : Handler<T>, Handler
+    {
+        public bool can_handle(Type type)
+        {
+            return typeof (T).Equals(type);
+        }
+
+        public void handle(object item)
+        {
+            handle((T) item);
+        }
+
+        public abstract void handle(T item);
+    }
+}
\ No newline at end of file
product/presentation.windows.common/Handler.cs
@@ -0,0 +1,15 @@
+using System;
+
+namespace presentation.windows.common
+{
+    public interface Handler
+    {
+        bool can_handle(Type type);
+        void handle(object item);
+    }
+
+    public interface Handler<T>
+    {
+        void handle(T item);
+    }
+}
\ No newline at end of file
product/presentation.windows.common/MessageHandler.cs
@@ -0,0 +1,30 @@
+using System.IO;
+using System.Runtime.Serialization.Formatters.Binary;
+using Gorilla.Commons.Infrastructure.Container;
+using Gorilla.Commons.Infrastructure.Logging;
+using gorilla.commons.utility;
+using Rhino.Queues.Model;
+
+namespace presentation.windows.common
+{
+    public class MessageHandler
+    {
+        BinaryFormatter formatter = new BinaryFormatter();
+        DependencyRegistry registry;
+
+        public MessageHandler(DependencyRegistry registry)
+        {
+            this.registry = registry;
+        }
+
+        public void handler(Message item)
+        {
+            using (var stream = new MemoryStream(item.Data))
+            {
+                var payload = formatter.Deserialize(stream);
+                registry.get_all<Handler>().where(x => x.can_handle(payload.GetType())).each(x => x.handle(payload));
+                this.log().debug("received: {0}", payload);
+            }
+        }
+    }
+}
\ No newline at end of file
product/presentation.windows.common/presentation.windows.common.csproj
@@ -47,6 +47,10 @@
       <SpecificVersion>False</SpecificVersion>
       <HintPath>..\..\build\lib\app\nhibernate\FluentNHibernate.dll</HintPath>
     </Reference>
+    <Reference Include="protobuf-net, Version=1.0.0.282, Culture=neutral, PublicKeyToken=257b51d87d2e4d67, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\thirdparty\proto-buf.net\protobuf-net.dll</HintPath>
+    </Reference>
     <Reference Include="Rhino.Queues, Version=1.2.0.0, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <HintPath>..\..\thirdparty\rhino.queues\Rhino.Queues.dll</HintPath>
@@ -67,7 +71,10 @@
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="AbstractHandler.cs" />
     <Compile Include="DefaultMapper.cs" />
+    <Compile Include="Handler.cs" />
+    <Compile Include="MessageHandler.cs" />
     <Compile Include="messages\AddedNewFamilyMember.cs" />
     <Compile Include="messages\CreateNewAccount.cs" />
     <Compile Include="messages\FamilyMemberToAdd.cs" />
@@ -87,6 +94,10 @@
       <Project>{81412692-F3EE-4FBF-A7C7-69454DD1BD46}</Project>
       <Name>service.infrastructure</Name>
     </ProjectReference>
+    <ProjectReference Include="..\commons\infrastructure\infrastructure.csproj">
+      <Project>{AA5EEED9-4531-45F7-AFCD-AD9717D2E405}</Project>
+      <Name>infrastructure</Name>
+    </ProjectReference>
     <ProjectReference Include="..\commons\utility\utility.csproj">
       <Project>{DD8FD29E-7424-415C-9BA3-7D9F6ECBA161}</Project>
       <Name>utility</Name>
product/presentation.windows.common/RhinoPublisher.cs
@@ -3,6 +3,7 @@ using System.IO;
 using System.Runtime.Serialization.Formatters.Binary;
 using System.Transactions;
 using gorilla.commons.utility;
+using ProtoBuf;
 using Rhino.Queues;
 
 namespace presentation.windows.common
@@ -30,11 +31,11 @@ namespace presentation.windows.common
         {
             using (var tx = new TransactionScope())
             {
-                var buffer = new byte[255];
-                using (var stream = new MemoryStream(buffer))
+                using (var stream = new MemoryStream())
                 {
+                    //Serializer.Serialize(stream, item);
                     formatter.Serialize(stream, item);
-                    sender.Send(new Uri("rhino.queues://localhost:{0}/{1}".formatted_using(port, destination_queue)), new MessagePayload {Data = buffer});
+                    sender.Send(new Uri("rhino.queues://localhost:{0}/{1}".formatted_using(port, destination_queue)), new MessagePayload {Data = stream.ToArray()});
                 }
                 tx.Complete();
             }
product/presentation.windows.server/handlers/AddNewFamilyMemberHandler.cs
@@ -5,7 +5,7 @@ using presentation.windows.server.orm;
 
 namespace presentation.windows.server.handlers
 {
-    public class AddNewFamilyMemberHandler : Handler<FamilyMemberToAdd>
+    public class AddNewFamilyMemberHandler : AbstractHandler<FamilyMemberToAdd>
     {
         PersonRepository people;
         ServiceBus bus;
@@ -16,7 +16,7 @@ namespace presentation.windows.server.handlers
             this.bus = bus;
         }
 
-        public void handle(FamilyMemberToAdd item)
+        public override void handle(FamilyMemberToAdd item)
         {
             var person = Person.New(item.first_name, item.last_name, item.date_of_birth);
             people.save(person);
product/presentation.windows.server/handlers/FindAllFamilyHandler.cs
@@ -6,7 +6,7 @@ using presentation.windows.server.orm;
 
 namespace presentation.windows.server.handlers
 {
-    public class FindAllFamilyHandler : Handler<FindAllFamily>
+    public class FindAllFamilyHandler : AbstractHandler<FindAllFamily>
     {
         PersonRepository people;
         Mapper mapper;
@@ -19,7 +19,7 @@ namespace presentation.windows.server.handlers
             this.mapper = mapper;
         }
 
-        public void handle(FindAllFamily item)
+        public override void handle(FindAllFamily item)
         {
             people
                 .find_all()
product/presentation.windows.server/handlers/Handler.cs
@@ -1,7 +0,0 @@
-namespace presentation.windows.server.handlers
-{
-    public interface Handler<T>
-    {
-        void handle(T item);
-    }
-}
\ No newline at end of file
product/presentation.windows.server/handlers/SaveNewAccountCommand.cs
@@ -5,7 +5,7 @@ using presentation.windows.server.orm;
 
 namespace presentation.windows.server.handlers
 {
-    public class SaveNewAccountCommand : Handler<CreateNewAccount>
+    public class SaveNewAccountCommand : AbstractHandler<CreateNewAccount>
     {
         AccountRepository accounts;
         ServiceBus bus;
@@ -16,7 +16,7 @@ namespace presentation.windows.server.handlers
             this.bus = bus;
         }
 
-        public void handle(CreateNewAccount item)
+        public override void handle(CreateNewAccount item)
         {
             accounts.save(Account.New(item.account_name, Currency.named(item.currency)));
             bus.publish<NewAccountCreated>(x => x.name = item.account_name);
product/presentation.windows.server/orm/nhibernate/NHibernateAccountRepository.cs
@@ -0,0 +1,20 @@
+using NHibernate;
+using presentation.windows.server.domain.accounting;
+
+namespace presentation.windows.server.orm.nhibernate
+{
+    public class NHibernateAccountRepository : AccountRepository
+    {
+        ISession session;
+
+        public NHibernateAccountRepository(ISession session)
+        {
+            this.session = session;
+        }
+
+        public void save(Account account)
+        {
+            session.Save(account);
+        }
+    }
+}
\ No newline at end of file
product/presentation.windows.server/orm/nhibernate/NHibernateUnitOfWorkFactory.cs
@@ -10,6 +10,7 @@ namespace presentation.windows.server.orm.nhibernate
     {
         readonly ISessionFactory factory;
         readonly IContext context;
+        TypedKey<ISession> key = new TypedKey<ISession>();
 
         public NHibernateUnitOfWorkFactory(ISessionFactory factory, IContext context)
         {
@@ -19,11 +20,7 @@ namespace presentation.windows.server.orm.nhibernate
 
         public IUnitOfWork create()
         {
-            var key = new TypedKey<ISession>();
-            if (context.contains(key))
-            {
-                return new EmptyUnitOfWork();
-            }
+            if (context.contains(key)) return new EmptyUnitOfWork();
             var open_session = factory.OpenSession();
             context.add(key, open_session);
             return new NHibernateUnitOfWork(open_session, context);
product/presentation.windows.server/Bootstrapper.cs
@@ -17,11 +17,13 @@ using NHibernate.ByteCode.Castle;
 using NHibernate.Cfg;
 using NHibernate.Tool.hbm2ddl;
 using presentation.windows.common;
+using presentation.windows.server.handlers;
 using presentation.windows.server.orm;
 using presentation.windows.server.orm.mappings;
 using presentation.windows.server.orm.nhibernate;
 using Rhino.Queues;
 using Environment = System.Environment;
+using ISession = NHibernate.ISession;
 using ISessionFactory = NHibernate.ISessionFactory;
 
 namespace presentation.windows.server
@@ -31,8 +33,10 @@ namespace presentation.windows.server
         static public void run()
         {
             var builder = new ContainerBuilder();
-            Resolve.initialize_with(new AutofacDependencyRegistryBuilder(builder).build());
+            var registry = new AutofacDependencyRegistryBuilder(builder).build();
+            Resolve.initialize_with(registry);
 
+            builder.Register(x => registry).As<DependencyRegistry>().SingletonScoped();
             //needs startups
             builder.Register<ConfigureMappings>().As<NeedStartup>();
             builder.Register<StartServiceBus>().As<NeedStartup>();
@@ -41,26 +45,29 @@ namespace presentation.windows.server
             builder.Register<Log4NetLogFactory>().As<LogFactory>().SingletonScoped();
             builder.Register<DefaultMapper>().As<Mapper>().SingletonScoped();
 
-            var manager = new QueueManager(new IPEndPoint(IPAddress.Loopback, 2200),"server.esent");
+            var manager = new QueueManager(new IPEndPoint(IPAddress.Loopback, 2200), "server.esent");
             manager.CreateQueues("server");
             builder.Register(x => new RhinoPublisher("client", 2201, manager)).As<ServiceBus>().SingletonScoped();
             builder.Register(x => new RhinoReceiver(manager.GetQueue("server"))).As<RhinoReceiver>().As<Receiver>().SingletonScoped();
 
             var session_factory = bootstrap_nhibernate();
-            builder.Register(x => session_factory).SingletonScoped();
-            builder.Register(x => current_session(x));
+            builder.Register<ISessionFactory>(x => session_factory).SingletonScoped();
+            builder.Register<ISession>(x => current_session(x));
             builder.Register<NHibernateUnitOfWorkFactory>().As<IUnitOfWorkFactory>();
-            builder.Register(x => create_application_context()).SingletonScoped();
+            builder.Register<IContext>(x => create_application_context()).SingletonScoped();
 
             // commanding
             //builder.Register<ContainerCommandBuilder>().As<CommandBuilder>().SingletonScoped();
             builder.Register<AsynchronousCommandProcessor>().As<CommandProcessor>().SingletonScoped();
-            //builder.Register<AddFamilyMemberCommand>();
+            builder.Register<AddNewFamilyMemberHandler>().As<Handler>();
+            builder.Register<FindAllFamilyHandler>().As<Handler>();
+            builder.Register<SaveNewAccountCommand>().As<Handler>();
 
             // queries
 
             // repositories
             builder.Register<NHibernatePersonRepository>().As<PersonRepository>().FactoryScoped();
+            builder.Register<NHibernateAccountRepository>().As<AccountRepository>().FactoryScoped();
 
             Resolve.the<IEnumerable<NeedStartup>>().each(x => x.run());
             Resolve.the<CommandProcessor>().run();
@@ -73,7 +80,8 @@ namespace presentation.windows.server
 
         static ISession current_session(Autofac.IContext x)
         {
-            var session = x.Resolve<IContext>().value_for(new TypedKey<ISession>());
+            var context = x.Resolve<IContext>();
+            var session = context.value_for(new TypedKey<ISession>());
             if (null == session) Debugger.Break();
             return session;
         }
product/presentation.windows.server/presentation.windows.server.csproj
@@ -100,12 +100,12 @@
     <Compile Include="domain\payroll\UnitPrice.cs" />
     <Compile Include="domain\Person.cs" />
     <Compile Include="handlers\FindAllFamilyHandler.cs" />
-    <Compile Include="handlers\Handler.cs" />
     <Compile Include="handlers\SaveNewAccountCommand.cs" />
     <Compile Include="orm\AccountRepository.cs" />
     <Compile Include="orm\mappings\DateUserType.cs" />
     <Compile Include="orm\mappings\MappingAssembly.cs" />
     <Compile Include="orm\mappings\PersonMapping.cs" />
+    <Compile Include="orm\nhibernate\NHibernateAccountRepository.cs" />
     <Compile Include="orm\nhibernate\NHibernatePersonRepository.cs" />
     <Compile Include="orm\nhibernate\NHibernateUnitOfWork.cs" />
     <Compile Include="orm\nhibernate\NHibernateUnitOfWorkFactory.cs" />
@@ -144,6 +144,11 @@
       <Name>presentation.windows.common</Name>
     </ProjectReference>
   </ItemGroup>
+  <ItemGroup>
+    <Content Include="log4net.config.xml">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Content>
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.
product/presentation.windows.server/Program.cs
@@ -1,5 +1,6 @@
 using System;
 using Gorilla.Commons.Infrastructure.Container;
+using Gorilla.Commons.Infrastructure.Logging;
 using presentation.windows.common;
 
 namespace presentation.windows.server
@@ -8,9 +9,21 @@ namespace presentation.windows.server
     {
         static void Main(string[] args)
         {
-            Bootstrapper.run();
-            Console.ReadLine();
-            Resolve.the<Receiver>().stop();
+            try
+            {
+                AppDomain.CurrentDomain.UnhandledException += (o, e) =>
+                {
+                    (e.ExceptionObject as Exception).add_to_log();
+                };
+                Bootstrapper.run();
+                Console.ReadLine();
+                Resolve.the<Receiver>().stop();
+            }
+            catch (Exception e)
+            {
+                e.add_to_log();
+                //Console.ReadLine();
+            }
         }
     }
 }
\ No newline at end of file
product/presentation.windows.server/StartServiceBus.cs
@@ -1,6 +1,6 @@
-using System;
 using System.Threading;
 using Gorilla.Commons.Infrastructure.Container;
+using momoney.service.infrastructure.transactions;
 using presentation.windows.common;
 using presentation.windows.common.messages;
 
@@ -11,7 +11,15 @@ namespace presentation.windows.server
         public void run()
         {
             var receiver = Resolve.the<RhinoReceiver>();
-            receiver.register(x => Console.Out.WriteLine(x));
+            var handler = new MessageHandler(Resolve.the<DependencyRegistry>());
+            receiver.register(x =>
+            {
+                using (var unit_of_work = Resolve.the<IUnitOfWorkFactory>().create())
+                {
+                    handler.handler(x);
+                    unit_of_work.commit();
+                }
+            });
             ThreadPool.QueueUserWorkItem(x => receiver.run());
             Resolve.the<ServiceBus>().publish<StartedApplication>(x => x.message = "server");
         }
thirdparty/google/Google.ProtocolBuffers.dll
Binary file
thirdparty/google/Google.ProtocolBuffers.pdb
Binary file
thirdparty/proto-buf.net/common.xslt
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
+>
+  <!--
+  <xsl:template name="capitalizeFirst">
+    <xsl:param name="value"/>
+    <xsl:value-of select="translate(substring($value,1,1),$alpha,$ALPHA)"/>
+    <xsl:value-of select="substring($value,2)"/>
+  </xsl:template>
+  -->
+  <xsl:template match="*">
+    <xsl:message terminate="yes">
+      Node not handled: <xsl:for-each select="ancestor-or-self::*">/<xsl:value-of select="name()"/></xsl:for-each>
+      <xsl:for-each select="*">
+        ; <xsl:value-of select="concat(name(),'=',.)"/>
+      </xsl:for-each>
+    </xsl:message>
+  </xsl:template>
+  <xsl:param name="fixCase"/>
+  <xsl:variable name="optionFixCase" select="$fixCase='true'"/>
+  
+  <xsl:template name="escapeKeyword">
+    <xsl:param name="value"/>
+    <xsl:value-of select="$value"/>
+  </xsl:template>
+  
+  <xsl:template name="toCamelCase">
+    <xsl:param name="value"/>
+    <xsl:param name="delimiter" select="'_'"/>
+    <xsl:param name="keepDelimiter" select="false()"/>
+    <xsl:variable name="segment" select="substring-before($value, $delimiter)"/>
+    <xsl:choose>
+      <xsl:when test="$segment != ''">
+        <xsl:value-of select="$segment"/><xsl:if test="$keepDelimiter"><xsl:value-of select="$delimiter"/></xsl:if>
+        <xsl:call-template name="toPascalCase">
+          <xsl:with-param name="value" select="substring-after($value, $delimiter)"/>
+          <xsl:with-param name="delimiter" select="$delimiter"/>
+          <xsl:with-param name="keepDelimiter" select="$keepDelimiter"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$value"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:variable name="alpha" select="'abcdefghijklmnopqrstuvwxyz'"/>
+  <xsl:variable name="ALPHA" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
+
+  <xsl:template name="toPascalCase">
+    <xsl:param name="value"/>
+    <xsl:param name="delimiter" select="'_'"/>
+    <xsl:param name="keepDelimiter" select="false()"/>
+    <xsl:if test="$value != ''">
+      <xsl:variable name="segment" select="substring-before($value, $delimiter)"/>
+      <xsl:choose>
+        <xsl:when test="$segment != ''">
+          <xsl:value-of select="translate(substring($segment,1,1),$alpha,$ALPHA)"/><xsl:value-of select="substring($segment,2)"/><xsl:if test="$keepDelimiter"><xsl:value-of select="$delimiter"/></xsl:if>
+          <xsl:call-template name="toPascalCase">
+            <xsl:with-param name="value" select="substring-after($value, $delimiter)"/>
+            <xsl:with-param name="delimiter" select="$delimiter"/>
+            <xsl:with-param name="keepDelimiter" select="$keepDelimiter"/>
+          </xsl:call-template>    
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="translate(substring($value,1,1),$alpha,$ALPHA)"/><xsl:value-of select="substring($value,2)"/>
+        </xsl:otherwise>
+      </xsl:choose>      
+    </xsl:if>
+  </xsl:template>
+    <xsl:template name="pascal">
+    <xsl:param name="value" select="name"/>
+    <xsl:param name="delimiter" select="'_'"/>
+    <xsl:call-template name="escapeKeyword">
+      <xsl:with-param name="value"><xsl:choose>
+      <xsl:when test="$optionFixCase"><xsl:variable name="dotted"><xsl:call-template name="toPascalCase">
+          <xsl:with-param name="value" select="$value"/>
+          <xsl:with-param name="delimiter" select="'.'"/>
+          <xsl:with-param name="keepDelimiter" select="true()"/>
+        </xsl:call-template></xsl:variable><xsl:call-template name="toPascalCase">
+          <xsl:with-param name="value" select="$dotted"/>
+          <xsl:with-param name="delimiter" select="$delimiter"/>
+        </xsl:call-template></xsl:when>
+      <xsl:otherwise><xsl:value-of select="$value"/></xsl:otherwise>
+    </xsl:choose></xsl:with-param></xsl:call-template>
+  </xsl:template>
+  
+  <xsl:template name="PickNamespace"><xsl:param name="defaultNamespace"/><xsl:choose>
+    <xsl:when test="package"><xsl:call-template name="pascal">
+      <xsl:with-param name="value" select="package"/>
+    </xsl:call-template></xsl:when>
+    <xsl:when test="$defaultNamespace"><xsl:value-of select="$defaultNamespace"/></xsl:when>
+    <xsl:otherwise><xsl:variable name="trimmedName"><xsl:choose>
+      <xsl:when test="substring(name,string-length(name)-5,6)='.proto'"><xsl:value-of select="substring(name,1,string-length(name)-6)"/></xsl:when>
+      <xsl:otherwise><xsl:value-of select="name"/></xsl:otherwise>  
+    </xsl:choose></xsl:variable><xsl:call-template name="pascal">
+      <xsl:with-param name="value" select="$trimmedName"/>
+    </xsl:call-template></xsl:otherwise>    
+  </xsl:choose></xsl:template>
+
+  <xsl:template match="FieldDescriptorProto/options"/>
+  <xsl:template match="FileDescriptorProto/options"/>
+  <xsl:template match="DescriptorProto/options"/>
+  <xsl:template match="EnumValueDescriptorProto/options"/>
+  <xsl:template match="EnumDescriptorProto/options"/>
+  <xsl:template match="ServiceDescriptorProto/options"/>
+  <xsl:template match="MethodDescriptorProto/options"/>
+</xsl:stylesheet>
thirdparty/proto-buf.net/csharp.xslt
@@ -0,0 +1,629 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="xsl msxsl"
+>
+  <xsl:import href="common.xslt"/>
+  <xsl:param name="help"/>
+  <xsl:param name="xml"/>
+  <xsl:param name="datacontract"/>
+  <xsl:param name="binary"/>
+  <xsl:param name="protoRpc"/>
+  <xsl:param name="observable"/>
+  <xsl:param name="preObservable"/>
+  <xsl:param name="partialMethods"/>
+  <xsl:param name="detectMissing"/>
+  <xsl:param name="lightFramework"/>
+  <xsl:param name="asynchronous"/>
+  <xsl:param name="clientProxy"/>
+  <xsl:param name="defaultNamespace"/>
+  <xsl:param name="import"/>
+  
+  <xsl:key name="fieldNames" match="//FieldDescriptorProto" use="name"/>
+  <xsl:output method="text" indent="no" omit-xml-declaration="yes"/>
+
+  <xsl:variable name="optionXml" select="$xml='true'"/>
+  <xsl:variable name="optionDataContract" select="$datacontract='true'"/>
+  <xsl:variable name="optionBinary" select="$binary='true'"/>
+  <xsl:variable name="optionProtoRpc" select="$protoRpc='true'"/>
+  <xsl:variable name="optionObservable" select="$observable='true'"/>
+  <xsl:variable name="optionPreObservable" select="$preObservable='true'"/>
+  <xsl:variable name="optionPartialMethods" select="$partialMethods='true'"/>
+  <xsl:variable name="optionDetectMissing" select="$detectMissing='true'"/>
+  <xsl:variable name="optionFullFramework" select="not($lightFramework='true')"/>
+  <xsl:variable name="optionAsynchronous" select="$asynchronous='true'"/>
+  <xsl:variable name="optionClientProxy" select="$clientProxy='true'"/>
+
+  <xsl:template match="/">
+    <xsl:text disable-output-escaping="yes">//------------------------------------------------------------------------------
+// &lt;auto-generated&gt;
+//     This code was generated by a tool.
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// &lt;/auto-generated&gt;
+//------------------------------------------------------------------------------
+</xsl:text><!--
+    --><xsl:apply-templates select="*"/><!--
+  --></xsl:template>
+
+  <xsl:template name="WriteUsings">
+    <xsl:param name="ns"/>
+    <xsl:if test="$ns != ''"><xsl:choose>
+   <xsl:when test="contains($ns,';')">
+using <xsl:value-of select="substring-before($ns,';')"/>;<!--
+ --><xsl:call-template name="WriteUsings">
+       <xsl:with-param name="ns" select="substring-after($ns,';')"/>
+  </xsl:call-template>
+  </xsl:when>
+   <xsl:otherwise>
+using <xsl:value-of select="$ns"/>;
+   </xsl:otherwise>
+ </xsl:choose></xsl:if></xsl:template>
+  
+  <xsl:template match="FileDescriptorSet">
+    <xsl:if test="$help='true'">
+      <xsl:message terminate="yes">
+        CSharp template for protobuf-net.
+        Options:
+        General:
+          "help" - this page
+        Additional serializer support:
+          "xml" - enable explicit xml support (XmlSerializer)
+          "datacontract" - enable data-contract support (DataContractSerializer; requires .NET 3.0)
+          "binary" - enable binary support (BinaryFormatter; not supported on Silverlight)
+        Other:
+          "protoRpc" - enable proto-rpc client
+          "observable" - change notification (observer pattern) support
+          "preObservable" - pre-change notification (observer pattern) support (requires .NET 3.5)
+          "partialMethods" - provide partial methods for changes (requires C# 3.0)
+          "detectMissing" - provide *Specified properties to indicate whether fields are present
+          "lightFramework" - omit additional attributes not included in CF/Silverlight
+          "asynchronous" - emit asynchronous methods for use with WCF
+          "clientProxy" - emit asynchronous client proxy class
+          "import" - additional namespaces to import (semicolon delimited)
+          "fixCase" - change type/member names (types/properties become PascalCase; fields become camelCase)
+      </xsl:message>
+    </xsl:if>
+
+    <xsl:if test="$optionXml and $optionDataContract">
+      <xsl:message terminate="yes">
+        Invalid options: xml and data-contract serialization are mutually exclusive.
+      </xsl:message>
+    </xsl:if>
+    <xsl:if test="$optionXml">
+// Option: xml serialization ([XmlType]/[XmlElement]) enabled
+    </xsl:if><xsl:if test="$optionDataContract">
+// Option: data-contract serialization ([DataContract]/[DataMember]) enabled
+    </xsl:if><xsl:if test="$optionBinary">
+// Option: binary serialization (ISerializable) enabled
+    </xsl:if><xsl:if test="$optionObservable">
+// Option: observable (OnPropertyChanged) enabled
+    </xsl:if><xsl:if test="$optionPreObservable">
+// Option: pre-observable (OnPropertyChanging) enabled
+    </xsl:if><xsl:if test="$partialMethods">
+// Option: partial methods (On*Changing/On*Changed) enabled
+    </xsl:if><xsl:if test="$detectMissing">
+// Option: missing-value detection (*Specified/ShouldSerialize*/Reset*) enabled
+    </xsl:if><xsl:if test="not($optionFullFramework)">
+// Option: light framework (CF/Silverlight) enabled
+    </xsl:if><xsl:if test="$optionProtoRpc">
+// Option: proto-rpc enabled
+  </xsl:if>
+    <xsl:call-template name="WriteUsings">
+      <xsl:with-param name="ns" select="$import"/>
+    </xsl:call-template>
+    <xsl:apply-templates select="file/FileDescriptorProto"/>
+  </xsl:template>
+
+  
+  <xsl:template match="FileDescriptorProto">
+// Generated from: <xsl:value-of select="name"/>
+    
+    <xsl:apply-templates select="dependency/string[.!='']"/>
+    <xsl:variable name="namespace"><xsl:call-template name="PickNamespace">
+      <xsl:with-param name="defaultNamespace" select="$defaultNamespace"/>
+        </xsl:call-template>
+      </xsl:variable>
+    <xsl:if test="string($namespace) != ''">
+namespace <xsl:value-of select="translate($namespace,':-/\','__..')"/>
+{</xsl:if>
+    <xsl:apply-templates select="message_type | enum_type | service"/>
+    <xsl:if test="string($namespace) != ''">
+}</xsl:if></xsl:template>
+  
+  <xsl:template match="FileDescriptorProto/dependency/string">
+// Note: requires additional types generated from: <xsl:value-of select="."/></xsl:template>
+
+
+  <xsl:template name="camel">
+    <xsl:param name="value" select="name"/>
+    <xsl:param name="delimiter" select="'_'"/>
+    <xsl:choose>
+      <xsl:when test="$optionFixCase"><xsl:call-template name="toCamelCase">
+          <xsl:with-param name="value" select="$value"/>
+          <xsl:with-param name="delimiter" select="$delimiter"/>
+        </xsl:call-template></xsl:when>
+      <xsl:otherwise><xsl:value-of select="$value"/></xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+  
+  <xsl:template match="DescriptorProto">
+  [<xsl:if test="$optionFullFramework">global::System.Serializable, </xsl:if>global::ProtoBuf.ProtoContract(Name=@"<xsl:value-of select="name"/>")]
+  <xsl:if test="$optionDataContract">[global::System.Runtime.Serialization.DataContract(Name=@"<xsl:value-of select="name"/>")]
+  </xsl:if><xsl:if test="$optionXml">[global::System.Xml.Serialization.XmlType(TypeName=@"<xsl:value-of select="name"/>")]
+  </xsl:if><!--
+  -->public partial class <xsl:call-template name="pascal"/> : global::ProtoBuf.IExtensible<!--
+  --><xsl:if test="$optionBinary">, global::System.Runtime.Serialization.ISerializable</xsl:if><!--
+  --><xsl:if test="$optionObservable">, global::System.ComponentModel.INotifyPropertyChanged</xsl:if><!--
+  --><xsl:if test="$optionPreObservable">, global::System.ComponentModel.INotifyPropertyChanging</xsl:if>
+  {
+    public <xsl:call-template name="pascal"/>() {}
+    <xsl:apply-templates select="*"/><xsl:if test="$optionBinary">
+    protected <xsl:call-template name="pascal"/>(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context)
+      : this() { global::ProtoBuf.Serializer.Merge(info, this); }
+    void global::System.Runtime.Serialization.ISerializable.GetObjectData(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context)
+      { global::ProtoBuf.Serializer.Serialize(info, this); }
+    </xsl:if><xsl:if test="$optionObservable">
+    public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
+    protected virtual void OnPropertyChanged(string propertyName)
+      { if(PropertyChanged != null) PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(propertyName)); }
+    </xsl:if><xsl:if test="$optionPreObservable">
+    public event global::System.ComponentModel.PropertyChangingEventHandler PropertyChanging;
+    protected virtual void OnPropertyChanging(string propertyName)
+    { if(PropertyChanging != null) PropertyChanging(this, new global::System.ComponentModel.PropertyChangingEventArgs(propertyName)); }
+    </xsl:if>
+    private global::ProtoBuf.IExtension extensionObject;
+    global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing)
+      { return global::ProtoBuf.Extensible.GetExtensionObject(ref extensionObject, createIfMissing); }
+  }
+  </xsl:template>
+
+  <xsl:template match="DescriptorProto/name | DescriptorProto/extension_range | DescriptorProto/extension"/>
+  
+  <xsl:template match="
+                FileDescriptorProto/message_type | FileDescriptorProto/enum_type | FileDescriptorProto/service
+                | DescriptorProto/enum_type | DescriptorProto/message_type
+                | DescriptorProto/nested_type | EnumDescriptorProto/value | ServiceDescriptorProto/method">
+    <xsl:apply-templates select="*"/>
+  </xsl:template>
+
+  <xsl:template match="DescriptorProto/field">
+    <xsl:apply-templates select="*"/>
+    <xsl:variable name="extName" select="concat('.',(ancestor::FileDescriptorProto/package)[1],'.',../name)"/>
+    <xsl:apply-templates select="//FieldDescriptorProto[extendee=$extName]"/>
+  </xsl:template>
+
+  <xsl:template match="EnumDescriptorProto">
+    [global::ProtoBuf.ProtoContract(Name=@"<xsl:value-of select="name"/>")]
+    <xsl:if test="$optionDataContract">[global::System.Runtime.Serialization.DataContract(Name=@"<xsl:value-of select="name"/>")]
+    </xsl:if>
+    <xsl:if test="$optionXml">[global::System.Xml.Serialization.XmlType(TypeName=@"<xsl:value-of select="name"/>")]
+    </xsl:if><!--
+    -->public enum <xsl:call-template name="pascal"/>
+    {
+      <xsl:apply-templates select="value"/>
+    }
+  </xsl:template>
+
+  <xsl:template match="EnumValueDescriptorProto">
+      <xsl:variable name="value"><xsl:choose>
+        <xsl:when test="number"><xsl:value-of select="number"/></xsl:when>
+        <xsl:otherwise>0</xsl:otherwise>
+      </xsl:choose></xsl:variable>      
+      [global::ProtoBuf.ProtoEnum(Name=@"<xsl:value-of select="name"/>", Value=<xsl:value-of select="$value"/>)]<!--
+      --><xsl:if test="$optionDataContract">
+      [global::System.Runtime.Serialization.EnumMember(Value=@"<xsl:value-of select="name"/>")]</xsl:if><!--
+      --><xsl:if test="$optionXml">
+      [global::System.Xml.Serialization.XmlEnum(@"<xsl:value-of select="name"/>")]</xsl:if><!--
+      --><xsl:text disable-output-escaping="yes">
+      </xsl:text><xsl:call-template name="pascal"/><xsl:text xml:space="preserve"> = </xsl:text><xsl:value-of select="$value"/><xsl:if test="position()!=last()">,
+      </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="FieldDescriptorProto" mode="field">
+    <xsl:variable name="field"><xsl:choose>
+      <xsl:when test="$optionFixCase"><xsl:call-template name="toCamelCase">
+          <xsl:with-param name="value" select="name"/>
+        </xsl:call-template></xsl:when>
+      <xsl:otherwise><xsl:value-of select="name"/></xsl:otherwise>
+    </xsl:choose></xsl:variable>
+    <xsl:call-template name="escapeKeyword">
+      <xsl:with-param name="value"><xsl:choose>
+      <xsl:when test="not(key('fieldNames',concat('_',$field)))"><xsl:value-of select="concat('_',$field)"/></xsl:when>
+      <xsl:when test="not(key('fieldNames',concat($field,'Field')))"><xsl:value-of select="concat($field,'Field')"/></xsl:when>
+      <xsl:otherwise><xsl:value-of select="concat('_',generate-id())"/></xsl:otherwise>
+    </xsl:choose></xsl:with-param>
+    </xsl:call-template>
+  </xsl:template>
+
+  <xsl:template name="escapeKeyword">
+    <xsl:param name="value"/>
+    <xsl:if test="contains($keywords,concat('|',$value,'|'))">@</xsl:if><xsl:value-of select="$value"/>
+  </xsl:template>
+  <xsl:variable name="keywords">|abstract|as|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|do|double|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|goto|if|implicit|in|int|interface|internal|is|lock|long|namespace|new|null|object|operator|out|override|params|private|protected|public|readonly|ref|return|sbyte|sealed|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|virtual|void|volatile|while|</xsl:variable>
+
+  <xsl:template match="FieldDescriptorProto" mode="format">
+    <xsl:choose>
+      <xsl:when test="type='TYPE_DOUBLE' or type='TYPE_FLOAT'
+                or type='TYPE_FIXED32' or type='TYPE_FIXED64'
+                or type='TYPE_SFIXED32' or type='TYPE_SFIXED64'">FixedSize</xsl:when>
+      <xsl:when test="type='TYPE_GROUP'">Group</xsl:when>
+      <xsl:when test="not(type) or type='TYPE_INT32' or type='TYPE_INT64'
+                or type='TYPE_UINT32' or type='TYPE_UINT64'
+                or type='TYPE_ENUM'">TwosComplement</xsl:when>
+      <xsl:when test="type='TYPE_SINT32' or type='TYPE_SINT64'">ZigZag</xsl:when>
+      <xsl:otherwise>Default</xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+  <xsl:template match="FieldDescriptorProto" mode="primitiveType">
+    <xsl:choose>
+      <xsl:when test="not(type)">struct</xsl:when>
+      <xsl:when test="type='TYPE_DOUBLE'">struct</xsl:when>
+      <xsl:when test="type='TYPE_FLOAT'">struct</xsl:when>
+      <xsl:when test="type='TYPE_INT64'">struct</xsl:when>
+      <xsl:when test="type='TYPE_UINT64'">struct</xsl:when>
+      <xsl:when test="type='TYPE_INT32'">struct</xsl:when>
+      <xsl:when test="type='TYPE_FIXED64'">struct</xsl:when>
+      <xsl:when test="type='TYPE_FIXED32'">struct</xsl:when>
+      <xsl:when test="type='TYPE_BOOL'">struct</xsl:when>
+      <xsl:when test="type='TYPE_STRING'">class</xsl:when>
+      <xsl:when test="type='TYPE_BYTES'">class</xsl:when>
+      <xsl:when test="type='TYPE_UINT32'">struct</xsl:when>
+      <xsl:when test="type='TYPE_SFIXED32'">struct</xsl:when>
+      <xsl:when test="type='TYPE_SFIXED64'">struct</xsl:when>
+      <xsl:when test="type='TYPE_SINT32'">struct</xsl:when>
+      <xsl:when test="type='TYPE_SINT64'">struct</xsl:when>
+      <xsl:when test="type='TYPE_ENUM'">struct</xsl:when>
+      <xsl:when test="type='TYPE_GROUP' or type='TYPE_MESSAGE'">none</xsl:when>
+      <xsl:otherwise>
+        <xsl:message terminate="yes">
+          Field type not implemented: <xsl:value-of select="type"/> (<xsl:value-of select="../../name"/>.<xsl:value-of select="name"/>)
+        </xsl:message>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+  <xsl:template match="FieldDescriptorProto" mode="type">
+    <xsl:choose>
+      <xsl:when test="not(type)">double</xsl:when>
+      <xsl:when test="type='TYPE_DOUBLE'">double</xsl:when>
+      <xsl:when test="type='TYPE_FLOAT'">float</xsl:when>
+      <xsl:when test="type='TYPE_INT64'">long</xsl:when>
+      <xsl:when test="type='TYPE_UINT64'">ulong</xsl:when>
+      <xsl:when test="type='TYPE_INT32'">int</xsl:when>
+      <xsl:when test="type='TYPE_FIXED64'">ulong</xsl:when>
+      <xsl:when test="type='TYPE_FIXED32'">uint</xsl:when>
+      <xsl:when test="type='TYPE_BOOL'">bool</xsl:when>
+      <xsl:when test="type='TYPE_STRING'">string</xsl:when>
+      <xsl:when test="type='TYPE_BYTES'">byte[]</xsl:when>
+      <xsl:when test="type='TYPE_UINT32'">uint</xsl:when>
+      <xsl:when test="type='TYPE_SFIXED32'">int</xsl:when>
+      <xsl:when test="type='TYPE_SFIXED64'">long</xsl:when>
+      <xsl:when test="type='TYPE_SINT32'">int</xsl:when>
+      <xsl:when test="type='TYPE_SINT64'">long</xsl:when>
+      <xsl:when test="type='TYPE_GROUP' or type='TYPE_MESSAGE' or type='TYPE_ENUM'"><xsl:call-template name="pascal">
+        <xsl:with-param name="value" select="substring-after(type_name,'.')"/>
+      </xsl:call-template></xsl:when>
+      <xsl:otherwise>
+        <xsl:message terminate="yes">
+          Field type not implemented: <xsl:value-of select="type"/> (<xsl:value-of select="../../name"/>.<xsl:value-of select="name"/>)
+        </xsl:message>
+      </xsl:otherwise>
+    </xsl:choose>
+    
+  </xsl:template>
+
+  <xsl:template match="FieldDescriptorProto[default_value]" mode="defaultValue">
+    <xsl:choose>
+      <xsl:when test="type='TYPE_STRING'">@"<xsl:value-of select="default_value"/>"</xsl:when>
+      <xsl:when test="type='TYPE_ENUM'"><xsl:apply-templates select="." mode="type"/>.<xsl:call-template name="pascal">
+        <xsl:with-param name="value" select="default_value"/>
+      </xsl:call-template></xsl:when>
+      <xsl:when test="type='TYPE_BYTES'"> /* 
+        <xsl:value-of select="default_value"/>
+        */ null </xsl:when>
+      <xsl:otherwise>(<xsl:apply-templates select="." mode="type"/>)<xsl:value-of select="default_value"/></xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <!--
+    We need to find the first enum value given .foo.bar.SomeEnum - but the enum itself
+    only knows about SomeEnum; we need to look at all parent DescriptorProto nodes, and
+    the FileDescriptorProto for the namespace.
+    
+    This does an annoying up/down recursion... a bit expensive, but *generally* OK.
+    Could perhaps index the last part of the enum name to reduce overhead?
+  -->
+  <xsl:template name="GetFirstEnumValue">
+    <xsl:variable name="hunt" select="type_name"/>
+    <xsl:for-each select="//EnumDescriptorProto">
+      <xsl:variable name="fullName">
+        <xsl:for-each select="ancestor::FileDescriptorProto">.<xsl:value-of select="package"/></xsl:for-each>
+        <xsl:for-each select="ancestor::DescriptorProto">.<xsl:value-of select="name"/></xsl:for-each>
+        <xsl:value-of select="'.'"/>
+        <xsl:call-template name="pascal"/>
+      </xsl:variable>
+      <xsl:if test="$fullName=$hunt"><xsl:value-of select="(value/EnumValueDescriptorProto)[1]/name"/></xsl:if>
+    </xsl:for-each>
+  </xsl:template>
+  
+  <xsl:template match="FieldDescriptorProto[not(default_value)]" mode="defaultValue">
+    <xsl:choose>
+      <xsl:when test="type='TYPE_STRING'">""</xsl:when>
+      <xsl:when test="type='TYPE_MESSAGE'">null</xsl:when>
+      <xsl:when test="type='TYPE_BYTES'">null</xsl:when>
+      <xsl:when test="type='TYPE_ENUM'"><xsl:apply-templates select="." mode="type"/>.<xsl:call-template name="GetFirstEnumValue"/></xsl:when>
+      <xsl:otherwise>default(<xsl:apply-templates select="." mode="type"/>)</xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template match="FieldDescriptorProto" mode="checkDeprecated"><!--
+    --><xsl:if test="options/deprecated='true'">global::System.Obsolete, </xsl:if><!--
+  --></xsl:template>
+  <xsl:template match="FieldDescriptorProto[label='LABEL_OPTIONAL' or not(label)]">
+    <xsl:variable name="propType"><xsl:apply-templates select="." mode="type"/></xsl:variable>
+    <xsl:variable name="format"><xsl:apply-templates select="." mode="format"/></xsl:variable>
+    <xsl:variable name="primitiveType"><xsl:apply-templates select="." mode="primitiveType"/></xsl:variable>
+    <xsl:variable name="defaultValue"><xsl:apply-templates select="." mode="defaultValue"/></xsl:variable>
+    <xsl:variable name="field"><xsl:apply-templates select="." mode="field"/></xsl:variable>
+    <xsl:variable name="specified" select="$optionDetectMissing and ($primitiveType='struct' or $primitiveType='class')"/>
+    <xsl:variable name="fieldType"><xsl:value-of select="$propType"/><xsl:if test="$specified and $primitiveType='struct'">?</xsl:if></xsl:variable>
+
+    private <xsl:value-of select="concat($fieldType,' ',$field)"/><xsl:if test="not($specified)"> = <xsl:value-of select="$defaultValue"/></xsl:if>;
+    [<xsl:apply-templates select="." mode="checkDeprecated"/>global::ProtoBuf.ProtoMember(<xsl:value-of select="number"/>, IsRequired = false, Name=@"<xsl:value-of select="name"/>", DataFormat = global::ProtoBuf.DataFormat.<xsl:value-of select="$format"/>)]<!--
+    --><xsl:if test="not($specified)">
+    [global::System.ComponentModel.DefaultValue(<xsl:value-of select="$defaultValue"/>)]</xsl:if><!--
+    --><xsl:if test="$optionXml">
+    [global::System.Xml.Serialization.XmlElement(@"<xsl:value-of select="name"/>", Order = <xsl:value-of select="number"/>)]
+    </xsl:if><xsl:if test="$optionDataContract">
+    [global::System.Runtime.Serialization.DataMember(Name=@"<xsl:value-of select="name"/>", Order = <xsl:value-of select="number"/>, IsRequired = false)]
+    </xsl:if><xsl:call-template name="WriteGetSet">
+      <xsl:with-param name="fieldType" select="$fieldType"/>
+      <xsl:with-param name="propType" select="$propType"/>
+      <xsl:with-param name="name"><xsl:call-template name="pascal"/></xsl:with-param>
+      <xsl:with-param name="field" select="$field"/>
+      <xsl:with-param name="defaultValue" select="$defaultValue"/>
+      <xsl:with-param name="specified" select="$specified"/>
+    </xsl:call-template>
+  </xsl:template>
+  
+  <xsl:template match="FieldDescriptorProto[label='LABEL_REQUIRED']">
+    <xsl:variable name="type"><xsl:apply-templates select="." mode="type"/></xsl:variable>
+    <xsl:variable name="format"><xsl:apply-templates select="." mode="format"/></xsl:variable>
+    <xsl:variable name="field"><xsl:apply-templates select="." mode="field"/></xsl:variable>
+    private <xsl:value-of select="concat($type, ' ', $field)"/>;
+    [<xsl:apply-templates select="." mode="checkDeprecated"/>global::ProtoBuf.ProtoMember(<xsl:value-of select="number"/>, IsRequired = true, Name=@"<xsl:value-of select="name"/>", DataFormat = global::ProtoBuf.DataFormat.<xsl:value-of select="$format"/>)]<!--
+    --><xsl:if test="$optionXml">
+    [global::System.Xml.Serialization.XmlElement(@"<xsl:value-of select="name"/>", Order = <xsl:value-of select="number"/>)]
+    </xsl:if><xsl:if test="$optionDataContract">
+    [global::System.Runtime.Serialization.DataMember(Name=@"<xsl:value-of select="name"/>", Order = <xsl:value-of select="number"/>, IsRequired = true)]
+    </xsl:if><xsl:call-template name="WriteGetSet">
+      <xsl:with-param name="fieldType" select="$type"/>
+      <xsl:with-param name="propType" select="$type"/>
+      <xsl:with-param name="name"><xsl:call-template name="pascal"/></xsl:with-param>
+      <xsl:with-param name="field" select="$field"/>
+    </xsl:call-template>    
+  </xsl:template>
+
+  <xsl:template name="stripKeyword">
+    <xsl:param name="value"/>
+    <xsl:choose>
+      <xsl:when test="starts-with($value,'@')"><xsl:value-of select="substring-after($value,'@')"/></xsl:when>
+      <xsl:otherwise><xsl:value-of select="$value"/></xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+  
+  <xsl:template name="WriteGetSet">
+    <xsl:param name="fieldType"/>
+    <xsl:param name="propType"/>
+    <xsl:param name="name"/>
+    <xsl:param name="field"/>
+    <xsl:param name="specified" select="false()"/>
+    <xsl:param name="defaultValue"/>
+    <xsl:variable name="nameNoKeyword">
+      <xsl:call-template name="stripKeyword">
+        <xsl:with-param name="value" select="$name"/>
+      </xsl:call-template></xsl:variable>
+    public <xsl:value-of select="concat($propType,' ',$name)"/>
+    {
+      get { return <xsl:value-of select="$field"/> <xsl:if test="$specified">?? <xsl:value-of select="$defaultValue"/></xsl:if>; }
+      set { <xsl:if test="$optionPartialMethods">On<xsl:value-of select="$nameNoKeyword"/>Changing(value); </xsl:if><xsl:if test="$optionPreObservable">OnPropertyChanging(@"<xsl:value-of select="$nameNoKeyword"/>"); </xsl:if><xsl:value-of select="$field"/> = value; <xsl:if test="$optionObservable">OnPropertyChanged(@"<xsl:value-of select="$nameNoKeyword"/>"); </xsl:if><xsl:if test="$optionPartialMethods">On<xsl:value-of select="$nameNoKeyword"/>Changed();</xsl:if>}
+    }<xsl:if test="$optionPartialMethods">
+    partial void On<xsl:value-of select="$nameNoKeyword"/>Changing(<xsl:value-of select="$propType"/> value);
+    partial void On<xsl:value-of select="$nameNoKeyword"/>Changed();</xsl:if><xsl:if test="$specified">
+    [global::System.Xml.Serialization.XmlIgnore]
+    <xsl:if test="$optionFullFramework">[global::System.ComponentModel.Browsable(false)]</xsl:if>
+    public bool <xsl:value-of select="$nameNoKeyword"/>Specified
+    {
+      get { return <xsl:value-of select="$field"/> != null; }
+      set { if (value == (<xsl:value-of select="$field"/>== null)) <xsl:value-of select="$field"/> = value ? <xsl:value-of select="$name"/> : (<xsl:value-of select="$fieldType"/>)null; }
+    }
+    private bool ShouldSerialize<xsl:value-of select="$nameNoKeyword"/>() { return <xsl:value-of select="$nameNoKeyword"/>Specified; }
+    private void Reset<xsl:value-of select="$nameNoKeyword"/>() { <xsl:value-of select="$nameNoKeyword"/>Specified = false; }
+    </xsl:if>
+  </xsl:template>
+  <xsl:template match="FieldDescriptorProto[label='LABEL_REPEATED']">
+    <xsl:variable name="type"><xsl:apply-templates select="." mode="type"/></xsl:variable>
+    <xsl:variable name="format"><xsl:apply-templates select="." mode="format"/></xsl:variable>
+    <xsl:variable name="field"><xsl:apply-templates select="." mode="field"/></xsl:variable>
+    private <xsl:if test="not($optionXml)">readonly</xsl:if> global::System.Collections.Generic.List&lt;<xsl:value-of select="$type" />&gt; <xsl:value-of select="$field"/> = new global::System.Collections.Generic.List&lt;<xsl:value-of select="$type"/>&gt;();
+    [<xsl:apply-templates select="." mode="checkDeprecated"/>global::ProtoBuf.ProtoMember(<xsl:value-of select="number"/>, Name=@"<xsl:value-of select="name"/>", DataFormat = global::ProtoBuf.DataFormat.<xsl:value-of select="$format"/><xsl:if test="options/packed='true'">, Options = global::ProtoBuf.MemberSerializationOptions.Packed</xsl:if>)]<!--
+    --><xsl:if test="$optionDataContract">
+    [global::System.Runtime.Serialization.DataMember(Name=@"<xsl:value-of select="name"/>", Order = <xsl:value-of select="number"/>, IsRequired = false)]
+    </xsl:if><xsl:if test="$optionXml">
+    [global::System.Xml.Serialization.XmlElement(@"<xsl:value-of select="name"/>", Order = <xsl:value-of select="number"/>)]
+    </xsl:if>
+    public global::System.Collections.Generic.List&lt;<xsl:value-of select="$type" />&gt; <xsl:call-template name="pascal"/>
+    {
+      get { return <xsl:value-of select="$field"/>; }<!--
+      --><xsl:if test="$optionXml">
+      set { <xsl:value-of select="$field"/> = value; }</xsl:if>
+    }
+  </xsl:template>
+
+  <xsl:template match="ServiceDescriptorProto">
+    <xsl:if test="($optionClientProxy or $optionDataContract)">
+    [global::System.ServiceModel.ServiceContract(Name = @"<xsl:value-of select="name"/>")]</xsl:if>
+    public interface I<xsl:value-of select="name"/>
+    {
+      <xsl:apply-templates select="method"/>
+    }
+    
+    <xsl:if test="$optionProtoRpc">
+    public class <xsl:value-of select="name"/>Client : global::ProtoBuf.ServiceModel.RpcClient
+    {
+      public <xsl:value-of select="name"/>Client() : base(typeof(I<xsl:value-of select="name"/>)) { }
+      <xsl:apply-templates select="method/MethodDescriptorProto" mode="protoRpc"/>
+    }
+    </xsl:if>
+    <xsl:apply-templates select="." mode="clientProxy"/>
+    
+  </xsl:template>
+
+  <xsl:template match="MethodDescriptorProto">
+    <xsl:if test="($optionClientProxy or $optionDataContract)">
+        [global::System.ServiceModel.OperationContract(Name = @"<xsl:value-of select="name"/>")]
+        <xsl:if test="$optionFullFramework">[global::ProtoBuf.ServiceModel.ProtoBehavior]</xsl:if>
+    </xsl:if>
+        <xsl:apply-templates select="output_type"/><xsl:text xml:space="preserve"> </xsl:text><xsl:value-of select="name"/>(<xsl:apply-templates select="input_type"/> request);
+    <xsl:if test="$optionAsynchronous and ($optionClientProxy or $optionDataContract)">
+        [global::System.ServiceModel.OperationContract(AsyncPattern = true, Name = @"<xsl:value-of select="name"/>")]
+        global::System.IAsyncResult Begin<xsl:value-of select="name"/>(<xsl:apply-templates select="input_type"/> request, global::System.AsyncCallback callback, object state);
+    <xsl:apply-templates select="output_type"/> End<xsl:value-of select="name"/>(global::System.IAsyncResult ar);
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="MethodDescriptorProto" mode="protoRpc">
+        <xsl:apply-templates select="output_type"/><xsl:text xml:space="preserve"> </xsl:text><xsl:value-of select="name"/>(<xsl:apply-templates select="input_type"/> request)
+        {
+            return (<xsl:apply-templates select="output_type"/>) Send(@"<xsl:value-of select="name"/>", request);
+        }
+  </xsl:template>
+
+  <xsl:template match="MethodDescriptorProto/input_type | MethodDescriptorProto/output_type">
+    <xsl:value-of select="substring-after(.,'.')"/>
+  </xsl:template>
+
+  <xsl:template match="MethodDescriptorProto" mode="CompleteEvent">
+  <xsl:if test="$optionAsynchronous and $optionDataContract">
+    public partial class <xsl:value-of select="name"/>CompletedEventArgs : global::System.ComponentModel.AsyncCompletedEventArgs
+    {
+        private object[] results;
+
+        public <xsl:value-of select="name"/>CompletedEventArgs(object[] results, global::System.Exception exception, bool cancelled, object userState)
+            : base(exception, cancelled, userState) 
+        {
+            this.results = results;
+        }
+        
+        public <xsl:apply-templates select="output_type"/> Result
+        {
+            get { 
+                base.RaiseExceptionIfNecessary();
+                return (<xsl:apply-templates select="output_type"/>)(this.results[0]); 
+            }
+        }
+    }
+  </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="ServiceDescriptorProto" mode="clientProxy">
+  <xsl:if test="$optionAsynchronous and $optionDataContract and $optionClientProxy">
+    <xsl:apply-templates select="method/MethodDescriptorProto" mode="CompleteEvent"/>
+    
+    [global::System.Diagnostics.DebuggerStepThroughAttribute()]
+    public partial class <xsl:value-of select="name"/>Client : global::System.ServiceModel.ClientBase&lt;I<xsl:value-of select="name"/>&gt;, I<xsl:value-of select="name"/>
+    {
+
+        public <xsl:value-of select="name"/>Client()
+        {}
+        public <xsl:value-of select="name"/>Client(string endpointConfigurationName) 
+            : base(endpointConfigurationName) 
+        {}
+        public <xsl:value-of select="name"/>Client(string endpointConfigurationName, string remoteAddress) 
+            : base(endpointConfigurationName, remoteAddress)
+        {}
+        public <xsl:value-of select="name"/>Client(string endpointConfigurationName, global::System.ServiceModel.EndpointAddress remoteAddress)
+            : base(endpointConfigurationName, remoteAddress)
+        {}
+        public <xsl:value-of select="name"/>Client(global::System.ServiceModel.Channels.Binding binding, global::System.ServiceModel.EndpointAddress remoteAddress)
+            : base(binding, remoteAddress)
+        {}
+
+        <xsl:apply-templates select="method/MethodDescriptorProto" mode="clientProxy"/>
+    }  
+  </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="MethodDescriptorProto" mode="clientProxy">
+  <xsl:if test="$optionAsynchronous and $optionDataContract and $optionClientProxy">
+        private BeginOperationDelegate onBegin<xsl:value-of select="name"/>Delegate;
+        private EndOperationDelegate onEnd<xsl:value-of select="name"/>Delegate;
+        private global::System.Threading.SendOrPostCallback on<xsl:value-of select="name"/>CompletedDelegate;
+
+        public event global::System.EventHandler&lt;<xsl:value-of select="name"/>CompletedEventArgs&gt; <xsl:value-of select="name"/>Completed;
+
+        public <xsl:apply-templates select="output_type"/><xsl:text xml:space="preserve"> </xsl:text><xsl:value-of select="name"/>(<xsl:apply-templates select="input_type"/> request)
+        {
+            return base.Channel.<xsl:value-of select="name"/>(request);
+        }
+
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        public global::System.IAsyncResult Begin<xsl:value-of select="name"/>(<xsl:apply-templates select="input_type"/> request, global::System.AsyncCallback callback, object asyncState)
+        {
+            return base.Channel.Begin<xsl:value-of select="name"/>(request, callback, asyncState);
+        }
+
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        public <xsl:apply-templates select="output_type"/> End<xsl:value-of select="name"/>(global::System.IAsyncResult result)
+        {
+            return base.Channel.End<xsl:value-of select="name"/>(result);
+        }
+
+        private global::System.IAsyncResult OnBegin<xsl:value-of select="name"/>(object[] inValues, global::System.AsyncCallback callback, object asyncState)
+        {
+            <xsl:apply-templates select="input_type"/> request = ((<xsl:apply-templates select="input_type"/>)(inValues[0]));
+            return this.Begin<xsl:value-of select="name"/>(request, callback, asyncState);
+        }
+
+        private object[] OnEnd<xsl:value-of select="name"/>(global::System.IAsyncResult result)
+        {
+            <xsl:apply-templates select="output_type"/> retVal = this.End<xsl:value-of select="name"/>(result);
+            return new object[] {
+                retVal};
+        }
+
+        private void On<xsl:value-of select="name"/>Completed(object state)
+        {
+            if ((this.<xsl:value-of select="name"/>Completed != null))
+            {
+                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
+                this.<xsl:value-of select="name"/>Completed(this, new <xsl:value-of select="name"/>CompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
+            }
+        }
+
+        public void <xsl:value-of select="name"/>Async(<xsl:apply-templates select="input_type"/> request)
+        {
+            this.<xsl:value-of select="name"/>Async(request, null);
+        }
+
+        public void <xsl:value-of select="name"/>Async(<xsl:apply-templates select="input_type"/> request, object userState)
+        {
+            if ((this.onBegin<xsl:value-of select="name"/>Delegate == null))
+            {
+                this.onBegin<xsl:value-of select="name"/>Delegate = new BeginOperationDelegate(this.OnBegin<xsl:value-of select="name"/>);
+            }
+            if ((this.onEnd<xsl:value-of select="name"/>Delegate == null))
+            {
+                this.onEnd<xsl:value-of select="name"/>Delegate = new EndOperationDelegate(this.OnEnd<xsl:value-of select="name"/>);
+            }
+            if ((this.on<xsl:value-of select="name"/>CompletedDelegate == null))
+            {
+                this.on<xsl:value-of select="name"/>CompletedDelegate = new global::System.Threading.SendOrPostCallback(this.On<xsl:value-of select="name"/>Completed);
+            }
+            base.InvokeAsync(this.onBegin<xsl:value-of select="name"/>Delegate, new object[] {
+                    request}, this.onEnd<xsl:value-of select="name"/>Delegate, this.on<xsl:value-of select="name"/>CompletedDelegate, userState);
+        }
+    </xsl:if>
+    </xsl:template>
+</xsl:stylesheet>
thirdparty/proto-buf.net/descriptor.proto
@@ -0,0 +1,406 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc.  All rights reserved.
+// http://code.google.com/p/protobuf/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+//     * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//     * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Author: kenton@google.com (Kenton Varda)
+//  Based on original Protocol Buffers design by
+//  Sanjay Ghemawat, Jeff Dean, and others.
+//
+// The messages in this file describe the definitions found in .proto files.
+// A valid .proto file can be translated directly to a FileDescriptorProto
+// without any other information (e.g. without reading its imports).
+
+
+
+package google.protobuf;
+option java_package = "com.google.protobuf";
+option java_outer_classname = "DescriptorProtos";
+
+// descriptor.proto must be optimized for speed because reflection-based
+// algorithms don't work during bootstrapping.
+option optimize_for = SPEED;
+
+// The protocol compiler can output a FileDescriptorSet containing the .proto
+// files it parses.
+message FileDescriptorSet {
+  repeated FileDescriptorProto file = 1;
+}
+
+// Describes a complete .proto file.
+message FileDescriptorProto {
+  optional string name = 1;       // file name, relative to root of source tree
+  optional string package = 2;    // e.g. "foo", "foo.bar", etc.
+
+  // Names of files imported by this file.
+  repeated string dependency = 3;
+
+  // All top-level definitions in this file.
+  repeated DescriptorProto message_type = 4;
+  repeated EnumDescriptorProto enum_type = 5;
+  repeated ServiceDescriptorProto service = 6;
+  repeated FieldDescriptorProto extension = 7;
+
+  optional FileOptions options = 8;
+}
+
+// Describes a message type.
+message DescriptorProto {
+  optional string name = 1;
+
+  repeated FieldDescriptorProto field = 2;
+  repeated FieldDescriptorProto extension = 6;
+
+  repeated DescriptorProto nested_type = 3;
+  repeated EnumDescriptorProto enum_type = 4;
+
+  message ExtensionRange {
+    optional int32 start = 1;
+    optional int32 end = 2;
+  }
+  repeated ExtensionRange extension_range = 5;
+
+  optional MessageOptions options = 7;
+}
+
+// Describes a field within a message.
+message FieldDescriptorProto {
+  enum Type {
+    // 0 is reserved for errors.
+    // Order is weird for historical reasons.
+    TYPE_DOUBLE         = 1;
+    TYPE_FLOAT          = 2;
+    TYPE_INT64          = 3;   // Not ZigZag encoded.  Negative numbers
+                               // take 10 bytes.  Use TYPE_SINT64 if negative
+                               // values are likely.
+    TYPE_UINT64         = 4;
+    TYPE_INT32          = 5;   // Not ZigZag encoded.  Negative numbers
+                               // take 10 bytes.  Use TYPE_SINT32 if negative
+                               // values are likely.
+    TYPE_FIXED64        = 6;
+    TYPE_FIXED32        = 7;
+    TYPE_BOOL           = 8;
+    TYPE_STRING         = 9;
+    TYPE_GROUP          = 10;  // Tag-delimited aggregate.
+    TYPE_MESSAGE        = 11;  // Length-delimited aggregate.
+
+    // New in version 2.
+    TYPE_BYTES          = 12;
+    TYPE_UINT32         = 13;
+    TYPE_ENUM           = 14;
+    TYPE_SFIXED32       = 15;
+    TYPE_SFIXED64       = 16;
+    TYPE_SINT32         = 17;  // Uses ZigZag encoding.
+    TYPE_SINT64         = 18;  // Uses ZigZag encoding.
+  };
+
+  enum Label {
+    // 0 is reserved for errors
+    LABEL_OPTIONAL      = 1;
+    LABEL_REQUIRED      = 2;
+    LABEL_REPEATED      = 3;
+    // TODO(sanjay): Should we add LABEL_MAP?
+  };
+
+  optional string name = 1;
+  optional int32 number = 3;
+  optional Label label = 4;
+
+  // If type_name is set, this need not be set.  If both this and type_name
+  // are set, this must be either TYPE_ENUM or TYPE_MESSAGE.
+  optional Type type = 5;
+
+  // For message and enum types, this is the name of the type.  If the name
+  // starts with a '.', it is fully-qualified.  Otherwise, C++-like scoping
+  // rules are used to find the type (i.e. first the nested types within this
+  // message are searched, then within the parent, on up to the root
+  // namespace).
+  optional string type_name = 6;
+
+  // For extensions, this is the name of the type being extended.  It is
+  // resolved in the same manner as type_name.
+  optional string extendee = 2;
+
+  // For numeric types, contains the original text representation of the value.
+  // For booleans, "true" or "false".
+  // For strings, contains the default text contents (not escaped in any way).
+  // For bytes, contains the C escaped value.  All bytes >= 128 are escaped.
+  // TODO(kenton):  Base-64 encode?
+  optional string default_value = 7;
+
+  optional FieldOptions options = 8;
+}
+
+// Describes an enum type.
+message EnumDescriptorProto {
+  optional string name = 1;
+
+  repeated EnumValueDescriptorProto value = 2;
+
+  optional EnumOptions options = 3;
+}
+
+// Describes a value within an enum.
+message EnumValueDescriptorProto {
+  optional string name = 1;
+  optional int32 number = 2;
+
+  optional EnumValueOptions options = 3;
+}
+
+// Describes a service.
+message ServiceDescriptorProto {
+  optional string name = 1;
+  repeated MethodDescriptorProto method = 2;
+
+  optional ServiceOptions options = 3;
+}
+
+// Describes a method of a service.
+message MethodDescriptorProto {
+  optional string name = 1;
+
+  // Input and output type names.  These are resolved in the same way as
+  // FieldDescriptorProto.type_name, but must refer to a message type.
+  optional string input_type = 2;
+  optional string output_type = 3;
+
+  optional MethodOptions options = 4;
+}
+
+// ===================================================================
+// Options
+
+// Each of the definitions above may have "options" attached.  These are
+// just annotations which may cause code to be generated slightly differently
+// or may contain hints for code that manipulates protocol messages.
+//
+// Clients may define custom options as extensions of the *Options messages.
+// These extensions may not yet be known at parsing time, so the parser cannot
+// store the values in them.  Instead it stores them in a field in the *Options
+// message called uninterpreted_option. This field must have the same name
+// across all *Options messages. We then use this field to populate the
+// extensions when we build a descriptor, at which point all protos have been
+// parsed and so all extensions are known.
+//
+// Extension numbers for custom options may be chosen as follows:
+// * For options which will only be used within a single application or
+//   organization, or for experimental options, use field numbers 50000
+//   through 99999.  It is up to you to ensure that you do not use the
+//   same number for multiple options.
+// * For options which will be published and used publicly by multiple
+//   independent entities, e-mail kenton@google.com to reserve extension
+//   numbers.  Simply tell me how many you need and I'll send you back a
+//   set of numbers to use -- there's no need to explain how you intend to
+//   use them.  If this turns out to be popular, a web service will be set up
+//   to automatically assign option numbers.
+
+
+message FileOptions {
+
+  // Sets the Java package where classes generated from this .proto will be
+  // placed.  By default, the proto package is used, but this is often
+  // inappropriate because proto packages do not normally start with backwards
+  // domain names.
+  optional string java_package = 1;
+
+
+  // If set, all the classes from the .proto file are wrapped in a single
+  // outer class with the given name.  This applies to both Proto1
+  // (equivalent to the old "--one_java_file" option) and Proto2 (where
+  // a .proto always translates to a single class, but you may want to
+  // explicitly choose the class name).
+  optional string java_outer_classname = 8;
+
+  // If set true, then the Java code generator will generate a separate .java
+  // file for each top-level message, enum, and service defined in the .proto
+  // file.  Thus, these types will *not* be nested inside the outer class
+  // named by java_outer_classname.  However, the outer class will still be
+  // generated to contain the file's getDescriptor() method as well as any
+  // top-level extensions defined in the file.
+  optional bool java_multiple_files = 10 [default=false];
+
+  // Generated classes can be optimized for speed or code size.
+  enum OptimizeMode {
+    SPEED = 1;      // Generate complete code for parsing, serialization, etc.
+    CODE_SIZE = 2;  // Use ReflectionOps to implement these methods.
+  }
+  optional OptimizeMode optimize_for = 9 [default=SPEED];
+
+
+
+  // The parser stores options it doesn't recognize here. See above.
+  repeated UninterpretedOption uninterpreted_option = 999;
+
+  // Clients can define custom options in extensions of this message. See above.
+  extensions 1000 to max;
+}
+
+message MessageOptions {
+  // Set true to use the old proto1 MessageSet wire format for extensions.
+  // This is provided for backwards-compatibility with the MessageSet wire
+  // format.  You should not use this for any other reason:  It's less
+  // efficient, has fewer features, and is more complicated.
+  //
+  // The message must be defined exactly as follows:
+  //   message Foo {
+  //     option message_set_wire_format = true;
+  //     extensions 4 to max;
+  //   }
+  // Note that the message cannot have any defined fields; MessageSets only
+  // have extensions.
+  //
+  // All extensions of your type must be singular messages; e.g. they cannot
+  // be int32s, enums, or repeated messages.
+  //
+  // Because this is an option, the above two restrictions are not enforced by
+  // the protocol compiler.
+  optional bool message_set_wire_format = 1 [default=false];
+
+  // The parser stores options it doesn't recognize here. See above.
+  repeated UninterpretedOption uninterpreted_option = 999;
+
+  // Clients can define custom options in extensions of this message. See above.
+  extensions 1000 to max;
+}
+
+message FieldOptions {
+  // The ctype option instructs the C++ code generator to use a different
+  // representation of the field than it normally would.  See the specific
+  // options below.  This option is not yet implemented in the open source
+  // release -- sorry, we'll try to include it in a future version!
+  optional CType ctype = 1;
+  enum CType {
+    CORD = 1;
+
+    STRING_PIECE = 2;
+  }
+  // The packed option can be enabled for repeated primitive fields to enable
+  // a more efficient representation on the wire. Rather than repeatedly
+  // writing the tag and type for each element, the entire array is encoded as
+  // a single length-delimited blob.
+  optional bool packed = 2;
+
+  // Is this field deprecated?
+  // Depending on the target platform, this can emit Deprecated annotations
+  // for accessors, or it will be completely ignored; in the very least, this
+  // is a formalization for deprecating fields.
+  optional bool deprecated = 3 [default=false];
+
+  // EXPERIMENTAL.  DO NOT USE.
+  // For "map" fields, the name of the field in the enclosed type that
+  // is the key for this map.  For example, suppose we have:
+  //   message Item {
+  //     required string name = 1;
+  //     required string value = 2;
+  //   }
+  //   message Config {
+  //     repeated Item items = 1 [experimental_map_key="name"];
+  //   }
+  // In this situation, the map key for Item will be set to "name".
+  // TODO: Fully-implement this, then remove the "experimental_" prefix.
+  optional string experimental_map_key = 9;
+
+  // The parser stores options it doesn't recognize here. See above.
+  repeated UninterpretedOption uninterpreted_option = 999;
+
+  // Clients can define custom options in extensions of this message. See above.
+  extensions 1000 to max;
+}
+
+message EnumOptions {
+
+  // The parser stores options it doesn't recognize here. See above.
+  repeated UninterpretedOption uninterpreted_option = 999;
+
+  // Clients can define custom options in extensions of this message. See above.
+  extensions 1000 to max;
+}
+
+message EnumValueOptions {
+  // The parser stores options it doesn't recognize here. See above.
+  repeated UninterpretedOption uninterpreted_option = 999;
+
+  // Clients can define custom options in extensions of this message. See above.
+  extensions 1000 to max;
+}
+
+message ServiceOptions {
+
+  // Note:  Field numbers 1 through 32 are reserved for Google's internal RPC
+  //   framework.  We apologize for hoarding these numbers to ourselves, but
+  //   we were already using them long before we decided to release Protocol
+  //   Buffers.
+
+  // The parser stores options it doesn't recognize here. See above.
+  repeated UninterpretedOption uninterpreted_option = 999;
+
+  // Clients can define custom options in extensions of this message. See above.
+  extensions 1000 to max;
+}
+
+message MethodOptions {
+
+  // Note:  Field numbers 1 through 32 are reserved for Google's internal RPC
+  //   framework.  We apologize for hoarding these numbers to ourselves, but
+  //   we were already using them long before we decided to release Protocol
+  //   Buffers.
+
+  // The parser stores options it doesn't recognize here. See above.
+  repeated UninterpretedOption uninterpreted_option = 999;
+
+  // Clients can define custom options in extensions of this message. See above.
+  extensions 1000 to max;
+}
+
+// A message representing a option the parser does not recognize. This only
+// appears in options protos created by the compiler::Parser class.
+// DescriptorPool resolves these when building Descriptor objects. Therefore,
+// options protos in descriptor objects (e.g. returned by Descriptor::options(),
+// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions
+// in them.
+message UninterpretedOption {
+  // The name of the uninterpreted option.  Each string represents a segment in
+  // a dot-separated name.  is_extension is true iff a segment represents an
+  // extension (denoted with parentheses in options specs in .proto files).
+  // E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents
+  // "foo.(bar.baz).qux".
+  message NamePart {
+    required string name_part = 1;
+    required bool is_extension = 2;
+  }
+  repeated NamePart name = 2;
+
+  // The value of the uninterpreted option, in whatever type the tokenizer
+  // identified it as during parsing. Exactly one of these should be set.
+  optional string identifier_value = 3;
+  optional uint64 positive_int_value = 4;
+  optional int64 negative_int_value = 5;
+  optional double double_value = 6;
+  optional bytes string_value = 7;
+}
thirdparty/proto-buf.net/Licence.txt
@@ -0,0 +1,20 @@
+The core Protocol Buffers technology is provided courtesy of Google.
+At the time of writing, this is released under the BSD license.
+Full details can be found here:
+
+http://code.google.com/p/protobuf/
+
+
+This .NET implementation is Copyright 2008 Marc Gravell
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
thirdparty/proto-buf.net/protobuf-net.dll
Binary file
thirdparty/proto-buf.net/protobuf-net.Extensions.dll
Binary file
thirdparty/proto-buf.net/protobuf-net.Extensions.pdb
Binary file
thirdparty/proto-buf.net/protobuf-net.Extensions.XML
@@ -0,0 +1,76 @@
+<?xml version="1.0"?>
+<doc>
+    <assembly>
+        <name>protobuf-net.Extensions</name>
+    </assembly>
+    <members>
+        <member name="T:ProtoBuf.Caching.ByteSegmentComparer">
+            <summary>
+            A comparer (for dictionary use) that can compare segments of buffers; the
+            intent being to avoid having to encode/decode strings
+            </summary>
+            <remarks>It is the responsibility of the consuming code not to mutate
+            the byte[] in a dictionary</remarks>
+        </member>
+        <member name="T:ProtoBuf.Caching.Enyim.NetTranscoder">
+            <summary>
+            Acts as a transcoder compatible with the "enyim" client, swapping
+            BinaryFormatter for protobuf-net's Serializer
+            </summary>
+        </member>
+        <member name="T:ProtoBuf.ServiceModel.Client.ProtoClientExtensions">
+            <summary>
+            Provides extension methods for interacting with RPC via expressions, rather than
+            code-generation or reflection.
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.Client.ProtoClientExtensions.Invoke``2(ProtoBuf.ServiceModel.Client.ProtoClient{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}})">
+            <summary>
+            Performs a synchronous RPC operation on the given service.
+            </summary>
+            <typeparam name="TService">The service being used.</typeparam>
+            <typeparam name="TResult">The result of the RPC call.</typeparam>
+            <param name="client">The client to use to invoke the RPC call.</param>
+            <param name="operation">An expression indicating the operation to perform.</param>
+            <returns>The value of the RPC call.</returns>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.Client.ProtoClientExtensions.Invoke``1(ProtoBuf.ServiceModel.Client.ProtoClient{``0},System.Linq.Expressions.Expression{System.Action{``0}})">
+            <summary>
+            Performs a synchronous RPC operation on the given service.
+            </summary>
+            <typeparam name="TService">The service being used.</typeparam>
+            <param name="client">The client to use to invoke the RPC call.</param>
+            <param name="operation">An expression indicating the operation to perform.</param>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.Client.ProtoClientExtensions.InvokeAsync``2(ProtoBuf.ServiceModel.Client.ProtoClient{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Action{System.Func{``1}})">
+            <summary>
+            Performs an asynchronous RPC operation on the given service.
+            </summary>
+            <typeparam name="TService">The service being used.</typeparam>
+            <typeparam name="TResult">The result of the RPC call.</typeparam>
+            <param name="client">The client to use to invoke the RPC call.</param>
+            <param name="operation">An expression indicating the operation to perform.</param>
+            <param name="callback">A delegate that is invoked when the operation is complete. The
+            callback is additionally given an `Action` that can be invoked to obtain the return
+            value of the call, or to raise any exception
+            associated with the call.</param>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.Client.ProtoClientExtensions.InvokeAsync``1(ProtoBuf.ServiceModel.Client.ProtoClient{``0},System.Linq.Expressions.Expression{System.Action{``0}},System.Action{System.Action})">
+            <summary>
+            Performs an asynchronous RPC operation on the given service.
+            </summary>
+            <typeparam name="TService">The service being used.</typeparam>
+            <param name="client">The client to use to invoke the RPC call.</param>
+            <param name="operation">An expression indicating the operation to perform.</param>
+            <param name="callback">A delegate that is invoked when the operation is complete. The
+            callback is additionally given an `Action` that can be invoked to raise any exception
+            associated with the call.</param>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.Client.ProtoClientExtensions.TryResolveField(System.Linq.Expressions.Expression,System.Reflection.FieldInfo@,System.Object@)">
+            <summary>
+            Checks that the expression is a field-based member-access operation; if so, it attempts
+            to resolve the instance hosting the field. This is used as the basis of by-ref arguments.
+            </summary>
+        </member>
+    </members>
+</doc>
thirdparty/proto-buf.net/protobuf-net.pdb
Binary file
thirdparty/proto-buf.net/protobuf-net.xml
@@ -0,0 +1,1572 @@
+<?xml version="1.0"?>
+<doc>
+    <assembly>
+        <name>protobuf-net</name>
+    </assembly>
+    <members>
+        <member name="T:ProtoBuf.Extensible">
+            <summary>
+            Simple base class for supporting unexpected fields allowing
+            for loss-less round-tips/merge, even if the data is not understod.
+            The additional fields are (by default) stored in-memory in a buffer.
+            </summary>
+            <remarks>As an example of an alternative implementation, you might
+            choose to use the file system (temporary files) as the back-end, tracking
+            only the paths [such an object would ideally be IDisposable and use
+            a finalizer to ensure that the files are removed].</remarks>
+            <seealso cref="T:ProtoBuf.IExtensible"/>
+        </member>
+        <member name="T:ProtoBuf.IExtensible">
+            <summary>
+            Indicates that the implementing type has support for protocol-buffer
+            <see cref="T:ProtoBuf.IExtension">extensions</see>.
+            </summary>
+            <remarks>Can be implemented by deriving from <see cref="T:ProtoBuf.Extensible"/>.</remarks>
+        </member>
+        <member name="M:ProtoBuf.IExtensible.GetExtensionObject(System.Boolean)">
+            <summary>
+            Retrieves the <see cref="T:ProtoBuf.IExtension">extension</see> object for the current
+            instance, optionally creating it if it does not already exist.
+            </summary>
+            <param name="createIfMissing">Should a new extension object be
+            created if it does not already exist?</param>
+            <returns>The extension object if it exists (or was created), or null
+            if the extension object does not exist or is not available.</returns>
+            <remarks>The <c>createIfMissing</c> argument is false during serialization,
+            and true during deserialization upon encountering unexpected fields.</remarks>
+        </member>
+        <member name="M:ProtoBuf.Extensible.GetExtensionObject(System.Boolean)">
+            <summary>
+            Retrieves the <see cref="T:ProtoBuf.IExtension">extension</see> object for the current
+            instance, optionally creating it if it does not already exist.
+            </summary>
+            <param name="createIfMissing">Should a new extension object be
+            created if it does not already exist?</param>
+            <returns>The extension object if it exists (or was created), or null
+            if the extension object does not exist or is not available.</returns>
+            <remarks>The <c>createIfMissing</c> argument is false during serialization,
+            and true during deserialization upon encountering unexpected fields.</remarks>
+        </member>
+        <member name="M:ProtoBuf.Extensible.GetExtensionObject(ProtoBuf.IExtension@,System.Boolean)">
+            <summary>
+            Provides a simple, default implementation for <see cref="T:ProtoBuf.IExtension">extension</see> support,
+            optionally creating it if it does not already exist. Designed to be called by
+            classes implementing <see cref="T:ProtoBuf.IExtensible"/>.
+            </summary>
+            <param name="createIfMissing">Should a new extension object be
+            created if it does not already exist?</param>
+            <param name="extensionObject">The extension field to check (and possibly update).</param>
+            <returns>The extension object if it exists (or was created), or null
+            if the extension object does not exist or is not available.</returns>
+            <remarks>The <c>createIfMissing</c> argument is false during serialization,
+            and true during deserialization upon encountering unexpected fields.</remarks>
+        </member>
+        <member name="M:ProtoBuf.Extensible.AppendValue``1(ProtoBuf.IExtensible,System.Int32,``0)">
+            <summary>
+            Appends the value as an additional (unexpected) data-field for the instance.
+            Note that for non-repeated sub-objects, this equates to a merge operation;
+            for repeated sub-objects this adds a new instance to the set; for simple
+            values the new value supercedes the old value.
+            </summary>
+            <remarks>Note that appending a value does not remove the old value from
+            the stream; avoid repeatedly appending values for the same field.</remarks>
+            <typeparam name="TValue">The type of the value to append.</typeparam>
+            <param name="instance">The extensible object to append the value to.</param>
+            <param name="tag">The field identifier; the tag should not be defined as a known data-field for the instance.</param>
+            <param name="value">The value to append.</param>
+        </member>
+        <member name="M:ProtoBuf.Extensible.AppendValue``1(ProtoBuf.IExtensible,System.Int32,ProtoBuf.DataFormat,``0)">
+            <summary>
+            Appends the value as an additional (unexpected) data-field for the instance.
+            Note that for non-repeated sub-objects, this equates to a merge operation;
+            for repeated sub-objects this adds a new instance to the set; for simple
+            values the new value supercedes the old value.
+            </summary>
+            <remarks>Note that appending a value does not remove the old value from
+            the stream; avoid repeatedly appending values for the same field.</remarks>
+            <typeparam name="TValue">The data-type of the field.</typeparam>
+            <param name="format">The data-format to use when encoding the value.</param>
+            <param name="instance">The extensible object to append the value to.</param>
+            <param name="tag">The field identifier; the tag should not be defined as a known data-field for the instance.</param>
+            <param name="value">The value to append.</param>
+        </member>
+        <member name="M:ProtoBuf.Extensible.GetValue``1(ProtoBuf.IExtensible,System.Int32)">
+            <summary>
+            Queries an extensible object for an additional (unexpected) data-field for the instance.
+            The value returned is the composed value after merging any duplicated content; if the
+            value is "repeated" (a list), then use GetValues instead.
+            </summary>
+            <typeparam name="TValue">The data-type of the field.</typeparam>
+            <param name="instance">The extensible object to obtain the value from.</param>
+            <param name="tag">The field identifier; the tag should not be defined as a known data-field for the instance.</param>
+            <returns>The effective value of the field, or the default value if not found.</returns>
+        </member>
+        <member name="M:ProtoBuf.Extensible.GetValue``1(ProtoBuf.IExtensible,System.Int32,ProtoBuf.DataFormat)">
+            <summary>
+            Queries an extensible object for an additional (unexpected) data-field for the instance.
+            The value returned is the composed value after merging any duplicated content; if the
+            value is "repeated" (a list), then use GetValues instead.
+            </summary>
+            <typeparam name="TValue">The data-type of the field.</typeparam>
+            <param name="instance">The extensible object to obtain the value from.</param>
+            <param name="tag">The field identifier; the tag should not be defined as a known data-field for the instance.</param>
+            <param name="format">The data-format to use when decoding the value.</param>
+            <returns>The effective value of the field, or the default value if not found.</returns>
+        </member>
+        <member name="M:ProtoBuf.Extensible.TryGetValue``1(ProtoBuf.IExtensible,System.Int32,``0@)">
+            <summary>
+            Queries an extensible object for an additional (unexpected) data-field for the instance.
+            The value returned (in "value") is the composed value after merging any duplicated content;
+            if the value is "repeated" (a list), then use GetValues instead.
+            </summary>
+            <typeparam name="TValue">The data-type of the field.</typeparam>
+            <param name="value">The effective value of the field, or the default value if not found.</param>
+            <param name="instance">The extensible object to obtain the value from.</param>
+            <param name="tag">The field identifier; the tag should not be defined as a known data-field for the instance.</param>
+            <returns>True if data for the field was present, false otherwise.</returns>
+        </member>
+        <member name="M:ProtoBuf.Extensible.TryGetValue``1(ProtoBuf.IExtensible,System.Int32,ProtoBuf.DataFormat,``0@)">
+            <summary>
+            Queries an extensible object for an additional (unexpected) data-field for the instance.
+            The value returned (in "value") is the composed value after merging any duplicated content;
+            if the value is "repeated" (a list), then use GetValues instead.
+            </summary>
+            <typeparam name="TValue">The data-type of the field.</typeparam>
+            <param name="value">The effective value of the field, or the default value if not found.</param>
+            <param name="instance">The extensible object to obtain the value from.</param>
+            <param name="tag">The field identifier; the tag should not be defined as a known data-field for the instance.</param>
+            <param name="format">The data-format to use when decoding the value.</param>
+            <returns>True if data for the field was present, false otherwise.</returns>
+        </member>
+        <member name="M:ProtoBuf.Extensible.TryGetValue``1(ProtoBuf.IExtensible,System.Int32,ProtoBuf.DataFormat,System.Boolean,``0@)">
+            <summary>
+            Queries an extensible object for an additional (unexpected) data-field for the instance.
+            The value returned (in "value") is the composed value after merging any duplicated content;
+            if the value is "repeated" (a list), then use GetValues instead.
+            </summary>
+            <typeparam name="TValue">The data-type of the field.</typeparam>
+            <param name="value">The effective value of the field, or the default value if not found.</param>
+            <param name="instance">The extensible object to obtain the value from.</param>
+            <param name="tag">The field identifier; the tag should not be defined as a known data-field for the instance.</param>
+            <param name="format">The data-format to use when decoding the value.</param>
+            <param name="allowDefinedTag">Allow tags that are present as part of the definition; for example, to query unknown enum values.</param>
+            <returns>True if data for the field was present, false otherwise.</returns>
+        </member>
+        <member name="M:ProtoBuf.Extensible.GetValues``1(ProtoBuf.IExtensible,System.Int32)">
+            <summary>
+            Queries an extensible object for an additional (unexpected) data-field for the instance.
+            Each occurrence of the field is yielded separately, making this usage suitable for "repeated"
+            (list) fields.
+            </summary>
+            <remarks>The extended data is processed lazily as the enumerator is iterated.</remarks>
+            <typeparam name="TValue">The data-type of the field.</typeparam>
+            <param name="instance">The extensible object to obtain the value from.</param>
+            <param name="tag">The field identifier; the tag should not be defined as a known data-field for the instance.</param>
+            <returns>An enumerator that yields each occurrence of the field.</returns>
+        </member>
+        <member name="M:ProtoBuf.Extensible.GetValues``1(ProtoBuf.IExtensible,System.Int32,ProtoBuf.DataFormat)">
+            <summary>
+            Queries an extensible object for an additional (unexpected) data-field for the instance.
+            Each occurrence of the field is yielded separately, making this usage suitable for "repeated"
+            (list) fields.
+            </summary>
+            <remarks>The extended data is processed lazily as the enumerator is iterated.</remarks>
+            <typeparam name="TValue">The data-type of the field.</typeparam>
+            <param name="instance">The extensible object to obtain the value from.</param>
+            <param name="tag">The field identifier; the tag should not be defined as a known data-field for the instance.</param>
+            <param name="format">The data-format to use when decoding the value.</param>
+            <returns>An enumerator that yields each occurrence of the field.</returns>
+        </member>
+        <member name="T:ProtoBuf.Serializer">
+            <summary>
+            Provides protocol-buffer serialization capability for concrete, attributed types. 
+            </summary>
+            <remarks>
+            Protocol-buffer serialization is a compact binary format, designed to take
+            advantage of sparse data and knowledge of specific data types; it is also
+            extensible, allowing a type to be deserialized / merged even if some data is
+            not recognised.
+            </remarks>
+        </member>
+        <member name="F:ProtoBuf.Serializer.ListItemTag">
+            <summary>
+            The implicit tag used when serializing lists and other enumerable data.
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.Serializer.TryGetTag(System.Reflection.MemberInfo,System.Int32@,System.String@,ProtoBuf.DataFormat@,ProtoBuf.MemberSerializationOptions@)">
+            <summary>
+            Supports various different property metadata patterns:
+            [ProtoMember] is the most specific, allowing the data-format to be set.
+            [DataMember], [XmlElement] are supported for compatibility.
+            In any event, there must be a unique positive Tag/Order.
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.Serializer.Deserialize``1(System.IO.Stream)">
+            <summary>
+            Creates a new instance from a protocol-buffer stream
+            </summary>
+            <typeparam name="T">The type to be created.</typeparam>
+            <param name="source">The binary stream to apply to the new instance (cannot be null).</param>
+            <returns>A new, initialized instance.</returns>
+        </member>
+        <member name="M:ProtoBuf.Serializer.DeserializeWithLengthPrefix``1(System.IO.Stream)">
+            <summary>
+            Creates a new instance from a protocol-buffer stream that has a length-prefix
+            on data (to assist with network IO).
+            </summary>
+            <typeparam name="T">The type to be created.</typeparam>
+            <param name="source">The binary stream to apply to the new instance (cannot be null).</param>
+            <returns>A new, initialized instance.</returns>
+        </member>
+        <member name="M:ProtoBuf.Serializer.DeserializeItems``1(System.IO.Stream,ProtoBuf.PrefixStyle,System.Int32)">
+            <summary>
+            Reads a sequence of consecutive length-prefixed items from a stream, using
+            either base-128 or fixed-length prefixes. Base-128 prefixes with a tag
+            are directly comparable to serializing multiple items in succession
+            (use the <see cref="F:ProtoBuf.Serializer.ListItemTag"/> tag to emulate the implicit behavior
+            when serializing a list/array). When a tag is
+            specified, any records with different tags are silently omitted. The
+            tag is ignored. The tag is ignores for fixed-length prefixes.
+            </summary>
+            <typeparam name="T">The type of object to deserialize.</typeparam>
+            <param name="source">The binary stream containing the serialized records.</param>
+            <param name="style">The prefix style used in the data.</param>
+            <param name="tag">The tag of records to return (if non-positive, then no tag is
+            expected and all records are returned).</param>
+            <returns>The sequence of deserialized objects.</returns>
+        </member>
+        <member name="M:ProtoBuf.Serializer.DeserializeWithLengthPrefix``1(System.IO.Stream,ProtoBuf.PrefixStyle)">
+            <summary>
+            Creates a new instance from a protocol-buffer stream that has a length-prefix
+            on data (to assist with network IO).
+            </summary>
+            <typeparam name="T">The type to be created.</typeparam>
+            <param name="source">The binary stream to apply to the new instance (cannot be null).</param>
+            <param name="style">How to encode the length prefix.</param>
+            <returns>A new, initialized instance.</returns>
+        </member>
+        <member name="M:ProtoBuf.Serializer.DeserializeWithLengthPrefix``1(System.IO.Stream,ProtoBuf.PrefixStyle,System.Int32)">
+            <summary>
+            Creates a new instance from a protocol-buffer stream that has a length-prefix
+            on data (to assist with network IO).
+            </summary>
+            <typeparam name="T">The type to be created.</typeparam>
+            <param name="source">The binary stream to apply to the new instance (cannot be null).</param>
+            <param name="style">How to encode the length prefix.</param>
+            <param name="tag">The expected tag of the item (only used with base-128 prefix style).</param>
+            <returns>A new, initialized instance.</returns>
+        </member>
+        <member name="M:ProtoBuf.Serializer.TryReadLengthPrefix(System.IO.Stream,ProtoBuf.PrefixStyle,System.Int32@)">
+            <summary>Indicates the number of bytes expected for the next message.</summary>
+            <param name="source">The stream containing the data to investigate for a length.</param>
+            <param name="style">The algorithm used to encode the length.</param>
+            <param name="length">The length of the message, if it could be identified.</param>
+            <returns>True if a length could be obtained, false otherwise.</returns>
+        </member>
+        <member name="M:ProtoBuf.Serializer.TryReadLengthPrefix(System.Byte[],System.Int32,System.Int32,ProtoBuf.PrefixStyle,System.Int32@)">
+            <summary>Indicates the number of bytes expected for the next message.</summary>
+            <param name="buffer">The buffer containing the data to investigate for a length.</param>
+            <param name="index">The offset of the first byte to read from the buffer.</param>
+            <param name="count">The number of bytes to read from the buffer.</param>
+            <param name="style">The algorithm used to encode the length.</param>
+            <param name="length">The length of the message, if it could be identified.</param>
+            <returns>True if a length could be obtained, false otherwise.</returns>
+        </member>
+        <member name="M:ProtoBuf.Serializer.Merge``1(System.IO.Stream,``0)">
+            <summary>
+            Applies a protocol-buffer stream to an existing instance.
+            </summary>
+            <typeparam name="T">The type being merged.</typeparam>
+            <param name="instance">The existing instance to be modified (can be null).</param>
+            <param name="source">The binary stream to apply to the instance (cannot be null).</param>
+            <returns>The updated instance; this may be different to the instance argument if
+            either the original instance was null, or the stream defines a known sub-type of the
+            original instance.</returns>
+        </member>
+        <member name="M:ProtoBuf.Serializer.MergeWithLengthPrefix``1(System.IO.Stream,``0)">
+            <summary>
+            Applies a protocol-buffer stream to an existing instance, using length-prefixed
+            data - useful with network IO.
+            </summary>
+            <typeparam name="T">The type being merged.</typeparam>
+            <param name="instance">The existing instance to be modified (can be null).</param>
+            <param name="source">The binary stream to apply to the instance (cannot be null).</param>
+            <returns>The updated instance; this may be different to the instance argument if
+            either the original instance was null, or the stream defines a known sub-type of the
+            original instance.</returns>
+        </member>
+        <member name="M:ProtoBuf.Serializer.MergeWithLengthPrefix``1(System.IO.Stream,``0,ProtoBuf.PrefixStyle)">
+            <summary>
+            Applies a protocol-buffer stream to an existing instance, using length-prefixed
+            data - useful with network IO.
+            </summary>
+            <typeparam name="T">The type being merged.</typeparam>
+            <param name="instance">The existing instance to be modified (can be null).</param>
+            <param name="source">The binary stream to apply to the instance (cannot be null).</param>
+            <param name="style">How to encode the length prefix.</param>
+            <returns>The updated instance; this may be different to the instance argument if
+            either the original instance was null, or the stream defines a known sub-type of the
+            original instance.</returns>
+        </member>
+        <member name="M:ProtoBuf.Serializer.Serialize``1(System.IO.Stream,``0)">
+            <summary>
+            Writes a protocol-buffer representation of the given instance to the supplied stream.
+            </summary>
+            <typeparam name="T">The type being serialized.</typeparam>
+            <param name="instance">The existing instance to be serialized (cannot be null).</param>
+            <param name="destination">The destination stream to write to.</param>
+        </member>
+        <member name="M:ProtoBuf.Serializer.SerializeWithLengthPrefix``1(System.IO.Stream,``0)">
+            <summary>
+            Writes a protocol-buffer representation of the given instance to the supplied stream,
+            with a length-prefix. This is useful for socket programming,
+            as DeserializeWithLengthPrefix/MergeWithLengthPrefix can be used to read the single object back
+            from an ongoing stream.
+            </summary>
+            <typeparam name="T">The type being serialized.</typeparam>
+            <param name="instance">The existing instance to be serialized (cannot be null).</param>
+            <param name="destination">The destination stream to write to.</param>
+        </member>
+        <member name="M:ProtoBuf.Serializer.SerializeWithLengthPrefix``1(System.IO.Stream,``0,ProtoBuf.PrefixStyle)">
+            <summary>
+            Writes a protocol-buffer representation of the given instance to the supplied stream,
+            with a length-prefix. This is useful for socket programming,
+            as DeserializeWithLengthPrefix/MergeWithLengthPrefix can be used to read the single object back
+            from an ongoing stream.
+            </summary>
+            <typeparam name="T">The type being serialized.</typeparam>
+            <param name="instance">The existing instance to be serialized (cannot be null).</param>
+            <param name="style">How to encode the length prefix.</param>
+            <param name="destination">The destination stream to write to.</param>
+        </member>
+        <member name="M:ProtoBuf.Serializer.SerializeWithLengthPrefix``1(System.IO.Stream,``0,ProtoBuf.PrefixStyle,System.Int32)">
+            <summary>
+            Writes a protocol-buffer representation of the given instance to the supplied stream,
+            with a length-prefix. This is useful for socket programming,
+            as DeserializeWithLengthPrefix/MergeWithLengthPrefix can be used to read the single object back
+            from an ongoing stream.
+            </summary>
+            <typeparam name="T">The type being serialized.</typeparam>
+            <param name="instance">The existing instance to be serialized (cannot be null).</param>
+            <param name="style">How to encode the length prefix.</param>
+            <param name="destination">The destination stream to write to.</param>
+            <param name="tag">The tag used as a prefix to each record (only used with base-128 style prefixes).</param>
+        </member>
+        <member name="M:ProtoBuf.Serializer.CreateFormatter``1">
+            <summary>
+            Creates a new IFormatter that uses protocol-buffer [de]serialization.
+            </summary>
+            <typeparam name="T">The type of object to be [de]deserialized by the formatter.</typeparam>
+            <returns>A new IFormatter to be used during [de]serialization.</returns>
+        </member>
+        <member name="M:ProtoBuf.Serializer.Serialize``1(System.Runtime.Serialization.SerializationInfo,``0)">
+            <summary>
+            Writes a protocol-buffer representation of the given instance to the supplied SerializationInfo.
+            </summary>
+            <typeparam name="T">The type being serialized.</typeparam>
+            <param name="instance">The existing instance to be serialized (cannot be null).</param>
+            <param name="info">The destination SerializationInfo to write to.</param>
+        </member>
+        <member name="M:ProtoBuf.Serializer.Merge``1(System.Runtime.Serialization.SerializationInfo,``0)">
+            <summary>
+            Applies a protocol-buffer from a SerializationInfo to an existing instance.
+            </summary>
+            <typeparam name="T">The type being merged.</typeparam>
+            <param name="instance">The existing instance to be modified (cannot be null).</param>
+            <param name="info">The SerializationInfo containing the data to apply to the instance (cannot be null).</param>
+        </member>
+        <member name="M:ProtoBuf.Serializer.Serialize``1(System.Xml.XmlWriter,``0)">
+            <summary>
+            Writes a protocol-buffer representation of the given instance to the supplied XmlWriter.
+            </summary>
+            <typeparam name="T">The type being serialized.</typeparam>
+            <param name="instance">The existing instance to be serialized (cannot be null).</param>
+            <param name="writer">The destination XmlWriter to write to.</param>
+        </member>
+        <member name="M:ProtoBuf.Serializer.Merge``1(System.Xml.XmlReader,``0)">
+            <summary>
+            Applies a protocol-buffer from an XmlReader to an existing instance.
+            </summary>
+            <typeparam name="T">The type being merged.</typeparam>
+            <param name="instance">The existing instance to be modified (cannot be null).</param>
+            <param name="reader">The XmlReader containing the data to apply to the instance (cannot be null).</param>
+        </member>
+        <member name="M:ProtoBuf.Serializer.DeepClone``1(``0)">
+            <summary>
+            Create a deep clone of the supplied instance; any sub-items are also cloned.
+            </summary>
+            <typeparam name="T">The type being cloned.</typeparam>
+            <param name="instance">The existing instance to be cloned.</param>
+            <returns>A new copy, cloned from the supplied instance.</returns>
+        </member>
+        <member name="M:ProtoBuf.Serializer.ChangeType``2(``0)">
+            <summary>
+            Serializes a given instance and deserializes it as a different type;
+            this can be used to translate between wire-compatible objects (where
+            two .NET types represent the same data), or to promote/demote a type
+            through an inheritance hierarchy.
+            </summary>
+            <remarks>No assumption of compatibility is made between the types.</remarks>
+            <typeparam name="TOldType">The type of the object being copied.</typeparam>
+            <typeparam name="TNewType">The type of the new object to be created.</typeparam>
+            <param name="instance">The existing instance to use as a template.</param>
+            <returns>A new instane of type TNewType, with the data from TOldType.</returns>
+        </member>
+        <member name="M:ProtoBuf.Serializer.ChangeType``2(``0,ProtoBuf.SerializationContext)">
+            <summary>
+            As per the public ChangeType, but allows for workspace-sharing to reduce buffer overhead.
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.Serializer.GetProto``1">
+            <summary>
+            Suggest a .proto definition for the given type
+            </summary>
+            <typeparam name="T">The type to generate a .proto definition for</typeparam>
+            <returns>The .proto definition as a string</returns>
+        </member>
+        <member name="M:ProtoBuf.Serializer.PrepareSerializer``1">
+            <summary>
+            Ensures that the serialization algorithm has been prepared for
+            the given type; this can be useful in highly threaded code to
+            ensure that all types are ready ahead of time, avoiding deadlock
+            scenarios.
+            </summary>
+            <typeparam name="T">The object type to prepare.</typeparam>
+        </member>
+        <member name="T:ProtoBuf.Serializer.GlobalOptions">
+            <summary>
+            Global switches that change the behavior of protobuf-net
+            </summary>
+        </member>
+        <member name="P:ProtoBuf.Serializer.GlobalOptions.InferTagFromName">
+            <summary>
+            Global default for that
+            enables/disables automatic tag generation based on the existing name / order
+            of the defined members. See <seealso cref="P:ProtoBuf.ProtoContractAttribute.InferTagFromName"/>
+            for usage and <b>important warning</b> / explanation.
+            You must set the global default before attempting to serialize/deserialize any
+            impacted type.
+            </summary>
+        </member>
+        <member name="T:ProtoBuf.Serializer.NonGeneric">
+            <summary>
+            Provides non-generic, reflection-based access to Serializer functionality
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.Serializer.NonGeneric.SerializeWithLengthPrefix(System.IO.Stream,System.Object,ProtoBuf.PrefixStyle,System.Int32)">
+            <summary>
+            Writes a protocol-buffer representation of the given instance to the supplied stream.
+            </summary>
+            <param name="instance">The existing instance to be serialized (cannot be null).</param>
+            <param name="style">How to encode the length prefix.</param>
+            <param name="destination">The destination stream to write to.</param>
+            <param name="tag">The tag used as a prefix to each record (only used with base-128 style prefixes).</param>
+        </member>
+        <member name="M:ProtoBuf.Serializer.NonGeneric.CanSerialize(System.Type)">
+            <summary>
+            Can the given type be meaningfully with protobuf-net?
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.Serializer.NonGeneric.Serialize(System.IO.Stream,System.Object)">
+            <summary>
+            Writes a protocol-buffer representation of the given instance to the supplied stream.
+            </summary>
+            <param name="instance">The existing instance to be serialized (cannot be null).</param>
+            <param name="destination">The destination stream to write to.</param>
+        </member>
+        <member name="M:ProtoBuf.Serializer.NonGeneric.TryDeserializeWithLengthPrefix(System.IO.Stream,ProtoBuf.PrefixStyle,ProtoBuf.Getter{System.Int32,System.Type},System.Object@)">
+            <summary>
+            Deserialize object of unknown types from in input stream.
+            </summary>
+            <param name="source">The input stream.</param>
+            <param name="style">The prefix style used to encode the lengths.</param>
+            <param name="typeReader">The caller must provide a mechanism to resolve a Type from
+            the tags encountered in the stream. If the delegate returns null, then the instance
+            is skipped - otherwise, the object is deserialized according to type.</param>
+            <param name="item">The deserialized instance, or null if the stream terminated.</param>
+            <returns>True if an object was idenfified; false if the stream terminated. Note
+            that unexpected types are skipped.</returns>
+        </member>
+        <member name="M:ProtoBuf.Serializer.NonGeneric.Deserialize(System.Type,System.IO.Stream)">
+            <summary>
+            Creates a new instance from a protocol-buffer stream
+            </summary>
+            <param name="type">The type to be created.</param>
+            <param name="source">The binary stream to apply to the new instance (cannot be null).</param>
+            <returns>A new, initialized instance.</returns>
+        </member>
+        <member name="M:ProtoBuf.Serializer.NonGeneric.DeepClone(System.Object)">
+            <summary>
+            Create a deep clone of the supplied instance; any sub-items are also cloned.
+            </summary>
+            <param name="instance">The existing instance to be cloned.</param>
+            <returns>A new copy, cloned from the supplied instance.</returns>
+        </member>
+        <member name="F:ProtoBuf.StreamState.Normal">
+            <summary>
+            Indicates that an EOF is not anticipated, and so will throw an exception.
+            </summary>
+        </member>
+        <member name="F:ProtoBuf.StreamState.EofExpected">
+            <summary>
+            Indicates that an EOF is acceptable at the current time and will
+            not throw an exception.
+            </summary>
+        </member>
+        <member name="F:ProtoBuf.StreamState.Peeked">
+            <summary>
+            Indicates that we have previously obtained a field value from
+            the stream that should be consumed next.
+            </summary>
+        </member>
+        <member name="F:ProtoBuf.StreamState.Eof">
+            <summary>
+            Indicates that we have found the end of the stream; this is **only**
+            used to commicate to "Try", and should not persist.
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.SerializationContext.Push(System.Object)">
+            <summary>
+            Allows for recursion detection by capturing
+            the call tree; this only takes effect after
+            an initial threshold call-depth is reached.
+            If the object is already in the call-tree,
+            an exception is thrown.
+            </summary>
+            <param name="obj">The item being processed (start).</param>
+        </member>
+        <member name="M:ProtoBuf.SerializationContext.Push">
+            <summary>
+            Only used during debugging for the text nest-level
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.SerializationContext.Pop">
+            <summary>
+            Only used during debugging for the text nest-level
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.SerializationContext.Pop(System.Object)">
+            <summary>
+            Removes an object from the call-tree.
+            </summary>
+            <remarks>The object is not checked for validity (peformance);
+            ensure that objects are pushed/popped correctly.</remarks>
+            <param name="obj">The item being processed (end).</param>
+        </member>
+        <member name="M:ProtoBuf.SerializationContext.DecodeUInt32Fixed(System.IO.Stream)">
+            <summary>
+            Slow (unbuffered) read from a stream; used to avoid issues
+            with buffers when performing network IO.
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.SerializationContext.TryDecodeUInt32Fixed(System.IO.Stream,System.UInt32@)">
+            <summary>
+            Slow (unbuffered) read from a stream; used to avoid issues
+            with buffers when performing network IO.
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.SerializationContext.DecodeUInt32(System.IO.Stream)">
+            <summary>
+            Slow (unbuffered) read from a stream; used to avoid issues
+            with buffers when performing network IO.
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.SerializationContext.SkipStringData(System.IO.Stream)">
+            <summary>
+            Jump a block of data using a base-128 length prefix.
+            </summary>
+            <param name="source">The input stream.</param>
+        </member>
+        <member name="M:ProtoBuf.SerializationContext.TryDecodeUInt32(System.IO.Stream,System.UInt32@)">
+            <summary>
+            Slow (unbuffered) read from a stream; used to avoid issues
+            with buffers when performing network IO.
+            </summary>
+            <returns>True if there is data in the stream and a value can be obtained;
+            False if there is no data in the stream; note that an exception is still
+            thrown if the data is invalid.</returns>
+        </member>
+        <member name="M:ProtoBuf.SerializationContext.Fill(System.Int32,System.Boolean)">
+            <summary>
+            Fills the IO buffer if there is not enough data buffered to complete the current operation.
+            </summary>
+            <param name="required">The maximum number of bytes required by the current operation.</param>
+            <param name="demand">Should an exception be thrown if the data is not available?</param>
+        </member>
+        <member name="M:ProtoBuf.SerializationContext.Fill">
+            <summary>
+            Fills the IO buffer, moving any un-consumed data to the beginning of the cache.
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.SerializationContext.Flush(System.Int32)">
+            <summary>
+            Flushes the IO buffer if there is not enough space to complete the current operation.
+            </summary>
+            <param name="spaceRequired">The maximum number of bytes required by the current operation.</param>
+        </member>
+        <member name="M:ProtoBuf.SerializationContext.Flush">
+            <summary>
+            Flushes the IO buffer, writing any cached data to the underlying stream and resetting the cache.
+            </summary>
+        </member>
+        <member name="T:ProtoBuf.ServiceModel.ProtoBehaviorAttribute">
+            <summary>
+            Uses protocol buffer serialization on the specified operation; note that this
+            must be enabled on both the client and server.
+            </summary>
+        </member>
+        <member name="F:ProtoBuf.WireType.Variant">
+            <summary>
+            Base-128 variant-length encoding
+            </summary>
+        </member>
+        <member name="F:ProtoBuf.WireType.Fixed64">
+            <summary>
+            Fixed-length 8-byte encoding
+            </summary>
+        </member>
+        <member name="F:ProtoBuf.WireType.String">
+            <summary>
+            Length-variant-prefixed encoding
+            </summary>
+        </member>
+        <member name="F:ProtoBuf.WireType.StartGroup">
+            <summary>
+            Indicates the start of a group
+            </summary>
+        </member>
+        <member name="F:ProtoBuf.WireType.EndGroup">
+            <summary>
+            Indicates the end of a group
+            </summary>
+        </member>
+        <member name="F:ProtoBuf.WireType.Fixed32">
+            <summary>
+            Fixed-length 4-byte encoding
+            </summary>
+        </member>
+        <member name="T:ProtoBuf.DataFormat">
+            <summary>
+            Sub-format to use when serializing/deserializing data
+            </summary>
+        </member>
+        <member name="F:ProtoBuf.DataFormat.Default">
+            <summary>
+            Uses the default encoding for the data-type.
+            </summary>
+        </member>
+        <member name="F:ProtoBuf.DataFormat.ZigZag">
+            <summary>
+            When applied to signed integer-based data (including Decimal), this
+            indicates that zigzag variant encoding will be used. This means that values
+            with small magnitude (regardless of sign) take a small amount
+            of space to encode.
+            </summary>
+        </member>
+        <member name="F:ProtoBuf.DataFormat.TwosComplement">
+            <summary>
+            When applied to signed integer-based data (including Decimal), this
+            indicates that two's-complement variant encoding will be used.
+            This means that any -ve number will take 10 bytes (even for 32-bit),
+            so should only be used for compatibility.
+            </summary>
+        </member>
+        <member name="F:ProtoBuf.DataFormat.FixedSize">
+            <summary>
+            When applied to signed integer-based data (including Decimal), this
+            indicates that a fixed amount of space will be used.
+            </summary>
+        </member>
+        <member name="F:ProtoBuf.DataFormat.Group">
+            <summary>
+            When applied to a sub-message, indicates that the value should be treated
+            as group-delimited.
+            </summary>
+        </member>
+        <member name="T:ProtoBuf.ProtoIncludeAttribute">
+            <summary>
+            Indicates the known-types to support for an individual
+            message. This serializes each level in the hierarchy as
+            a nested message to retain wire-compatibility with
+            other protocol-buffer implementations.
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.ProtoIncludeAttribute.#ctor(System.Int32,System.Type)">
+            <summary>
+            Creates a new instance of the ProtoIncludeAttribute.
+            </summary>
+            <param name="tag">The unique index (within the type) that will identify this data.</param>
+            <param name="knownType">The additional type to serialize/deserialize.</param>
+        </member>
+        <member name="M:ProtoBuf.ProtoIncludeAttribute.#ctor(System.Int32,System.String)">
+            <summary>
+            Creates a new instance of the ProtoIncludeAttribute.
+            </summary>
+            <param name="tag">The unique index (within the type) that will identify this data.</param>
+            <param name="knownTypeName">The additional type to serialize/deserialize.</param>
+        </member>
+        <member name="P:ProtoBuf.ProtoIncludeAttribute.Tag">
+            <summary>
+            Gets the unique index (within the type) that will identify this data.
+            </summary>
+        </member>
+        <member name="P:ProtoBuf.ProtoIncludeAttribute.KnownTypeName">
+            <summary>
+            Gets the additional type to serialize/deserialize.
+            </summary>
+        </member>
+        <member name="P:ProtoBuf.ProtoIncludeAttribute.KnownType">
+            <summary>
+            Gets the additional type to serialize/deserialize.
+            </summary>
+        </member>
+        <member name="P:ProtoBuf.ProtoIncludeAttribute.DataFormat">
+            <summary>
+            Specifies whether the inherited sype's sub-message should be
+            written with a length-prefix (default), or with group markers.
+            </summary>
+        </member>
+        <member name="T:ProtoBuf.ProtoContractAttribute">
+            <summary>
+            Indicates that a type is defined for protocol-buffer serialization.
+            </summary>
+        </member>
+        <member name="P:ProtoBuf.ProtoContractAttribute.Name">
+            <summary>
+            Gets or sets the defined name of the type.
+            </summary>
+        </member>
+        <member name="P:ProtoBuf.ProtoContractAttribute.ImplicitFirstTag">
+            <summary>
+            Gets or sets the fist offset to use with implicit field tags;
+            only uesd if ImplicitFields is set.
+            </summary>
+        </member>
+        <member name="P:ProtoBuf.ProtoContractAttribute.ImplicitFields">
+            <summary>
+            Gets or sets the mechanism used to automatically infer field tags
+            for members. This option should be used in advanced scenarios only.
+            Please review the important notes against the ImplicitFields enumeration.
+            </summary>
+        </member>
+        <member name="P:ProtoBuf.ProtoContractAttribute.InferTagFromName">
+            <summary>
+            Enables/disables automatic tag generation based on the existing name / order
+            of the defined members. This option is not used for members marked
+            with ProtoMemberAttribute, as intended to provide compatibility with
+            WCF serialization. WARNING: when adding new fields you must take
+            care to increase the Order for new elements, otherwise data corruption
+            may occur.
+            </summary>
+            <remarks>If not specified, the default is assumed from <see cref="P:ProtoBuf.Serializer.GlobalOptions.InferTagFromName"/>.</remarks>
+        </member>
+        <member name="P:ProtoBuf.ProtoContractAttribute.DataMemberOffset">
+            <summary>
+            Specifies an offset to apply to [DataMember(Order=...)] markers;
+            this is useful when working with mex-generated classes that have
+            a different origin (usually 1 vs 0) than the original data-contract.
+            
+            This value is added to the Order of each member.
+            </summary>
+        </member>
+        <member name="T:ProtoBuf.ProtoEnumAttribute">
+            <summary>
+            Used to define protocol-buffer specific behavior for
+            enumerated values.
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.ProtoEnumAttribute.HasValue">
+            <summary>
+            Indicates whether this instance has a customised value mapping
+            </summary>
+            <returns>true if a specific value is set</returns>
+        </member>
+        <member name="P:ProtoBuf.ProtoEnumAttribute.Value">
+            <summary>
+            Gets or sets the specific value to use for this enum during serialization.
+            </summary>
+        </member>
+        <member name="P:ProtoBuf.ProtoEnumAttribute.Name">
+            <summary>
+            Gets or sets the defined name of the enum, as used in .proto
+            (this name is not used during serialization).
+            </summary>
+        </member>
+        <member name="T:ProtoBuf.ProtoMemberAttribute">
+            <summary>
+            Declares a member to be used in protocol-buffer serialization, using
+            the given Tag. A DataFormat may be used to optimise the serialization
+            format (for instance, using zigzag encoding for negative numbers, or 
+            fixed-length encoding for large values.
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.ProtoMemberAttribute.#ctor(System.Int32)">
+            <summary>
+            Creates a new ProtoMemberAttribute instance.
+            </summary>
+            <param name="tag">Specifies the unique tag used to identify this member within the type.</param>
+        </member>
+        <member name="P:ProtoBuf.ProtoMemberAttribute.Name">
+            <summary>
+            Gets or sets the original name defined in the .proto; not used
+            during serialization.
+            </summary>
+        </member>
+        <member name="P:ProtoBuf.ProtoMemberAttribute.DataFormat">
+            <summary>
+            Gets or sets the data-format to be used when encoding this value.
+            </summary>
+        </member>
+        <member name="P:ProtoBuf.ProtoMemberAttribute.Tag">
+            <summary>
+            Gets the unique tag used to identify this member within the type.
+            </summary>
+        </member>
+        <member name="P:ProtoBuf.ProtoMemberAttribute.IsRequired">
+            <summary>
+            Gets or sets a value indicating whether this member is mandatory.
+            </summary>
+        </member>
+        <member name="P:ProtoBuf.ProtoMemberAttribute.Options">
+            <summary>
+            Gets or sets a value indicating whether this member is packed (lists/arrays).
+            </summary>
+        </member>
+        <member name="T:ProtoBuf.MemberSerializationOptions">
+            <summary>
+            Additional (optional) settings that control serialization of members
+            </summary>
+        </member>
+        <member name="F:ProtoBuf.MemberSerializationOptions.None">
+            <summary>
+            Default; no additional options
+            </summary>
+        </member>
+        <member name="F:ProtoBuf.MemberSerializationOptions.Packed">
+            <summary>
+            Indicates that repeated elements should use packed (length-prefixed) encoding
+            </summary>
+        </member>
+        <member name="F:ProtoBuf.MemberSerializationOptions.Required">
+            <summary>
+            Indicates that the given item is required
+            </summary>
+        </member>
+        <member name="T:ProtoBuf.ProtoPartialMemberAttribute">
+            <summary>
+            Declares a member to be used in protocol-buffer serialization, using
+            the given Tag and MemberName. This allows ProtoMemberAttribute usage
+            even for partial classes where the individual members are not
+            under direct control.
+            A DataFormat may be used to optimise the serialization
+            format (for instance, using zigzag encoding for negative numbers, or 
+            fixed-length encoding for large values.
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.ProtoPartialMemberAttribute.#ctor(System.Int32,System.String)">
+            <summary>
+            Creates a new ProtoMemberAttribute instance.
+            </summary>
+            <param name="tag">Specifies the unique tag used to identify this member within the type.</param>
+            <param name="memberName">Specifies the member to be serialized.</param>
+        </member>
+        <member name="P:ProtoBuf.ProtoPartialMemberAttribute.MemberName">
+            <summary>
+            The name of the member to be serialized.
+            </summary>
+        </member>
+        <member name="T:ProtoBuf.SubStream">
+            <summary>
+            Describes a Stream that wraps an underlying stream but
+            which limits the length. This is used for processing
+            length-prefied messages (string wire-type) so that no
+            complex code is required to manage the end of each
+            object.
+            </summary>
+        </member>
+        <member name="T:ProtoBuf.ExtensibleUtil">
+            <summary>
+            This class acts as an internal wrapper allowing us to do a dynamic
+            methodinfo invoke; an't put into Serializer as don't want on public
+            API; can't put into Serializer&lt;T&gt; since we need to invoke
+            accross classes, which isn't allowed in Silverlight)
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.ExtensibleUtil.GetExtendedValues``1(ProtoBuf.IExtensible,System.Int32,ProtoBuf.DataFormat,System.Boolean,System.Boolean)">
+            <summary>
+            All this does is call GetExtendedValuesTyped with the correct type for "instance";
+            this ensures that we don't get issues with subclasses declaring conflicting types -
+            the caller must respect the fields defined for the type they pass in.
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.ExtensibleUtil.GetExtendedValuesTyped``2(``0,System.Int32,ProtoBuf.DataFormat,System.Boolean,System.Boolean)">
+            <summary>
+            Reads the given value(s) from the instance's stream; the serializer
+            is inferred from TValue and format. For singletons, each occurrence
+            is merged [only applies for sub-objects], and the composed
+            value if yielded once; otherwise ("repeated") each occurrence
+            is yielded separately.
+            </summary>
+            <remarks>Needs to be public to be callable thru reflection in Silverlight</remarks>
+        </member>
+        <member name="M:ProtoBuf.ExtensibleUtil.AppendExtendValue``1(ProtoBuf.IExtensible,System.Int32,ProtoBuf.DataFormat,System.Object)">
+            <summary>
+            All this does is call AppendExtendValueTyped with the correct type for "instance";
+            this ensures that we don't get issues with subclasses declaring conflicting types -
+            the caller must respect the fields defined for the type they pass in.
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.ExtensibleUtil.AppendExtendValueTyped``2(``0,System.Int32,ProtoBuf.DataFormat,``1)">
+            <summary>
+            Stores the given value into the instance's stream; the serializer
+            is inferred from TValue and format.
+            </summary>
+            <remarks>Needs to be public to be callable thru reflection in Silverlight</remarks>
+        </member>
+        <member name="T:ProtoBuf.ProtoException">
+            <summary>
+            Indicates an error during serialization/deserialization of a proto stream.
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.ProtoException.#ctor">
+            <summary>Creates a new ProtoException instance.</summary>
+        </member>
+        <member name="M:ProtoBuf.ProtoException.#ctor(System.String)">
+            <summary>Creates a new ProtoException instance.</summary>
+        </member>
+        <member name="M:ProtoBuf.ProtoException.#ctor(System.String,System.Exception)">
+            <summary>Creates a new ProtoException instance.</summary>
+        </member>
+        <member name="M:ProtoBuf.ProtoException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
+            <summary>Creates a new ProtoException instance.</summary>
+        </member>
+        <member name="T:ProtoBuf.UnknownType">
+            <summary>
+            The (non-extensible) UnknownType is used when deserializing
+            unexpected groups.
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.AsyncUtility.RunAsync``1(ProtoBuf.AsyncBegin{``0},ProtoBuf.AsyncEnd{``0},System.Action{``0},System.Action{System.Exception})">
+            <summary>Simplified calling convention for asynchronous Begin/End operations.</summary>
+            <typeparam name="T">The type of data returned by the async operation.</typeparam>
+            <param name="begin">The start (Begin*) of the async operation.</param>
+            <param name="end">The end (End*) of the async operation.</param>
+            <param name="callback">The operation to perform once the operation has completed and a value received.</param>
+            <param name="exceptionHandler">Callback to invoke when an excetption is thrown during the async operation.</param>
+        </member>
+        <member name="T:ProtoBuf.AsyncBegin`1">
+            <summary>Defines the start of a Begin/End async operation pair.</summary>
+            <typeparam name="T">The type of value returned by the async operation.</typeparam>
+            <param name="operation">The operation to be performed.</param>
+            <param name="state">User-state to be passed to the operation.</param>
+            <returns>A token to the async operation.</returns>
+        </member>
+        <member name="T:ProtoBuf.AsyncEnd`1">
+            <summary>Defines the completion callback of a Begin/End async operation pair.</summary>
+            <typeparam name="T">The type of value returned by the async operation.</typeparam>
+            <param name="operation">The async operation token.</param>
+            <returns>The final value of the async operation.</returns>
+        </member>
+        <member name="T:ProtoBuf.BufferExtension">
+            <summary>
+            Provides a simple buffer-based implementation of an <see cref="T:ProtoBuf.IExtension">extension</see> object.
+            </summary>
+        </member>
+        <member name="T:ProtoBuf.IExtension">
+            <summary>
+            Provides addition capability for supporting unexpected fields during
+            protocol-buffer serialization/deserialization. This allows for loss-less
+            round-trip/merge, even when the data is not fully understood.
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.IExtension.BeginAppend">
+            <summary>
+            Requests a stream into which any unexpected fields can be persisted.
+            </summary>
+            <returns>A new stream suitable for storing data.</returns>
+        </member>
+        <member name="M:ProtoBuf.IExtension.EndAppend(System.IO.Stream,System.Boolean)">
+            <summary>
+            Indicates that all unexpected fields have now been stored. The
+            implementing class is responsible for closing the stream. If
+            "commit" is not true the data may be discarded.
+            </summary>
+            <param name="stream">The stream originally obtained by BeginAppend.</param>
+            <param name="commit">True if the append operation completed successfully.</param>
+        </member>
+        <member name="M:ProtoBuf.IExtension.BeginQuery">
+            <summary>
+            Requests a stream of the unexpected fields previously stored.
+            </summary>
+            <returns>A prepared stream of the unexpected fields.</returns>
+        </member>
+        <member name="M:ProtoBuf.IExtension.EndQuery(System.IO.Stream)">
+            <summary>
+            Indicates that all unexpected fields have now been read. The
+            implementing class is responsible for closing the stream.
+            </summary>
+            <param name="stream">The stream originally obtained by BeginQuery.</param>
+        </member>
+        <member name="M:ProtoBuf.IExtension.GetLength">
+            <summary>
+            Requests the length of the raw binary stream; this is used
+            when serializing sub-entities to indicate the expected size.
+            </summary>
+            <returns>The length of the binary stream representing unexpected data.</returns>
+        </member>
+        <member name="T:ProtoBuf.ProtoBeforeSerializationAttribute">
+            <summary>Specifies a method on the root-contract in an hierarchy to be invoked before serialization.</summary>
+        </member>
+        <member name="T:ProtoBuf.ProtoAfterSerializationAttribute">
+            <summary>Specifies a method on the root-contract in an hierarchy to be invoked after serialization.</summary>
+        </member>
+        <member name="T:ProtoBuf.ProtoBeforeDeserializationAttribute">
+            <summary>Specifies a method on the root-contract in an hierarchy to be invoked before deserialization.</summary>
+        </member>
+        <member name="T:ProtoBuf.ProtoAfterDeserializationAttribute">
+            <summary>Specifies a method on the root-contract in an hierarchy to be invoked after deserialization.</summary>
+        </member>
+        <member name="T:ProtoBuf.AsyncResult">
+            <summary>
+            Represents the function to obtain the return value from an asynchronouse operation;
+            comparable to Func&lt;object&gt;.
+            </summary>
+        </member>
+        <member name="T:ProtoBuf.Getter`2">
+            <summary>
+            Returns the required value from an instance; comparable to Func&lt;TEntity,TValue&gt;
+            </summary>
+        </member>
+        <member name="T:ProtoBuf.Setter`2">
+            <summary>
+            Assigns the required value to an instance; comparable to Action&lt;TEntity,TValue&gt;.
+            </summary>
+        </member>
+        <member name="T:ProtoBuf.ImplicitFields">
+            <summary>
+            Specifies the method used to infer field tags for members of the type
+            under consideration. Tags are deduced using the invariant alphabetic
+            sequence of the members' names; this makes implicit field tags very brittle,
+            and susceptible to changes such as field names (normally an isolated
+            change).
+            </summary>
+        </member>
+        <member name="F:ProtoBuf.ImplicitFields.None">
+            <summary>
+            No members are serialized implicitly; all members require a suitable
+            attribute such as [ProtoMember]. This is the recmomended mode for
+            most scenarios.
+            </summary>
+        </member>
+        <member name="F:ProtoBuf.ImplicitFields.AllPublic">
+            <summary>
+            Public properties and fields are eligible for implicit serialization;
+            this treats the public API as a contract.
+            </summary>
+        </member>
+        <member name="F:ProtoBuf.ImplicitFields.AllFields">
+            <summary>
+            Public and non-public fields are eligible for implicit serialization;
+            this acts as a state/implementation serializer.
+            </summary>
+        </member>
+        <member name="T:ProtoBuf.ObjectFactory`1">
+            <summary>
+            Abstract object factory, used to negate the need for a ": new()" generic constraint
+            on Serializer-of-T.
+            </summary>
+            <typeparam name="T">The type of object to be created.</typeparam>
+        </member>
+        <member name="T:ProtoBuf.PrefixStyle">
+            <summary>
+            Specifies the type of prefix that should be applied to messages.
+            </summary>
+        </member>
+        <member name="F:ProtoBuf.PrefixStyle.None">
+            <summary>
+            No length prefix is applied to the data; the data is terminated only be the end of the stream.
+            </summary>
+        </member>
+        <member name="F:ProtoBuf.PrefixStyle.Base128">
+            <summary>
+            A base-128 length prefix is applied to the data (efficient for short messages).
+            </summary>
+        </member>
+        <member name="F:ProtoBuf.PrefixStyle.Fixed32">
+            <summary>
+            A fixed-length (little-endian) length prefix is applied to the data (useful for compatibility).
+            </summary>
+        </member>
+        <member name="T:ProtoBuf.Property.PropertyEnum`2">
+            <summary>
+            Property implemenation that handles enum values.
+            </summary>
+            <remarks>All enum wire-values must be in the Int32 range.</remarks>
+        </member>
+        <member name="T:ProtoBuf.Property.PropertyFactory">
+            <summary>
+            Utility class for creating/initializing protobuf-net property
+            wrappers.
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.Property.PropertyFactory.GetPassThru``1">
+            <summary>
+            Returns a Getter&lt;T,T&gt; delegate that simply returns
+            the original value. This allows code re-use between
+            different implementations.
+            </summary>
+            <remarks>Originally an anonymous method was used, but
+            this proved problematic with the Mono 2.0 compiler.</remarks>
+        </member>
+        <member name="M:ProtoBuf.Property.PropertyFactory.CreatePassThru``1(System.Int32,ProtoBuf.DataFormat@)">
+            <summary>
+            Create a simple Property that can be used standalone
+            to encode/decode values for the given type.
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.Property.PropertyFactory.Create``1(System.Reflection.MemberInfo)">
+            <summary>
+            Create a Property based around a class
+            member (PropertyInfo/FieldInfo).
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.Property.PropertyFactory.CreateProperty``1(System.Type,ProtoBuf.DataFormat@,ProtoBuf.MemberSerializationOptions)">
+            <summary>
+            Responsible for deciding how to encode/decode a given data-type; maybe
+            not the most elegant solution, but it is simple and quick.
+            </summary>
+        </member>
+        <member name="T:ProtoBuf.Property.PropertyFactory.PassThruCache`1">
+            <summary>
+            Stores, per T, a pass-thru Getter&lt;T,T&gt; delegate.
+            </summary>
+        </member>
+        <member name="T:ProtoBuf.Property.PropertyMessageString`4">
+            <summary>
+            Serializes an entity using string (length-prefixed) syntax.
+            The high number of type arguments is requird to support ancestral serialization;
+            there are 2 use-cases:
+              direct: for example, a property (base is the highest contract ancestor; prop = actual = the property-type)
+              descendent: used internally to cascade inheritance; prop = base = the parent type, actual = the child type
+            </summary>
+            <typeparam name="TSource">The type declaring the member</typeparam>
+            <typeparam name="TProperty">The defined member-type for accessing data</typeparam>
+            <typeparam name="TEntityBase">The base-type to use when verifying / instantiating sub-type instances</typeparam>
+            <typeparam name="TEntityActual">The type to use for serialization purposes</typeparam>
+        </member>
+        <member name="T:ProtoBuf.Property.PropertyMessageGroup`4">
+            <summary>
+            Serializes an entity using group (delimited) syntax.
+            The high number of type arguments is requird to support ancestral serialization;
+            there are 2 use-cases:
+              direct: for example, a property (base is the highest contract ancestor; prop = actual = the property-type)
+              descendent: used internally to cascade inheritance; prop = base = the parent type, actual = the child type
+            </summary>
+            <typeparam name="TSource">The type declaring the member</typeparam>
+            <typeparam name="TProperty">The defined member-type for accessing data</typeparam>
+            <typeparam name="TEntityBase">The base-type to use when verifying / instantiating sub-type instances</typeparam>
+            <typeparam name="TEntityActual">The type to use for serialization purposes</typeparam>
+        </member>
+        <member name="T:ProtoBuf.ProtoIgnoreAttribute">
+            <summary>
+            Indicates that a member should be excluded from serialization; this
+            is only normally used when using implict fields.
+            </summary>
+        </member>
+        <member name="T:ProtoBuf.ProtoPartialIgnoreAttribute">
+            <summary>
+            Indicates that a member should be excluded from serialization; this
+            is only normally used when using implict fields. This allows
+            ProtoIgnoreAttribute usage
+            even for partial classes where the individual members are not
+            under direct control.
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.ProtoPartialIgnoreAttribute.#ctor(System.String)">
+            <summary>
+            Creates a new ProtoPartialIgnoreAttribute instance.
+            </summary>
+            <param name="memberName">Specifies the member to be ignored.</param>
+        </member>
+        <member name="P:ProtoBuf.ProtoPartialIgnoreAttribute.MemberName">
+            <summary>
+            The name of the member to be ignored.
+            </summary>
+        </member>
+        <member name="T:ProtoBuf.ServiceModel.ExceptionEventArgs">
+            <summary>
+            Represents an exception raised through an event.
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.ExceptionEventArgs.#ctor(System.Exception)">
+            <summary>
+            Creates a new instance of ExceptionEventArgs for the gievn exception.
+            </summary>
+            <param name="exception"></param>
+        </member>
+        <member name="P:ProtoBuf.ServiceModel.ExceptionEventArgs.Exception">
+            <summary>
+            The exception represented by the event.
+            </summary>
+        </member>
+        <member name="T:ProtoBuf.ServiceModel.Client.HttpBasicTransport">
+            <summary>
+            Performs RPC using basic http POSTs to a web-server.
+            </summary>
+        </member>
+        <member name="T:ProtoBuf.ServiceModel.Client.ITransport">
+            <summary>
+            Provides the underlying transport for a family of RPC operations.
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.Client.ITransport.SendRequestAsync(ProtoBuf.ServiceModel.Client.ServiceRequest)">
+            <summary>
+            Begins an async operation over the transport.
+            </summary>
+            <param name="request">The operation to perform (includes the facility
+            to provide a response for the operation).</param>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.Client.HttpBasicTransport.#ctor(System.String)">
+            <summary>Create a new HttpBasicTransport instance.</summary>
+            <param name="uri">The endpoint for the service. By default, the servic
+            is assumed to be RESTful, and the action is appended as a route; the
+            route can be customized by including the "{action}" token in the uri.</param>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.Client.HttpBasicTransport.Dispose">
+            <summary>
+            Releases any resources associated with the transport.
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.Client.HttpBasicTransport.Dispose(System.Boolean)">
+            <summary>
+            Releases any resources associated with the transport.
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.Client.HttpBasicTransport.CheckDisposed">
+            <summary>
+            Raises an exception if the instance has been disposed.
+            </summary>
+        </member>
+        <member name="T:ProtoBuf.ServiceModel.ProtoBehaviorExtension">
+            <summary>
+            Configuration element to swap out DatatContractSerilaizer with the XmlProtoSerializer for a given endpoint.
+            </summary>
+            <seealso cref="T:ProtoBuf.ServiceModel.ProtoEndpointBehavior"/>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.ProtoBehaviorExtension.#ctor">
+            <summary>
+            Creates a new ProtoBehaviorExtension instance.
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.ProtoBehaviorExtension.CreateBehavior">
+            <summary>
+            Creates a behavior extension based on the current configuration settings.
+            </summary>
+            <returns>The behavior extension.</returns>
+        </member>
+        <member name="P:ProtoBuf.ServiceModel.ProtoBehaviorExtension.BehaviorType">
+            <summary>
+            Gets the type of behavior.
+            </summary>     
+        </member>
+        <member name="T:ProtoBuf.ServiceModel.ProtoEndpointBehavior">
+            <summary>
+            Behavior to swap out DatatContractSerilaizer with the XmlProtoSerializer for a given endpoint.
+             <example>
+            Add the following to the server and client app.config in the system.serviceModel section:
+             <behaviors>
+               <endpointBehaviors>
+                 <behavior name="ProtoBufBehaviorConfig">
+                   <ProtoBufSerialization/>
+                 </behavior>
+               </endpointBehaviors>
+             </behaviors>
+             <extensions>
+               <behaviorExtensions>
+                 <add name="ProtoBufSerialization" type="ProtoBuf.ServiceModel.ProtoBehaviorExtension, protobuf-net, Version=1.0.0.255, Culture=neutral, PublicKeyToken=257b51d87d2e4d67"/>
+               </behaviorExtensions>
+             </extensions>
+            
+            Configure your endpoints to have a behaviorConfiguration as follows:
+            
+             <service name="TK.Framework.Samples.ServiceModel.Contract.SampleService">
+               <endpoint address="http://myhost:9003/SampleService" binding="basicHttpBinding" behaviorConfiguration="ProtoBufBehaviorConfig"
+                bindingConfiguration="basicHttpBindingConfig" name="basicHttpProtoBuf" contract="ISampleServiceContract" />
+             </service>
+             <client>
+                 <endpoint address="http://myhost:9003/SampleService" binding="basicHttpBinding"
+                     bindingConfiguration="basicHttpBindingConfig" contract="ISampleServiceContract"
+                     name="BasicHttpProtoBufEndpoint" behaviorConfiguration="ProtoBufBehaviorConfig"/>
+              </client>
+            </example>
+            </summary>
+        </member>
+        <member name="T:ProtoBuf.ServiceModel.RpcUtils">
+            <summary>
+            Utility operations common to RPC implementations.
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.RpcUtils.IsRequestArgument(System.Reflection.ParameterInfo)">
+            <summary>
+            Indicates whether the given parameter forms part of a request - i.e.
+            is "in" or "ref".
+            </summary>
+            <param name="parameter">The parameter to test.</param>
+            <returns>True if the given parameter is part of a request.</returns>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.RpcUtils.IsResponseArgument(System.Reflection.ParameterInfo)">
+            <summary>
+            Indicates whether the given parameter forms part of a response - i.e.
+            is "out" or "ref".
+            </summary>
+            <param name="parameter">The parameter to test.</param>
+            <returns>True if the given parameter is part of a response.</returns>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.RpcUtils.GetServiceName(System.Type)">
+            <summary>
+            Returns the name associated with a service contract.
+            </summary>
+            <param name="type">The service-contract type.</param>
+            <returns>The name of the service.</returns>
+        </member>
+        <member name="T:ProtoBuf.ServiceModel.Server.HttpServer">
+            <summary>
+            Standalone http server compatible with <seealso cref="T:ProtoBuf.ServiceModel.Client.HttpBasicTransport"/>.
+            </summary>
+        </member>
+        <member name="T:ProtoBuf.ServiceModel.Server.ServerBase">
+            <summary>
+            Provides common functionality required by RPC servers.
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.Server.ServerBase.Add``2">
+            <summary>
+            Adds a per-call service to the server. An instance of the type will
+            be created (and disposed if appropriate) per request. 
+            </summary>
+            <typeparam name="TContract">The type of service-contract to provide.</typeparam>
+            <typeparam name="TService">The concrete type that will implement the service.</typeparam>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.Server.ServerBase.Add``1(``0)">
+            <summary>
+            Adds a singleton service to the server. All requests will be
+            serviced by the supplied instance. This instance will be
+            disposed (if appropriate) with the server.
+            </summary>
+            <typeparam name="T">The type of service to provide.</typeparam>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.Server.ServerBase.Dispose``1(``0@)">
+            <summary>
+            Releases and nulls a given field/variable.
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.Server.ServerBase.OnBeforeWriteResponse(System.Object)">
+            <summary>
+            Performs any pre-response operations required.
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.Server.ServerBase.Execute(System.String,System.String,System.Collections.Specialized.NameValueCollection,System.IO.Stream,System.IO.Stream,System.Object)">
+            <summary>
+            Performs server-side processing of an action, including deserialization
+            of arguments, method-invokation, and serialization of the return value and
+            any `out`/`ref` arguments.
+            </summary>
+        </member>
+        <member name="T:ProtoBuf.ServiceModel.Server.ServerBase.ServiceBase">
+            <summary>
+            Represents a service endpoint provided by the server.
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.Server.ServerBase.ServiceBase.GetInstance">
+            <summary>
+            Obtains the instance representing the service endpoint for a call.
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.Server.ServerBase.ServiceBase.ReleaseInstance(System.Object)">
+            <summary>
+            Releases the instance representing the service endpoint for a call.
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.Server.ServerBase.ServiceBase.Dispose">
+            <summary>
+            Releases any resources associated with the endpoint.
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.Server.ServerBase.ServiceBase.#ctor(System.Type)">
+            <summary>
+            Initialises a new service endpoint for the given service type.
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.Server.ServerBase.ServiceBase.GetAction(System.String)">
+            <summary>
+            Obtains the method that represents a given action.
+            </summary>
+            <param name="name">The name of the action.</param>
+            <returns>The method that should be invoked.</returns>
+        </member>
+        <member name="P:ProtoBuf.ServiceModel.Server.ServerBase.ServiceBase.ServiceName">
+            <summary>
+            The name of the service endpoint.
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.Server.HttpServer.#ctor(System.String,System.Type,System.Type)">
+            <summary>
+            Create a new HttpServer instance for the given service-type.
+            </summary>
+            <param name="uriPrefix">The base uri on which to listen for messages.</param>
+            <param name="serviceContractType">The interface that represents the service contract.</param>
+            <param name="serviceImplementationType">The concrete type that implements the service contract.</param>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.Server.HttpServer.#ctor(System.String)">
+            <summary>
+            Create a new HttpServer instance for the given service-type.
+            </summary>
+            <param name="uriPrefix">The base uri on which to listen for messages.</param>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.Server.HttpServer.Start">
+            <summary>
+            Begin listening for messages on the server.
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.Server.HttpServer.OnBeforeWriteResponse(System.Object)">
+            <summary>
+            Performs any pre-response operations required.
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.Server.HttpServer.Close">
+            <summary>
+            Stop listening for messages on the server, and release
+            any associated resources.
+            </summary>
+        </member>
+        <member name="T:ProtoBuf.ServiceModel.Client.ProtoClient`1">
+            <summary>
+            Provides transport-independent wrapper logic for
+            managing RPC calls to the server.
+            </summary>
+            <typeparam name="TService">The service contract that the client represents.</typeparam>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.Client.ProtoClient`1.Dispose">
+            <summary>
+            Releases any resources associated with the client.
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.Client.ProtoClient`1.#ctor(ProtoBuf.ServiceModel.Client.ITransport)">
+            <summary>
+            Create a new client object.
+            </summary>
+            <param name="transport">The transport implementation to use.</param>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.Client.ProtoClient`1.InvokeAsync(System.String,System.Action{ProtoBuf.AsyncResult},System.Object[])">
+            <summary>
+            Begins an RPC invokation asynchrononously.
+            </summary>
+            <param name="methodName">The name of the method (on the service interface) to invoke.</param>
+            <param name="args">The request payload.</param>
+            <param name="callback">The operation to perform when a response is received.</param>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.Client.ProtoClient`1.Invoke(System.String,System.Object[])">
+            <summary>
+            Performs an RPC invokation synchrononously.
+            </summary>
+            <param name="methodName">The name of the method (on the service interface) to invoke.</param>
+            <param name="args">The request payload.</param>
+            <returns>The response payload.</returns>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.Client.ProtoClient`1.Invoke(System.Reflection.MethodInfo,System.Object[])">
+            <summary>
+            Performs an RPC invokation synchrononously.
+            </summary>
+            <param name="method">The method (on the service interface) to invoke.</param>
+            <param name="args">The request payload.</param>
+            <returns>The response payload.</returns>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.Client.ProtoClient`1.InvokeAsync(System.Reflection.MethodInfo,System.Action{ProtoBuf.AsyncResult},System.Object[])">
+            <summary>
+            Begins an RPC invokation asynchrononously.
+            </summary>
+            <param name="method">The method (on the service interface) to invoke.</param>
+            <param name="args">The request payload.</param>
+            <param name="callback">The operation to perform when a response is received.</param>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.Client.ProtoClient`1.ResolveAction(System.Reflection.MethodInfo)">
+            <summary>
+            Identify the action to use for a given method.
+            </summary>
+            <param name="method">The method requested.</param>
+            <returns>The action to use.</returns>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.Client.ProtoClient`1.ResolveService(System.Type)">
+            <summary>
+            Identify the service to use for a given method.
+            </summary>
+            <param name="serviceType">The service requested.</param>
+            <returns>The service to use.</returns>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.Client.ProtoClient`1.OnException(System.Exception)">
+            <summary>
+            Signals that an error occured processing RPC calls.
+            </summary>
+            <param name="exception">The error details.</param>
+        </member>
+        <member name="P:ProtoBuf.ServiceModel.Client.ProtoClient`1.Timeout">
+            <summary>
+            Gets or sets the timeout (in milliseconds) for synchronous RPC operations.
+            </summary>
+        </member>
+        <member name="P:ProtoBuf.ServiceModel.Client.ProtoClient`1.Transport">
+            <summary>
+            Gets the transport mechanism associated with the client.
+            </summary>
+        </member>
+        <member name="E:ProtoBuf.ServiceModel.Client.ProtoClient`1.ServiceException">
+            <summary>
+            Raised when an error occurs processing RPC calls.
+            </summary>
+        </member>
+        <member name="T:ProtoBuf.ServiceModel.Client.ServiceRequest">
+            <summary>
+            Represents an in-progress request (and response mechanism)
+            for a basic RPC stack.
+            </summary>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.Client.ServiceRequest.OnException(System.Exception)">
+            <summary>Called by transports; signals that the operation failed.</summary>
+            <param name="exception">The details of the failure.</param>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.Client.ServiceRequest.OnResponse(System.Object)">
+            <summary>Called by transports; signals that the operation succeeded.</summary>
+            <param name="responseObject">The server's response the the request.</param>
+        </member>
+        <member name="M:ProtoBuf.ServiceModel.Client.ServiceRequest.#ctor(System.String,System.String,System.Reflection.MethodInfo,System.Object[],System.Object,System.Action{ProtoBuf.AsyncResult})">
+            <summary>Create a new service request.</summary>
+            <param name="action">The contract-based name of the operation to perform.</param>
+            <param name="service">The contract-based name of the service to use.</param>
+            <param name="method">Provides reflection access to the contract member representing the operation.</param>
+            <param name="args">The argument values for the method.</param>
+            <param name="userState">Caller-defined state for this operation.</param>
+            <param name="callback">The operation to perform when this request has completed.</param>
+        </member>
+        <member name="P:ProtoBuf.ServiceModel.Client.ServiceRequest.UserState">
+            <summary>Caller-defined state for this operation.</summary>
+        </member>
+        <member name="P:ProtoBuf.ServiceModel.Client.ServiceRequest.Args">
+            <summary>The object graph representing the query request object.</summary>
+        </member>
+        <member name="P:ProtoBuf.ServiceModel.Client.ServiceRequest.ResponseObject">
+            <summary>The object graph representing the server's response.</summary>
+        </member>
+        <member name="P:ProtoBuf.ServiceModel.Client.ServiceRequest.Exception">
+            <summary> Descripbes any exception raised by the transport.</summary>
+        </member>
+        <member name="P:ProtoBuf.ServiceModel.Client.ServiceRequest.Action">
+            <summary>The contract-based name of the operation to perform.</summary>
+        </member>
+        <member name="P:ProtoBuf.ServiceModel.Client.ServiceRequest.Service">
+            <summary>The contract-based name of the service to ues.</summary>
+        </member>
+        <member name="P:ProtoBuf.ServiceModel.Client.ServiceRequest.Method">
+            <summary>Provides reflection access to the contract member representing the operation.</summary>
+        </member>
+    </members>
+</doc>
thirdparty/proto-buf.net/protoc-license.txt
@@ -0,0 +1,35 @@
+Copyright 2008, Google Inc.
+All rights reserved.
+
+http://code.google.com/p/protobuf/
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+    * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+    * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Code generated by the Protocol Buffer compiler is owned by the owner
+of the input file used when generating it.  This code is not
+standalone and requires a support library to be linked with it.  This
+support library is itself covered by the above license.
thirdparty/proto-buf.net/protogen.exe
Binary file
thirdparty/proto-buf.net/protogen.pdb
Binary file
thirdparty/proto-buf.net/vb.xslt
@@ -0,0 +1,745 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="xsl msxsl"
+>
+  <xsl:import href="common.xslt"/>
+  <xsl:param name="help"/>
+  <xsl:param name="xml"/>
+  <xsl:param name="datacontract"/>
+  <xsl:param name="binary"/>
+  <xsl:param name="protoRpc"/>
+  <xsl:param name="observable"/>
+  <xsl:param name="preObservable"/>
+  <xsl:param name="partialMethods"/>
+  <xsl:param name="detectMissing"/>
+  <xsl:param name="lightFramework"/>
+  <xsl:param name="asynchronous"/>
+  <xsl:param name="clientProxy"/>
+  <xsl:param name="defaultNamespace"/>
+  
+  
+  <xsl:key name="fieldNames" match="//FieldDescriptorProto" use="name"/>
+  
+  <xsl:output method="text" indent="no" omit-xml-declaration="yes"/>
+  <xsl:variable name="types" select="//EnumDescriptorProto | //DescriptorProto"/>
+  <xsl:variable name="optionXml" select="$xml='true'"/>
+  <xsl:variable name="optionDataContract" select="$datacontract='true'"/>
+  <xsl:variable name="optionBinary" select="$binary='true'"/>
+  <xsl:variable name="optionProtoRpc" select="$protoRpc='true'"/>
+  <xsl:variable name="optionObservable" select="$observable='true'"/>
+  <xsl:variable name="optionPreObservable" select="$preObservable='true'"/>
+  <xsl:variable name="optionPartialMethods" select="$partialMethods='true'"/>
+  <xsl:variable name="optionDetectMissing" select="$detectMissing='true'"/>
+  <xsl:variable name="optionFullFramework" select="not($lightFramework='true')"/>
+  <xsl:variable name="optionAsynchronous" select="$asynchronous='true'"/>
+  <xsl:variable name="optionClientProxy" select="$clientProxy='true'"/>
+  <xsl:variable name="optionFixCase" select="$fixCase='true'"/>  
+  
+  <xsl:template match="FileDescriptorSet">
+    <xsl:if test="$help='true'">
+      <xsl:message terminate="yes">
+        VisualBasic template for protobuf-net.
+        Options:
+        General:
+          "help" - this page
+        Additional serializer support:
+          "xml" - enable explicit xml support (XmlSerializer)
+          "datacontract" - enable data-contract support (DataContractSerializer; requires .NET 3.0)
+          "binary" - enable binary support (BinaryFormatter; not supported on Silverlight)
+        Other:
+          "protoRpc" - enable proto-rpc client
+          "observable" - change notification (observer pattern) support
+          "preObservable" - pre-change notification (observer pattern) support (requires .NET 3.5)
+          "partialMethods" - provide partial methods for changes (requires C# 3.0)
+          "detectMissing" - provide *Specified properties to indicate whether fields are present
+          "lightFramework" - omit additional attributes not included in CF/Silverlight
+          "asynchronous" - emit asynchronous methods for use with WCF
+          "clientProxy" - emit asynchronous client proxy class
+      </xsl:message>
+    </xsl:if>
+
+    <xsl:if test="$optionXml and $optionDataContract">
+      <xsl:message terminate="yes">
+        Invalid options: xml and data-contract serialization are mutually exclusive.
+      </xsl:message>
+    </xsl:if>
+      ' Generated from <xsl:value-of select="name"/>
+    <xsl:if test="$optionXml">
+      ' Option: xml serialization ([XmlType]/[XmlElement]) enabled
+    </xsl:if><xsl:if test="$optionDataContract">
+      ' Option: data-contract serialization ([DataContract]/[DataMember]) enabled
+    </xsl:if><xsl:if test="$optionBinary">
+      ' Option: binary serialization (ISerializable) enabled
+    </xsl:if><xsl:if test="$optionObservable">
+      ' Option: observable (OnPropertyChanged) enabled
+    </xsl:if><xsl:if test="$optionPreObservable">
+      ' Option: pre-observable (OnPropertyChanging) enabled
+    </xsl:if><xsl:if test="$partialMethods">
+      ' Option: partial methods (On*Changing/On*Changed) enabled
+    </xsl:if><xsl:if test="$detectMissing">
+      ' Option: missing-value detection (*Specified/ShouldSerialize*/Reset*) enabled
+    </xsl:if><xsl:if test="not($optionFullFramework)">
+      ' Option: light framework (CF/Silverlight) enabled
+    </xsl:if><xsl:if test="$optionProtoRpc">
+      ' Option: proto-rpc enabled
+  </xsl:if>
+    <xsl:apply-templates select="file/FileDescriptorProto"/>
+  </xsl:template>
+
+  <xsl:template match="FileDescriptorProto">
+' Generated from: <xsl:value-of select="name"/>
+    <xsl:apply-templates select="dependency/string[.!='']"/>
+    <xsl:variable name="namespace"><xsl:call-template name="PickNamespace">
+      <xsl:with-param name="defaultNamespace" select="$defaultNamespace"/>
+        </xsl:call-template>
+      </xsl:variable>
+    <xsl:if test="string($namespace) != ''">
+Namespace <xsl:value-of select="translate($namespace,':-/\','__..')"/>
+</xsl:if>
+    <xsl:apply-templates select="message_type | enum_type | service"/>
+    <xsl:if test="string($namespace) != ''">
+End Namespace</xsl:if></xsl:template>
+  
+<xsl:template match="FileDescriptorProto/dependency/string">
+' Note: requires additional types generated from: <xsl:value-of select="."/></xsl:template>
+
+<xsl:template match="DescriptorProto">
+<xsl:choose>
+<xsl:when test="$optionDataContract">
+&lt;Global.System.Serializable, Global.ProtoBuf.ProtoContract(Name:="<xsl:value-of select="name"/>")&gt; _
+&lt;Global.System.Runtime.Serialization.DataContract(Name:="<xsl:value-of select="name"/>")&gt; _
+</xsl:when>
+<xsl:when test="$optionXml">
+&lt;Global.System.Serializable, Global.ProtoBuf.ProtoContract(Name:="<xsl:value-of select="name"/>")&gt; _
+&lt;Global.System.Xml.Serialization.XmlType(TypeName:="<xsl:value-of select="name"/>")&gt; _
+</xsl:when>
+<xsl:otherwise>
+&lt;Global.System.Serializable, Global.ProtoBuf.ProtoContract(Name:="<xsl:value-of select="name"/>")&gt; _
+</xsl:otherwise>
+</xsl:choose><!--
+-->Public Partial Class <xsl:call-template name="pascal"/>
+    implements Global.ProtoBuf.IExtensible<!--
+    --><xsl:if test="$optionBinary">, Global.System.Runtime.Serialization.ISerializable</xsl:if><!--
+    --><xsl:if test="$optionObservable">, Global.System.ComponentModel.INotifyPropertyChanged</xsl:if><!--
+    --><xsl:if test="$optionPreObservable">, Global.System.ComponentModel.INotifyPropertyChanging</xsl:if>
+	
+	Public Sub New
+	End Sub
+    <xsl:apply-templates select="*"/><xsl:if test="$optionBinary">
+    Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
+          MyBase.New()
+          Global.ProtoBuf.Serializer.Merge(info, Me)
+    End Sub
+	  
+	Sub GetObjectData(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) implements Global.System.Runtime.Serialization.ISerializable.GetObjectData
+		Global.ProtoBuf.Serializer.Serialize(info, Me)
+	End Sub
+	
+      </xsl:if><xsl:if test="$optionObservable">
+    Public Event PropertyChanged As Global.System.ComponentModel.PropertyChangedEventHandler Implements Global.System.ComponentModel.INotifyPropertyChanged.PropertyChanged
+    Protected Overridable Sub OnPropertyChanged(ByVal propertyName As String)
+        RaiseEvent PropertyChanged(Me, New Global.System.ComponentModel.PropertyChangedEventArgs(propertyName))
+    End Sub
+    </xsl:if><xsl:if test="$optionPreObservable">
+	Public Event PropertyChanging As Global.System.ComponentModel.PropertyChangingEventHandler Implements Global.System.ComponentModel.INotifyPropertyChanging.PropertyChanging
+	Protected Overridable Sub OnPropertyChanging(ByVal propertyName As String)
+		RaiseEvent PropertyChanging(Me, New Global.System.ComponentModel.PropertyChangingEventArgs(propertyName))
+	End Sub
+	</xsl:if>
+    Private extensionObject As Global.ProtoBuf.IExtension
+		Function GetExtensionObject(createIfMissing As Boolean) As Global.ProtoBuf.IExtension Implements Global.ProtoBuf.IExtensible.GetExtensionObject
+			Return Global.ProtoBuf.Extensible.GetExtensionObject(extensionObject, createIfMissing)
+		End Function
+End Class
+  </xsl:template>
+
+  
+  
+  <xsl:template match="DescriptorProto/name | DescriptorProto/extension_range | DescriptorProto/extension"/>
+  
+  <xsl:template match="
+                FileDescriptorProto/message_type | FileDescriptorProto/enum_type | FileDescriptorProto/service
+                | DescriptorProto/field | DescriptorProto/enum_type | DescriptorProto/message_type
+                | DescriptorProto/nested_type | EnumDescriptorProto/value | ServiceDescriptorProto/method">
+    <xsl:apply-templates select="*"/>
+  </xsl:template>
+
+  <xsl:template match="EnumDescriptorProto">
+    Public Enum <xsl:call-template name="pascal"/>
+      <xsl:apply-templates select="value"/>
+    End Enum
+  </xsl:template>
+
+  <xsl:template match="EnumValueDescriptorProto">
+	  	<xsl:text> 
+		</xsl:text>
+		<xsl:value-of select="name"/>
+		<xsl:text xml:space="preserve"> = </xsl:text><xsl:choose>
+	      <xsl:when test="number"><xsl:value-of select="number"/></xsl:when>
+	      <xsl:otherwise>0</xsl:otherwise>
+	    </xsl:choose><xsl:if test="position()!=last()">
+	    </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="FieldDescriptorProto" mode="field">
+    <xsl:choose>
+      <xsl:when test="not(key('fieldNames',concat('_',name)))"><xsl:value-of select="concat('_',name)"/></xsl:when>
+      <xsl:when test="not(key('fieldNames',concat(name,'Field')))"><xsl:value-of select="concat(name,'Field')"/></xsl:when>
+      <xsl:otherwise><xsl:value-of select="concat('_',generate-id())"/></xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+  
+  <xsl:template match="FieldDescriptorProto" mode="format">
+    <xsl:choose>
+      <xsl:when test="type='TYPE_DOUBLE' or type='TYPE_FLOAT'
+                or type='TYPE_FIXED32' or type='TYPE_FIXED64'
+                or type='TYPE_SFIXED32' or type='TYPE_SFIXED64'">FixedSize</xsl:when>
+      <xsl:when test="type='TYPE_GROUP'">Group</xsl:when>
+      <xsl:when test="not(type) or type='TYPE_INT32' or type='TYPE_INT64'
+                or type='TYPE_UINT32' or type='TYPE_UINT64'
+                or type='TYPE_ENUM'">TwosComplement</xsl:when>
+      <xsl:when test="type='TYPE_SINT32' or type='TYPE_SINT64'">ZigZag</xsl:when>
+      <xsl:otherwise>Default</xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+  <xsl:template match="FieldDescriptorProto" mode="primitiveType">
+    <xsl:choose>
+      <xsl:when test="not(type)">struct</xsl:when>
+      <xsl:when test="type='TYPE_DOUBLE'">struct</xsl:when>
+      <xsl:when test="type='TYPE_FLOAT'">struct</xsl:when>
+      <xsl:when test="type='TYPE_INT64'">struct</xsl:when>
+      <xsl:when test="type='TYPE_UINT64'">struct</xsl:when>
+      <xsl:when test="type='TYPE_INT32'">struct</xsl:when>
+      <xsl:when test="type='TYPE_FIXED64'">struct</xsl:when>
+      <xsl:when test="type='TYPE_FIXED32'">struct</xsl:when>
+      <xsl:when test="type='TYPE_BOOL'">struct</xsl:when>
+      <xsl:when test="type='TYPE_STRING'">class</xsl:when>
+      <xsl:when test="type='TYPE_BYTES'">class</xsl:when>
+      <xsl:when test="type='TYPE_UINT32'">struct</xsl:when>
+      <xsl:when test="type='TYPE_SFIXED32'">struct</xsl:when>
+      <xsl:when test="type='TYPE_SFIXED64'">struct</xsl:when>
+      <xsl:when test="type='TYPE_SINT32'">struct</xsl:when>
+      <xsl:when test="type='TYPE_SINT64'">struct</xsl:when>
+      <xsl:when test="type='TYPE_ENUM'">struct</xsl:when>
+      <xsl:when test="type='TYPE_GROUP' or type='TYPE_MESSAGE'">none</xsl:when>
+      <xsl:otherwise>
+        <xsl:message terminate="yes">
+          Field type not implemented: <xsl:value-of select="type"/> (<xsl:value-of select="../../name"/>.<xsl:value-of select="name"/>)
+        </xsl:message>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+  <xsl:template match="FieldDescriptorProto" mode="type">
+    <xsl:choose>
+      <xsl:when test="not(type)">double</xsl:when>
+      <xsl:when test="type='TYPE_DOUBLE'">Double</xsl:when>
+      <xsl:when test="type='TYPE_FLOAT'">Single</xsl:when>
+      <xsl:when test="type='TYPE_INT64'">Long</xsl:when>
+      <xsl:when test="type='TYPE_UINT64'">ULong</xsl:when>
+      <xsl:when test="type='TYPE_INT32'">Integer</xsl:when>
+      <xsl:when test="type='TYPE_FIXED64'">ULong</xsl:when>
+      <xsl:when test="type='TYPE_FIXED32'">UInteger</xsl:when>
+      <xsl:when test="type='TYPE_BOOL'">Boolean</xsl:when>
+      <xsl:when test="type='TYPE_STRING'">String</xsl:when>
+      <xsl:when test="type='TYPE_BYTES'">Byte()</xsl:when>
+      <xsl:when test="type='TYPE_UINT32'">UInteger</xsl:when>
+      <xsl:when test="type='TYPE_SFIXED32'">Integer</xsl:when>
+      <xsl:when test="type='TYPE_SFIXED64'">Long</xsl:when>
+      <xsl:when test="type='TYPE_SINT32'">Integer</xsl:when>
+      <xsl:when test="type='TYPE_SINT64'">Long</xsl:when>
+      <xsl:when test="type='TYPE_GROUP' or type='TYPE_MESSAGE' or type='TYPE_ENUM'"><xsl:call-template name="pascal">
+          <xsl:with-param name="value" select="substring-after(type_name,'.')"/>
+        </xsl:call-template></xsl:when>
+      <xsl:otherwise>
+        <xsl:message terminate="yes">
+          Field type not implemented: <xsl:value-of select="type"/> (<xsl:value-of select="../../name"/>.<xsl:value-of select="name"/>)
+        </xsl:message>
+      </xsl:otherwise>
+    </xsl:choose>
+    
+  </xsl:template>
+
+  <xsl:template match="FieldDescriptorProto[default_value]" mode="defaultValue">
+    <xsl:choose>
+      <xsl:when test="type='TYPE_STRING'">"<xsl:value-of select="default_value"/>"</xsl:when>
+      <xsl:when test="type='TYPE_ENUM'"><xsl:apply-templates select="." mode="type"/>.<xsl:value-of select="default_value"/></xsl:when>
+      <xsl:when test="type='TYPE_BYTES'"> ' <xsl:value-of select="default_value"/></xsl:when>
+      <xsl:otherwise>CType(<xsl:value-of select="default_value"/>, <xsl:apply-templates select="." mode="type"/>)</xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <!--
+    We need to find the first enum value given .foo.bar.SomeEnum - but the enum itself
+    only knows about SomeEnum; we need to look at all parent DescriptorProto nodes, and
+    the FileDescriptorProto for the namespace.
+    
+    This does an annoying up/down recursion... a bit expensive, but *generally* OK.
+    Could perhaps index the last part of the enum name to reduce overhead?
+  -->
+  <xsl:template name="GetFirstEnumValue">
+    <xsl:variable name="hunt" select="type_name"/>
+    <xsl:for-each select="//EnumDescriptorProto">
+      <xsl:variable name="fullName">
+        <xsl:for-each select="ancestor::FileDescriptorProto">.<xsl:value-of select="package"/></xsl:for-each>
+        <xsl:for-each select="ancestor::DescriptorProto">.<xsl:value-of select="name"/></xsl:for-each>
+        <xsl:value-of select="concat('.',name)"/>
+      </xsl:variable>
+      <xsl:if test="$fullName=$hunt"><xsl:value-of select="(value/EnumValueDescriptorProto)[1]/name"/></xsl:if>
+    </xsl:for-each>
+  </xsl:template>
+  
+  <xsl:template match="FieldDescriptorProto[not(default_value)]" mode="defaultValue">
+    <xsl:choose>
+      <xsl:when test="type='TYPE_DOUBLE'">0.0</xsl:when>
+      <xsl:when test="type='TYPE_FLOAT'">0.0F</xsl:when>
+      <xsl:when test="type='TYPE_INT64'">0L</xsl:when>
+      <xsl:when test="type='TYPE_UINT64'">0L</xsl:when>
+      <xsl:when test="type='TYPE_INT32'">0</xsl:when>
+      <xsl:when test="type='TYPE_FIXED64'">0L</xsl:when>
+      <xsl:when test="type='TYPE_FIXED32'">0</xsl:when>
+      <xsl:when test="type='TYPE_BOOL'">False</xsl:when>
+      <xsl:when test="type='TYPE_STRING'">""</xsl:when>
+      <xsl:when test="type='TYPE_BYTES'">Nothing</xsl:when>
+      <xsl:when test="type='TYPE_UINT32'">0</xsl:when>
+      <xsl:when test="type='TYPE_SFIXED32'">0</xsl:when>
+      <xsl:when test="type='TYPE_SFIXED64'">0L</xsl:when>
+      <xsl:when test="type='TYPE_SINT32'">0</xsl:when>
+      <xsl:when test="type='TYPE_SINT64'">0L</xsl:when>
+      <xsl:when test="type='TYPE_MESSAGE'">Nothing</xsl:when>
+      <xsl:when test="type='TYPE_ENUM'"><xsl:apply-templates select="." mode="type"/>.<xsl:call-template name="GetFirstEnumValue"/></xsl:when>
+      <xsl:otherwise>Nothing</xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template match="FieldDescriptorProto[label='LABEL_OPTIONAL' or not(label)]">
+    <xsl:variable name="propType"><xsl:apply-templates select="." mode="type"/></xsl:variable>
+    <xsl:variable name="format"><xsl:apply-templates select="." mode="format"/></xsl:variable>
+    <xsl:variable name="primitiveType"><xsl:apply-templates select="." mode="primitiveType"/></xsl:variable>
+    <xsl:variable name="defaultValue"><xsl:apply-templates select="." mode="defaultValue"/></xsl:variable>
+    <xsl:variable name="field"><xsl:apply-templates select="." mode="field"/></xsl:variable>
+	<xsl:variable name="specified" select="$optionDetectMissing and ($primitiveType='struct' or $primitiveType='class')"/>
+    <xsl:variable name="fieldType"><xsl:if test="$specified and $primitiveType='struct'">Nullable(Of </xsl:if><xsl:value-of select="$propType"/><xsl:if test="$specified and $primitiveType='struct'">)</xsl:if></xsl:variable>
+
+    <xsl:choose>
+	  <xsl:when test="substring-after($fieldType, 'google.protobuf.')">
+    Private <xsl:value-of select="concat($field,' As ',substring-after($fieldType, 'google.protobuf.'))"/><xsl:if test="not($specified)"> =<xsl:value-of select="$defaultValue"/></xsl:if>
+	  </xsl:when>
+	  <xsl:otherwise>
+    Private <xsl:value-of select="concat($field,' As ',$fieldType)"/><xsl:if test="not($specified)"> =<xsl:value-of select="$defaultValue"/></xsl:if>
+	  </xsl:otherwise>
+	</xsl:choose>
+	<xsl:choose>
+		<xsl:when test="not($specified) and $optionXml">
+    &lt;Global.ProtoBuf.ProtoMember(<xsl:value-of select="number"/>, IsRequired:=False, Name:="<xsl:value-of select="name"/>", DataFormat:=Global.ProtoBuf.DataFormat.<xsl:value-of select="$format"/>)&gt; _
+	<xsl:choose>
+		<xsl:when test="substring-after($fieldType, 'google.protobuf.')">
+    &lt;Global.System.ComponentModel.DefaultValue(CType(<xsl:value-of select="$defaultValue"/>, <xsl:value-of select="substring-after($fieldType, 'google.protobuf.')"/>))&gt; _
+		</xsl:when>
+		<xsl:otherwise>
+    &lt;Global.System.ComponentModel.DefaultValue(CType(<xsl:value-of select="$defaultValue"/>, <xsl:value-of select="$fieldType"/>))&gt; _
+		</xsl:otherwise>
+	</xsl:choose>
+    &lt;Global.System.Xml.Serialization.XmlElement("<xsl:value-of select="name"/>", Order:=<xsl:value-of select="number"/>)&gt; _ <!--
+		--></xsl:when>
+		<xsl:when test="not($specified) and $optionDataContract">
+    &lt;Global.ProtoBuf.ProtoMember(<xsl:value-of select="number"/>, IsRequired:=False, Name:="<xsl:value-of select="name"/>", DataFormat:=Global.ProtoBuf.DataFormat.<xsl:value-of select="$format"/>)&gt; _
+    <xsl:choose>
+		<xsl:when test="substring-after($fieldType, 'google.protobuf.')">
+    &lt;Global.System.ComponentModel.DefaultValue(CType(<xsl:value-of select="$defaultValue"/>, <xsl:value-of select="substring-after($fieldType, 'google.protobuf.')"/>))&gt; _
+		</xsl:when>
+		<xsl:otherwise>
+    &lt;Global.System.ComponentModel.DefaultValue(CType(<xsl:value-of select="$defaultValue"/>, <xsl:value-of select="$fieldType"/>))&gt; _
+		</xsl:otherwise>
+	</xsl:choose>
+    &lt;Global.System.Runtime.Serialization.DataMember(Name:="<xsl:value-of select="name"/>", Order:=<xsl:value-of select="number"/>, IsRequired:=False)&gt; _ <!--
+		--></xsl:when>
+		<xsl:when test="not($specified)">
+    &lt;Global.ProtoBuf.ProtoMember(<xsl:value-of select="number"/>, IsRequired:=False, Name:="<xsl:value-of select="name"/>", DataFormat:=Global.ProtoBuf.DataFormat.<xsl:value-of select="$format"/>)&gt; _ <!--
+    --><xsl:choose>
+		<xsl:when test="substring-after($fieldType, 'google.protobuf.')">
+    &lt;Global.System.ComponentModel.DefaultValue(CType(<xsl:value-of select="$defaultValue"/>, <xsl:value-of select="substring-after($fieldType, 'google.protobuf.')"/>))&gt; _ <!--
+		--></xsl:when>
+		<xsl:otherwise>
+    &lt;Global.System.ComponentModel.DefaultValue(CType(<xsl:value-of select="$defaultValue"/>, <xsl:value-of select="$fieldType"/>))&gt; _ <!--
+		--></xsl:otherwise>
+	</xsl:choose><!--
+		--></xsl:when>
+		<xsl:when test="$optionDataContract">
+    &lt;Global.ProtoBuf.ProtoMember(<xsl:value-of select="number"/>, IsRequired:=False, Name:="<xsl:value-of select="name"/>", DataFormat:=Global.ProtoBuf.DataFormat.<xsl:value-of select="$format"/>)&gt; _
+    &lt;Global.System.Runtime.Serialization.DataMember(Name:="<xsl:value-of select="name"/>", Order:=<xsl:value-of select="number"/>, IsRequired:=False)&gt; _ <!--
+		--></xsl:when>
+		<xsl:when test="$optionXml">
+    &lt;Global.ProtoBuf.ProtoMember(<xsl:value-of select="number"/>, IsRequired:=False, Name:="<xsl:value-of select="name"/>", DataFormat:=Global.ProtoBuf.DataFormat.<xsl:value-of select="$format"/>)&gt; _
+    &lt;Global.System.Xml.Serialization.XmlElement("<xsl:value-of select="name"/>", Order:=<xsl:value-of select="number"/>)&gt; _ <!--
+		--></xsl:when>
+		<xsl:otherwise>
+    &lt;Global.ProtoBuf.ProtoMember(<xsl:value-of select="number"/>, IsRequired:=False, Name:="<xsl:value-of select="name"/>", DataFormat:=Global.ProtoBuf.DataFormat.<xsl:value-of select="$format"/>)&gt; _ <!--
+		--></xsl:otherwise>
+	</xsl:choose><!--
+	--><xsl:call-template name="WriteGetSet">
+      <xsl:with-param name="fieldType" select="$fieldType"/>
+      <xsl:with-param name="propType" select="$propType"/>
+      <xsl:with-param name="name"><xsl:call-template name="pascalPropName"/></xsl:with-param>
+      <xsl:with-param name="field" select="$field"/>
+      <xsl:with-param name="defaultValue" select="$defaultValue"/>
+      <xsl:with-param name="specified" select="$specified"/>
+    </xsl:call-template>
+  </xsl:template>
+
+  <xsl:template name="pascalPropName">
+    <xsl:param name="value" select="name"/>
+    <xsl:param name="delimiter" select="'_'"/>
+    <xsl:variable name="valueUC" select="translate($value,$alpha,$ALPHA)"/>
+    <xsl:variable name="finalName">
+      <xsl:choose>
+        <xsl:when test="$types[translate(name,$alpha,$ALPHA)=$valueUC]"><xsl:value-of select="concat($value,$delimiter,'Property')"/></xsl:when>
+        <xsl:otherwise><xsl:value-of select="$value"/></xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <xsl:call-template name="pascal">
+      <xsl:with-param name="value" select="$finalName"/>
+      <xsl:with-param name="delimiter" select="$delimiter"/>
+    </xsl:call-template>
+  </xsl:template>
+  
+  <xsl:template match="FieldDescriptorProto[label='LABEL_REQUIRED']">
+    <xsl:variable name="type"><xsl:apply-templates select="." mode="type"/></xsl:variable>
+    <xsl:variable name="format"><xsl:apply-templates select="." mode="format"/></xsl:variable>
+    <xsl:variable name="field"><xsl:apply-templates select="." mode="field"/></xsl:variable>
+    Private <xsl:value-of select="concat($field, ' As ', $type)"/>
+	<xsl:choose>
+		<xsl:when test="$optionDataContract">
+    &lt;Global.ProtoBuf.ProtoMember(<xsl:value-of select="number"/>, IsRequired:=True, Name:="<xsl:value-of select="name"/>", DataFormat:=Global.ProtoBuf.DataFormat.<xsl:value-of select="$format"/>)&gt; _
+    &lt;Global.System.Runtime.Serialization.DataMember(Name:="<xsl:value-of select="name"/>", Order:=<xsl:value-of select="number"/>, IsRequired:=True)&gt; _ <!--
+		--></xsl:when>
+		<xsl:when test="$optionXml">
+    &lt;Global.ProtoBuf.ProtoMember(<xsl:value-of select="number"/>, IsRequired:=True, Name:="<xsl:value-of select="name"/>", DataFormat:=Global.ProtoBuf.DataFormat.<xsl:value-of select="$format"/>)&gt; _
+    &lt;Global.System.Xml.Serialization.XmlElement("<xsl:value-of select="name"/>", Order:=<xsl:value-of select="number"/>)&gt; _ <!--
+		--></xsl:when>
+		<xsl:otherwise>
+    &lt;Global.ProtoBuf.ProtoMember(<xsl:value-of select="number"/>, IsRequired:=True, Name:="<xsl:value-of select="name"/>", DataFormat:=Global.ProtoBuf.DataFormat.<xsl:value-of select="$format"/>)&gt; _ <!--
+		--></xsl:otherwise>
+	</xsl:choose><!--
+    --><xsl:call-template name="WriteGetSet">
+      <xsl:with-param name="fieldType" select="$type"/>
+      <xsl:with-param name="propType" select="$type"/>
+      <xsl:with-param name="name" select="name"/>
+      <xsl:with-param name="field" select="$field"/>
+    </xsl:call-template>    
+  </xsl:template>
+
+  <xsl:template name="WriteGetSet">
+    <xsl:param name="fieldType"/>
+    <xsl:param name="propType"/>
+    <xsl:param name="name"/>
+    <xsl:param name="field"/>
+    <xsl:param name="specified" select="false()"/>
+    <xsl:param name="defaultValue"/>
+	<xsl:variable name="primitiveType"><xsl:apply-templates select="." mode="primitiveType"/></xsl:variable>
+	<xsl:choose>
+		<xsl:when test="substring-after($fieldType, 'google.protobuf.')">
+    Public Property <xsl:value-of select="concat($name,' As ',substring-after($fieldType, 'google.protobuf.'))"/>
+		</xsl:when>
+		<xsl:otherwise>
+    Public Property <xsl:value-of select="concat($name,' As ',$fieldType)"/>
+		</xsl:otherwise>
+	</xsl:choose>
+		Get 
+			<xsl:choose>
+				<xsl:when test="$specified and $primitiveType='struct'"><!--
+					-->Return <xsl:value-of select="$field"/><!--
+					--></xsl:when>
+				<xsl:when test="$specified">
+			If Not <xsl:value-of select="$field"/> Is Nothing Then
+				Return <xsl:value-of select="$field"/>
+			Else
+				Return <xsl:value-of select="$defaultValue"/>
+			End If<!--
+				--></xsl:when>
+				<xsl:otherwise><!--
+			-->Return <xsl:value-of select="$field"/><!--
+				--></xsl:otherwise>
+			</xsl:choose>
+		End Get
+	<xsl:choose>
+		<xsl:when test="substring-after($fieldType, 'google.protobuf.')">
+		Set(<xsl:value-of select="concat('value As ',substring-after($fieldType, 'google.protobuf.'))"/>)
+		</xsl:when>
+		<xsl:otherwise>
+		Set(<xsl:value-of select="concat('value As ',$fieldType)"/>)
+		</xsl:otherwise>
+	</xsl:choose>
+			<xsl:if test="$optionPartialMethods">On<xsl:value-of select="$name"/>Changing(value)
+			</xsl:if><xsl:if test="$optionPreObservable">OnPropertyChanging("<xsl:value-of select="$name"/>") 
+			</xsl:if><xsl:value-of select="$field"/> = value 
+			<xsl:if test="$optionObservable">OnPropertyChanged("<xsl:value-of select="$name"/>") </xsl:if><xsl:if test="$optionPartialMethods">On<xsl:value-of select="$name"/>Changed()</xsl:if>
+		End Set
+	End Property
+    <xsl:if test="$optionPartialMethods">
+    partial void On<xsl:value-of select="$name"/>Changing(<xsl:value-of select="$propType"/> value);
+    partial void On<xsl:value-of select="$name"/>Changed();</xsl:if><xsl:if test="$specified">
+    &lt;Global.System.Xml.Serialization.XmlIgnore&gt; _
+    <xsl:if test="$optionFullFramework">&lt;Global.System.ComponentModel.Browsable(false)&gt; _ </xsl:if>
+	<xsl:choose>
+		<xsl:when test="$specified and $primitiveType='struct'">
+	Public Property <xsl:value-of select="$name"/>Specified As Boolean
+        Get 
+            Return <xsl:value-of select="$field"/>.HasValue
+        End Get
+        Set (ByVal value As Boolean) 
+            If Not <xsl:value-of select="$field"/>.HasValue Then
+				If value = True then <xsl:value-of select="$field"/> = <xsl:value-of select="$name"/>
+			Else
+				If value = False then <xsl:value-of select="$field"/> = Nothing
+			End If
+        End Set
+    End Property
+		</xsl:when>
+		<xsl:otherwise>
+	Public Property <xsl:value-of select="$name"/>Specified As Boolean
+        Get 
+            Return <xsl:value-of select="$field"/> IsNot Nothing
+        End Get
+        Set (ByVal value As Boolean) 
+            If <xsl:value-of select="$field"/> Is Nothing Then
+				If value = True then <xsl:value-of select="$field"/> = <xsl:value-of select="$name"/>
+			Else
+				If value = False then <xsl:value-of select="$field"/> = Nothing
+			End If
+        End Set
+    End Property
+		</xsl:otherwise>
+	</xsl:choose>
+	Private Function ShouldSerialize<xsl:value-of select="$name"/>() As Boolean
+		Return <xsl:value-of select="$name"/>Specified 
+	End Function
+    Private Sub Reset<xsl:value-of select="$name"/>()
+		<xsl:value-of select="$name"/>Specified = false
+	End Sub
+    </xsl:if>
+  </xsl:template>
+  <xsl:template match="FieldDescriptorProto[label='LABEL_REPEATED']">
+    <xsl:variable name="type"><xsl:apply-templates select="." mode="type"/></xsl:variable>
+    <xsl:variable name="format"><xsl:apply-templates select="." mode="format"/></xsl:variable>
+    <xsl:variable name="field"><xsl:apply-templates select="." mode="field"/></xsl:variable>
+	<xsl:choose>
+		<xsl:when test="substring-after($type, 'google.protobuf.')">
+    Private <xsl:if test="not($optionXml)">ReadOnly </xsl:if> <xsl:value-of select="$field"/> as Global.System.Collections.Generic.List(Of <xsl:value-of select="substring-after($type, 'google.protobuf.')" />) = New Global.System.Collections.Generic.List(Of <xsl:value-of select="substring-after($type, 'google.protobuf.')"/>)()
+		</xsl:when>
+		<xsl:otherwise>
+    Private <xsl:if test="not($optionXml)">ReadOnly </xsl:if> <xsl:value-of select="$field"/> as Global.System.Collections.Generic.List(Of <xsl:value-of select="$type" />) = New Global.System.Collections.Generic.List(Of <xsl:value-of select="$type"/>)()
+		</xsl:otherwise>
+	</xsl:choose>
+	<xsl:choose>
+		<xsl:when test="$optionDataContract">
+	&lt;Global.ProtoBuf.ProtoMember(<xsl:value-of select="number"/>, Name:="<xsl:value-of select="name"/>", DataFormat:=Global.ProtoBuf.DataFormat.<xsl:value-of select="$format"/>)&gt; _
+	&lt;Global.System.Runtime.Serialization.DataMember(Name:="<xsl:value-of select="name"/>", Order:=<xsl:value-of select="number"/>, IsRequired:=False)&gt; _ 
+		</xsl:when>
+		<xsl:when test="$optionXml">
+	&lt;Global.ProtoBuf.ProtoMember(<xsl:value-of select="number"/>, Name:="<xsl:value-of select="name"/>", DataFormat:=Global.ProtoBuf.DataFormat.<xsl:value-of select="$format"/>)&gt; _
+	&lt;Global.System.Xml.Serialization.XmlElement("<xsl:value-of select="name"/>", Order:=<xsl:value-of select="number"/>)&gt; _
+		</xsl:when>
+		<xsl:otherwise>
+	&lt;Global.ProtoBuf.ProtoMember(<xsl:value-of select="number"/>, Name:="<xsl:value-of select="name"/>", DataFormat:=Global.ProtoBuf.DataFormat.<xsl:value-of select="$format"/>)&gt; _
+		</xsl:otherwise>
+	</xsl:choose><!--
+	--><xsl:choose>
+		<xsl:when test="substring-after($type, 'google.protobuf.')"><!--
+    -->Public <xsl:if test="not($optionXml)">ReadOnly </xsl:if>Property <xsl:value-of select="name"/> As Global.System.Collections.Generic.List(Of <xsl:value-of select="substring-after($type, 'google.protobuf.')" />)
+		</xsl:when>
+		<xsl:otherwise><!--
+    -->Public <xsl:if test="not($optionXml)">ReadOnly </xsl:if>Property <xsl:value-of select="name"/> As Global.System.Collections.Generic.List(Of <xsl:value-of select="$type" />)
+		</xsl:otherwise>
+	</xsl:choose>
+		Get
+			Return <xsl:value-of select="$field"/>
+		End Get
+		<!----><xsl:if test="$optionXml">
+		<xsl:choose>
+			<xsl:when test="substring-after($type, 'google.protobuf.')">
+		Set (value As Global.System.Collections.Generic.List(Of <xsl:value-of select="substring-after($type, 'google.protobuf.')" />))
+			</xsl:when>
+			<xsl:otherwise>
+		Set (value As Global.System.Collections.Generic.List(Of <xsl:value-of select="$type" />))
+			</xsl:otherwise>
+		</xsl:choose>
+			<xsl:value-of select="$field"/> = value 
+		End Set
+		</xsl:if>
+	End Property
+  </xsl:template>
+
+  <xsl:template match="ServiceDescriptorProto">
+    <xsl:if test="($optionClientProxy or $optionDataContract)">
+    &lt;Global.System.ServiceModel.ServiceContract(Name:="<xsl:value-of select="name"/>")&gt; _
+    </xsl:if>
+    Public Interface I<xsl:value-of select="name"/>
+      <xsl:apply-templates select="method"/>
+    End Interface
+    
+    <xsl:if test="$optionProtoRpc">
+    Public Class <xsl:value-of select="name"/>Client : Global.ProtoBuf.ServiceModel.RpcClient
+      public <xsl:value-of select="name"/>Client() : base(typeof(I<xsl:value-of select="name"/>)) { }
+
+      <xsl:apply-templates select="method/MethodDescriptorProto" mode="protoRpc"/>
+    End Class
+    </xsl:if>
+    <xsl:apply-templates select="." mode="clientProxy"/>
+    
+  </xsl:template>
+
+  <xsl:template match="MethodDescriptorProto">
+    <xsl:if test="$optionDataContract">
+    &lt;Global.System.ServiceModel.OperationContract(Name:="<xsl:value-of select="name"/>")&gt; _
+    &lt;Global.ProtoBuf.ServiceModel.ProtoBehavior()&gt; _
+    </xsl:if>
+    <xsl:apply-templates select="output_type"/><xsl:text xml:space="preserve"> </xsl:text><xsl:value-of select="name"/>(<xsl:apply-templates select="input_type"/> request);
+    <xsl:if test="$optionAsynchronous and $optionDataContract">
+    &lt;Global.System.ServiceModel.OperationContract(AsyncPattern:=True, Name:="<xsl:value-of select="name"/>")&gt; _
+    Global.System.IAsyncResult Begin<xsl:value-of select="name"/>(<xsl:apply-templates select="input_type"/> request, Global.System.AsyncCallback callback, object state);
+    <xsl:apply-templates select="output_type"/> End<xsl:value-of select="name"/>(Global.System.IAsyncResult ar);
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="MethodDescriptorProto" mode="protoRpc">
+      <xsl:apply-templates select="output_type"/><xsl:text xml:space="preserve"> </xsl:text><xsl:value-of select="name"/>(<xsl:apply-templates select="input_type"/> request)
+      {
+        return (<xsl:apply-templates select="output_type"/>) Send("<xsl:value-of select="name"/>", request);
+      }
+  </xsl:template>
+
+  <xsl:template match="MethodDescriptorProto/input_type | MethodDescriptorProto/output_type">
+    <xsl:value-of select="substring-after(.,'.')"/>
+  </xsl:template>
+
+  <xsl:template match="MethodDescriptorProto" mode="CompleteEvent">
+  <xsl:if test="$optionAsynchronous and $optionDataContract">
+    Public Class <xsl:value-of select="name"/>CompletedEventArgs : Global.System.ComponentModel.AsyncCompletedEventArgs
+        private object[] results;
+
+        public <xsl:value-of select="name"/>CompletedEventArgs(object[] results, Global.System.Exception exception, bool cancelled, object userState)
+            : base(exception, cancelled, userState) 
+        {
+            this.results = results;
+        }
+        
+        public <xsl:apply-templates select="output_type"/> Result
+        {
+            get { 
+                base.RaiseExceptionIfNecessary();
+                return (<xsl:apply-templates select="output_type"/>)(this.results[0]); 
+            }
+        }
+    End Class
+  </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="ServiceDescriptorProto" mode="clientProxy">
+  <xsl:if test="$optionAsynchronous and $optionDataContract and $optionClientProxy">
+    <xsl:apply-templates select="method/MethodDescriptorProto" mode="CompleteEvent"/>
+    
+    &lt;Global.System.Diagnostics.DebuggerStepThroughAttribute()&gt; _
+    public partial class <xsl:value-of select="name"/>Client : Global.System.ServiceModel.ClientBase&lt;I<xsl:value-of select="name"/>&gt;, I<xsl:value-of select="name"/>
+    {
+
+        public <xsl:value-of select="name"/>Client()
+        {}
+        public <xsl:value-of select="name"/>Client(string endpointConfigurationName) 
+            : base(endpointConfigurationName) 
+        {}
+        public <xsl:value-of select="name"/>Client(string endpointConfigurationName, string remoteAddress) 
+            : base(endpointConfigurationName, remoteAddress)
+        {}
+        public <xsl:value-of select="name"/>Client(string endpointConfigurationName, Global.System.ServiceModel.EndpointAddress remoteAddress)
+            : base(endpointConfigurationName, remoteAddress)
+        {}
+        public <xsl:value-of select="name"/>Client(Global.System.ServiceModel.Channels.Binding binding, Global.System.ServiceModel.EndpointAddress remoteAddress)
+            : base(binding, remoteAddress)
+        {}
+
+        <xsl:apply-templates select="method/MethodDescriptorProto" mode="clientProxy"/>
+    }  
+  </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="MethodDescriptorProto" mode="clientProxy">
+  <xsl:if test="$optionAsynchronous and $optionDataContract and $optionClientProxy">
+        private BeginOperationDelegate onBegin<xsl:value-of select="name"/>Delegate;
+        private EndOperationDelegate onEnd<xsl:value-of select="name"/>Delegate;
+        private Global.System.Threading.SendOrPostCallback on<xsl:value-of select="name"/>CompletedDelegate;
+
+        public event Global.System.EventHandler&lt;<xsl:value-of select="name"/>CompletedEventArgs&gt; <xsl:value-of select="name"/>Completed;
+
+        public <xsl:apply-templates select="output_type"/><xsl:text xml:space="preserve"> </xsl:text><xsl:value-of select="name"/>(<xsl:apply-templates select="input_type"/> request)
+        {
+            return base.Channel.<xsl:value-of select="name"/>(request);
+        }
+
+        &lt;Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)&gt; _
+        public Global.System.IAsyncResult Begin<xsl:value-of select="name"/>(<xsl:apply-templates select="input_type"/> request, Global.System.AsyncCallback callback, object asyncState)
+        {
+            return base.Channel.Begin<xsl:value-of select="name"/>(request, callback, asyncState);
+        }
+
+        &lt;Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)&gt; _
+        public <xsl:apply-templates select="output_type"/> End<xsl:value-of select="name"/>(Global.System.IAsyncResult result)
+        {
+            return base.Channel.End<xsl:value-of select="name"/>(result);
+        }
+
+        private Global.System.IAsyncResult OnBegin<xsl:value-of select="name"/>(object[] inValues, Global.System.AsyncCallback callback, object asyncState)
+        {
+            <xsl:apply-templates select="input_type"/> request = ((<xsl:apply-templates select="input_type"/>)(inValues[0]));
+            return this.Begin<xsl:value-of select="name"/>(request, callback, asyncState);
+        }
+
+        private object[] OnEnd<xsl:value-of select="name"/>(Global.System.IAsyncResult result)
+        {
+            <xsl:apply-templates select="output_type"/> retVal = this.End<xsl:value-of select="name"/>(result);
+            return new object[] {
+                retVal};
+        }
+
+        private void On<xsl:value-of select="name"/>Completed(object state)
+        {
+            if ((this.<xsl:value-of select="name"/>Completed != null))
+            {
+                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
+                this.<xsl:value-of select="name"/>Completed(this, new <xsl:value-of select="name"/>CompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
+            }
+        }
+
+        public void <xsl:value-of select="name"/>Async(<xsl:apply-templates select="input_type"/> request)
+        {
+            this.<xsl:value-of select="name"/>Async(request, null);
+        }
+
+        public void <xsl:value-of select="name"/>Async(<xsl:apply-templates select="input_type"/> request, object userState)
+        {
+            if ((this.onBegin<xsl:value-of select="name"/>Delegate == null))
+            {
+                this.onBegin<xsl:value-of select="name"/>Delegate = new BeginOperationDelegate(this.OnBegin<xsl:value-of select="name"/>);
+            }
+            if ((this.onEnd<xsl:value-of select="name"/>Delegate == null))
+            {
+                this.onEnd<xsl:value-of select="name"/>Delegate = new EndOperationDelegate(this.OnEnd<xsl:value-of select="name"/>);
+            }
+            if ((this.on<xsl:value-of select="name"/>CompletedDelegate == null))
+            {
+                this.on<xsl:value-of select="name"/>CompletedDelegate = new Global.System.Threading.SendOrPostCallback(this.On<xsl:value-of select="name"/>Completed);
+            }
+            base.InvokeAsync(this.onBegin<xsl:value-of select="name"/>Delegate, new object[] {
+                    request}, this.onEnd<xsl:value-of select="name"/>Delegate, this.on<xsl:value-of select="name"/>CompletedDelegate, userState);
+        }
+    </xsl:if>
+    </xsl:template>
+  
+  <xsl:template name="escapeKeyword"><xsl:param name="value"/><xsl:choose>
+      <xsl:when test="contains($keywordsUpper,concat('|',translate($value, $alpha, $ALPHA),'|'))">[<xsl:value-of select="$value"/>]</xsl:when>
+      <xsl:otherwise><xsl:value-of select="$value"/></xsl:otherwise>
+    </xsl:choose></xsl:template>
+  <xsl:variable name="keywords">|AddHandler|AddressOf|Alias|And|AndAlso|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|CBool|CByte|CChar|CDate|CDec|CDbl|Char|CInt|Class|CLng|CObj|Const|Continue|CSByte|CShort|CSng|CStr|CType|CUInt|CULng|CUShort|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else|ElseIf|End|EndIf|Enum|Erase|Error|Event|Exit|False|Finally|For|Friend|Function|Get|GetType|GetXMLNamespace|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|MustInherit|MustOverride|MyBase|MyClass|Namespace|Narrowing|New|Next|Not|Nothing|NotInheritable|NotOverridable|Object|Of|On|Operator|Option|Optional|Or|OrElse|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|REM|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|Short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|True|Try|TryCast|TypeOf|Variant|Wend|UInteger|ULong|UShort|Using|When|While|Widening|With|WithEvents|WriteOnly|Xor|</xsl:variable>
+  <xsl:variable name="keywordsUpper" select="translate($keywords, $alpha, $ALPHA)"/>
+
+</xsl:stylesheet>
thirdparty/proto-buf.net/xml.xslt
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="xsl msxsl"
+>
+  <xsl:param name="help"/>
+  <xsl:output method="xml" indent="yes"/>
+
+
+  <xsl:template match="/*">
+    <xsl:if test="$help='true'">
+      <xsl:message terminate="yes">
+        Xml template for protobuf-net.
+        
+        This template writes the proto descriptor as xml.
+        No options available.
+      </xsl:message>
+    </xsl:if>
+    <xsl:call-template name="main"/>
+  </xsl:template>
+  
+    <xsl:template match="@* | node()" name="main">
+        <xsl:copy>
+            <xsl:apply-templates select="@* | node()"/>
+        </xsl:copy>
+    </xsl:template>
+</xsl:stylesheet>