private Deploy GetDeploy(DeployData protoDeploy)
{
Config config;
if (protoDeploy.HasConfig)
config = (Config) Deserialize(protoDeploy.Config, typeof (Config));
else
config = ConfigurationFactory.Empty;
RouterConfig routerConfig;
if (protoDeploy.HasRouterConfig)
routerConfig = (RouterConfig)Deserialize(protoDeploy.RouterConfig, typeof(RouterConfig));
else
routerConfig = RouterConfig.NoRouter;
Scope scope;
if (protoDeploy.HasScope)
scope = (Scope) Deserialize(protoDeploy.Scope, typeof (Scope));
else
scope = Deploy.NoScopeGiven;
string dispatcher;
if (protoDeploy.HasDispatcher)
dispatcher = protoDeploy.Dispatcher;
else
dispatcher = Deploy.NoDispatcherGiven;
return new Deploy(protoDeploy.Path, config, routerConfig, scope, dispatcher);
}