http://code.google.com/p/lokad-cloud/wiki/Serialization
I have been trying to swap the default serialization in Lokad.Cloud. I have tried something along the following:
public class ServiceWebModule : Module
{
public string AzureConnectionString { get; set; }
protected override void Load(ContainerBuilder builder)
{
builder.Register(CloudStorageProviders).InstancePerLifetimeScope();
}
CloudStorageProviders CloudStorageProviders(IComponentContext c)
{
return CloudStorage
.ForAzureConnectionString(AzureConnectionString)
.WithDataSerializer(new SuperDuperJsonSerializer())
.BuildStorageProviders();
}
}
This module loads after the lokad cloud storage modules have loaded and I am attempting to override the runtime in Azure’s implementation of CloudStorageProviders with my own. Any guidance would help. Thank you.
Looking at the lokad source
StorageModule:In addition to the
CloudStorageProviderstype being registered, each of the specific providers (ITableStorageProvider,IBlobStorageProviderandIQueueStorageProvider) are also registered. You will have to register all these explicitly in order to fully overwrite the existing registrations.