Yes, please create a fork and pull request and I'll incorporate your changes. As Krzysztof, please include some tests too.
thanks, craig On Apr 27, 2011, at 6:34 PM, Krzysztof Koźmic wrote: > Hi there, > > I think the preferred way of working with Git would be to fork the facility > on github and provide a pull request. > > I'm not seeing any tests too, perhaps it would be useful to provide some. > > You can find the following useful: > http://docs.castleproject.org/How-to-submit-a-fix-to-any-Castle-Project.ashx > http://docs.castleproject.org/Castle-Coding-Standards.ashx > > cheers, > Krzysztof > > > > On 28/04/2011 2:35 AM, FancyFred wrote: >> I added support for WCF Data Services to the WCF Facility. There is a >> DataServiceHostFactory (and related types) that can be used the same >> way as the DefaultServiceHostFactory is used. >> >> Please let me know if I should provide this patch to someone specific >> or deliver it differently. >> >> Thanks! >> >> -------------------------------------------------------------------------------- >> >> From 7847d52664848f064762782b0583d10db7940d3d Mon Sep 17 00:00:00 2001 >> From: unknown<Fred@.(none)> >> Date: Wed, 27 Apr 2011 11:26:12 -0500 >> Subject: [PATCH] Added convenient support for WCF Data Services by >> providing a DataServiceHostFactory and other related types. >> >> --- >> .../Castle.Facilities.WcfIntegration.csproj | 5 +++ >> .../Service/Data/DataServiceHost.cs | 11 +++++++ >> .../Service/Data/DataServiceHostBuilder.cs | 30 ++++++++++++ >> ++++++++ >> .../Service/Data/DataServiceHostFactory.cs | 16 ++++++++++ >> .../Service/Data/DataServiceModel.cs | 25 ++++++++++++ >> ++++ >> .../Service/WcfServiceExtension.cs | 2 + >> 6 files changed, 89 insertions(+), 0 deletions(-) >> create mode 100644 src/Castle.Facilities.WcfIntegration/Service/Data/ >> DataServiceHost.cs >> create mode 100644 src/Castle.Facilities.WcfIntegration/Service/Data/ >> DataServiceHostBuilder.cs >> create mode 100644 src/Castle.Facilities.WcfIntegration/Service/Data/ >> DataServiceHostFactory.cs >> create mode 100644 src/Castle.Facilities.WcfIntegration/Service/Data/ >> DataServiceModel.cs >> >> diff --git a/src/Castle.Facilities.WcfIntegration/ >> Castle.Facilities.WcfIntegration.csproj b/src/ >> Castle.Facilities.WcfIntegration/ >> Castle.Facilities.WcfIntegration.csproj >> index eba8875..aa3ca5e 100644 >> --- a/src/Castle.Facilities.WcfIntegration/ >> Castle.Facilities.WcfIntegration.csproj >> +++ b/src/Castle.Facilities.WcfIntegration/ >> Castle.Facilities.WcfIntegration.csproj >> @@ -64,6 +64,7 @@ >> <RequiredTargetFramework>3.5</RequiredTargetFramework> >> </Reference> >> <Reference Include="System.Data" /> >> +<Reference Include="System.Data.Services" /> >> <Reference Include="System.IdentityModel" /> >> <Reference Include="System.Runtime.Serialization"> >> <RequiredTargetFramework>3.0</RequiredTargetFramework> >> @@ -100,6 +101,10 @@ >> <Compile Include="IWcfChannelExtension.cs" /> >> <Compile Include="IWcfEndpointExtension.cs" /> >> <Compile Include="IWcfServiceExtension.cs" /> >> +<Compile Include="Service\Data\DataServiceHost.cs" /> >> +<Compile Include="Service\Data\DataServiceHostBuilder.cs" /> >> +<Compile Include="Service\Data\DataServiceHostFactory.cs" /> >> +<Compile Include="Service\Data\DataServiceModel.cs" /> >> <Compile Include="Service\Discovery >> \AdHocServiceCatalogDiscovery.cs" /> >> <Compile Include="Service\Discovery\InMemoryServiceCatalog.cs" /> >> <Compile Include="Service\Discovery\IServiceCatalog.cs" /> >> diff --git a/src/Castle.Facilities.WcfIntegration/Service/Data/ >> DataServiceHost.cs b/src/Castle.Facilities.WcfIntegration/Service/Data/ >> DataServiceHost.cs >> new file mode 100644 >> index 0000000..7016205 >> --- /dev/null >> +++ b/src/Castle.Facilities.WcfIntegration/Service/Data/ >> DataServiceHost.cs >> @@ -0,0 +1,11 @@ >> +namespace Castle.Facilities.WcfIntegration.Data >> +{ >> + using System; >> + >> + public class DataServiceHost : >> System.Data.Services.DataServiceHost >> + { >> + public DataServiceHost(Type serviceType, params Uri[] >> baseAddresses) : base(serviceType, baseAddresses) >> + { >> + } >> + } >> +} >> \ No newline at end of file >> diff --git a/src/Castle.Facilities.WcfIntegration/Service/Data/ >> DataServiceHostBuilder.cs b/src/Castle.Facilities.WcfIntegration/ >> Service/Data/DataServiceHostBuilder.cs >> new file mode 100644 >> index 0000000..41ab084 >> --- /dev/null >> +++ b/src/Castle.Facilities.WcfIntegration/Service/Data/ >> DataServiceHostBuilder.cs >> @@ -0,0 +1,30 @@ >> +namespace Castle.Facilities.WcfIntegration.Data >> +{ >> + using System; >> + using System.ServiceModel; >> + >> + using Castle.Core; >> + using Castle.MicroKernel; >> + >> + public class DataServiceHostBuilder : >> AbstractServiceHostBuilder<DataServiceModel> >> + { >> + public DataServiceHostBuilder(IKernel kernel) : base(kernel) >> + { >> + } >> + >> + protected override ServiceHost >> CreateServiceHost(ComponentModel model, DataServiceModel serviceModel, >> params Uri[] baseAddresses) >> + { >> + return CreateServiceHost(model.Implementation, >> GetEffectiveBaseAddresses(serviceModel, baseAddresses)); >> + } >> + >> + protected override ServiceHost >> CreateServiceHost(ComponentModel model, Uri[] baseAddresses) >> + { >> + return CreateServiceHost(model.Implementation, >> baseAddresses); >> + } >> + >> + protected override ServiceHost CreateServiceHost(Type >> serviceType, Uri[] baseAddresses) >> + { >> + return new DataServiceHost(serviceType, baseAddresses); >> + } >> + } >> +} >> \ No newline at end of file >> diff --git a/src/Castle.Facilities.WcfIntegration/Service/Data/ >> DataServiceHostFactory.cs b/src/Castle.Facilities.WcfIntegration/ >> Service/Data/DataServiceHostFactory.cs >> new file mode 100644 >> index 0000000..021cebd >> --- /dev/null >> +++ b/src/Castle.Facilities.WcfIntegration/Service/Data/ >> DataServiceHostFactory.cs >> @@ -0,0 +1,16 @@ >> +namespace Castle.Facilities.WcfIntegration >> +{ >> + using Castle.Facilities.WcfIntegration.Data; >> + using Castle.MicroKernel; >> + >> + public class DataServiceHostFactory : >> WindsorServiceHostFactory<DataServiceModel> >> + { >> + public DataServiceHostFactory() >> + { >> + } >> + >> + public DataServiceHostFactory(IKernel kernel) : base(kernel) >> + { >> + } >> + } >> +} >> \ No newline at end of file >> diff --git a/src/Castle.Facilities.WcfIntegration/Service/Data/ >> DataServiceModel.cs b/src/Castle.Facilities.WcfIntegration/Service/ >> Data/DataServiceModel.cs >> new file mode 100644 >> index 0000000..14279b4 >> --- /dev/null >> +++ b/src/Castle.Facilities.WcfIntegration/Service/Data/ >> DataServiceModel.cs >> @@ -0,0 +1,25 @@ >> +namespace Castle.Facilities.WcfIntegration.Data >> +{ >> + using System; >> + >> + public class DataServiceModel : WcfServiceModel<DataServiceModel> >> + { >> + public DataServiceModel() >> + { >> + } >> + >> + public DataServiceModel(string baseAddress) >> + { >> + AddBaseAddresses(baseAddress); >> + } >> + >> + public DataServiceModel(Uri baseAddress) >> + { >> + AddBaseAddresses(baseAddress); >> + } >> + >> + public DataServiceModel(IWcfEndpoint endpoint) : >> base(endpoint) >> + { >> + } >> + } >> +} >> \ No newline at end of file >> diff --git a/src/Castle.Facilities.WcfIntegration/Service/ >> WcfServiceExtension.cs b/src/Castle.Facilities.WcfIntegration/Service/ >> WcfServiceExtension.cs >> index a7584c3..b1d8519 100644 >> --- a/src/Castle.Facilities.WcfIntegration/Service/ >> WcfServiceExtension.cs >> +++ b/src/Castle.Facilities.WcfIntegration/Service/ >> WcfServiceExtension.cs >> @@ -11,6 +11,7 @@ namespace Castle.Facilities.WcfIntegration >> using System.ServiceModel.Activation; >> using System.ServiceModel.Channels; >> using Castle.Core; >> + using Castle.Facilities.WcfIntegration.Data; >> using Castle.Facilities.WcfIntegration.Internal; >> using Castle.Facilities.WcfIntegration.Rest; >> using Castle.MicroKernel; >> @@ -170,6 +171,7 @@ namespace Castle.Facilities.WcfIntegration >> private void AddDefaultServiceHostBuilders() >> { >> >> AddServiceHostBuilder(typeof(DefaultServiceHostBuilder), false); >> + AddServiceHostBuilder(typeof(DataServiceHostBuilder), >> false); >> AddServiceHostBuilder(typeof(RestServiceHostBuilder), >> false); >> } >> >> -- >> 1.7.4.msysgit.0 >> > > -- > You received this message because you are subscribed to the Google Groups > "Castle Project Development List" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/castle-project-devel?hl=en. > -- You received this message because you are subscribed to the Google Groups "Castle Project Development List" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/castle-project-devel?hl=en.
