Beispiel #1
0
 internal void EstablishPropertyDependancies(DeclaredProperty property)
 {
     if (property.HasAttribute <DefinesAttribute>(out var dAttribute) && dAttribute.Terms is string[] dArgs && dArgs.Any())
     {
         foreach (var term in dArgs.Select(name => TermFactory.MakeOrGetCachedTerm(property.Owner, name, ".", TermBindingRule.OnlyDeclared)))
         {
             property.DefinesPropertyTerms.Add(term);
         }
         property.DefinesOtherProperties = true;
     }
 }
Beispiel #2
0
 public TypeCache
 (
     IEnumerable <IEntityTypeContractResolver> entityTypeContractResolvers,
     ResourceCollection resourceCollection,
     TermCache termCache
 )
 {
     EntityTypeContractResolvers       = entityTypeContractResolvers;
     ResourceCollection                = resourceCollection;
     DeclaredPropertyCache             = new ConcurrentDictionary <Type, IReadOnlyDictionary <string, DeclaredProperty> >();
     DeclaredPropertyCacheByActualName = new ConcurrentDictionary <Type, IReadOnlyDictionary <string, DeclaredProperty> >();
     EntityTypeContracts               = new ConcurrentDictionary <Type, EntityTypeContract>();
     TermFactory = new TermFactory(this, termCache, resourceCollection);
 }