private void ensureStorageExists(IList <Type> types, Type featureType) { if (_checks.ContainsKey(featureType)) { return; } // TODO -- ensure the system type here too? var feature = _features.FindFeature(featureType); feature.AssertValidNames(_options); if (feature == null) { throw new ArgumentOutOfRangeException(nameof(featureType), $"Unknown feature type {featureType.FullName}"); } if (_checks.ContainsKey(feature.StorageType)) { _checks[featureType] = true; return; } // Preventing cyclic dependency problems if (types.Contains(featureType)) { return; } types.Fill(featureType); foreach (var dependentType in feature.DependentTypes()) { ensureStorageExists(types, dependentType); } // TODO -- might need to do a lock here. generateOrUpdateFeature(featureType, feature); }
private void ensureStorageExists(IList <Type> types, Type featureType) { if (_checks.ContainsKey(featureType)) { return; } var feature = _features.FindFeature(featureType); if (feature == null) { throw new ArgumentOutOfRangeException(nameof(featureType), $"Unknown feature type {featureType.FullName}"); } if (_checks.ContainsKey(feature.StorageType)) { _checks[featureType] = true; return; } // Preventing cyclic dependency problems if (types.Contains(featureType)) { return; } types.Fill(featureType); foreach (var dependentType in feature.DependentTypes()) { ensureStorageExists(types, dependentType); } generateOrUpdateFeature(featureType, feature); }
public override IFeatureSchema FindFeature(Type featureType) { return(_features.FindFeature(featureType)); }