2 instantiations of CollectionModel
Microsoft.Extensions.VectorData.Abstractions (2)
ProviderServices\CollectionModelBuilder.cs (2)
146return new(recordType, () => Activator.CreateInstance(recordType)!, KeyProperties, DataProperties, VectorProperties, PropertyMap); 174return new(typeof(Dictionary<string, object?>), static () => new Dictionary<string, object?>(), KeyProperties, DataProperties, VectorProperties, PropertyMap);
29 references to CollectionModel
Microsoft.Extensions.VectorData.Abstractions (15)
ProviderServices\CollectionJsonModelBuilder.cs (6)
32/// Builds and returns a <see cref="CollectionModel"/> from the given <paramref name="recordType"/> and <paramref name="definition"/>. 34/// <returns>The built <see cref="CollectionModel"/>.</returns> 37public virtual CollectionModel Build( 50/// Builds and returns a <see cref="CollectionModel"/> for dynamic mapping scenarios from the given <paramref name="definition"/>. 52/// <returns>The built <see cref="CollectionModel"/>.</returns> 53public virtual CollectionModel BuildDynamic(
ProviderServices\CollectionModelBuilder.cs (7)
17/// Represents a builder for a <see cref="CollectionModel"/>. 76/// Builds and returns an <see cref="CollectionModel"/> from the given <paramref name="recordType"/> and <paramref name="definition"/>. 82/// <returns>The built <see cref="CollectionModel"/>.</returns> 85public virtual CollectionModel Build(Type recordType, Type keyType, VectorStoreCollectionDefinition? definition, IEmbeddingGenerator? defaultEmbeddingGenerator) 150/// Builds and returns an <see cref="CollectionModel"/> for dynamic mapping scenarios from the given <paramref name="definition"/>. 154/// <returns>The built <see cref="CollectionModel"/>.</returns> 155public virtual CollectionModel BuildDynamic(VectorStoreCollectionDefinition definition, IEmbeddingGenerator? defaultEmbeddingGenerator)
ProviderServices\Filter\FilterTranslatorBase.cs (2)
147protected CollectionModel Model { get; private set; } = null!; 163protected Expression PreprocessFilter(LambdaExpression lambdaExpression, CollectionModel model, FilterPreprocessingOptions options)
Microsoft.Extensions.VectorData.Abstractions.Tests (14)
CollectionModelBuilderTests.cs (14)
27var model = new CustomModelBuilder().Build(typeof(RecordWithStringVectorProperty), typeof(int), definition: null, embeddingGenerator); 54var model = new CustomModelBuilder().Build(typeof(RecordWithStringVectorProperty), typeof(int), recordDefinition, embeddingGenerator); 77var model = new CustomModelBuilder().BuildDynamic(recordDefinition, embeddingGenerator); 103var model = new CustomModelBuilder().BuildDynamic(recordDefinition, embeddingGenerator); 129var model = new CustomModelBuilder().BuildDynamic(recordDefinition, defaultEmbeddingGenerator); 141var model = dynamic 165var model = new CustomModelBuilder().Build( 205var model = dynamic 435var model = new GuidKeyModelBuilder().Build( 446var model = new GuidKeyModelBuilder().Build( 456var model = new GuidKeyModelBuilder().Build( 466var model = new GuidKeyModelBuilder().Build( 484var model = builder.Build(typeof(RecordWithStorageNames), typeof(int), definition: null, defaultEmbeddingGenerator: null); 502var model = builder.Build(typeof(RecordWithStorageNames), typeof(int), definition: null, defaultEmbeddingGenerator: null);