public void Init(SettingNode node) { connName = node.TryGetValue("connectionName"); if (String.IsNullOrEmpty(connName)) { throw new MissConfigurationException(node, "connectionName"); } }
IShardSessionFactory CreateShardSessionFactory(SettingNode node, string path) { var factoryTypeString = node.TryGetValue(path); if (String.IsNullOrEmpty(factoryTypeString)) { return(null); } Type factoryType = Type.GetType(factoryTypeString); return(CreateShardSessionFactory(factoryType)); }
IShardStrategy CreateShardStrategy(SettingNode node, string path) { var type = node.TryGetValue(path); if (String.IsNullOrEmpty(type)) { return(null); } IShardStrategy strategy = (IShardStrategy)FastActivator.Create(type); if (strategy != null && strategy is AbstractShardStrategy) { ((AbstractShardStrategy)strategy).Init(node.Attributes); } return(strategy); }