From 5e1be3e9c1146c0c02fdd94bcab5ffdb3e6ea27d Mon Sep 17 00:00:00 2001
From: MASES Public Developers Team
<94312179+masesdevelopers@users.noreply.github.com>
Date: Wed, 11 Oct 2023 15:20:06 +0200
Subject: [PATCH] Updated documentation (#83)
* First cleanup with copyright update
* Other docs fix
* Used interface instead of class
---
LICENSE | 2 +-
src/documentation/articles/kafkadbcontext.md | 20 +-
...fkaCSharpRuntimeAnnotationCodeGenerator.cs | 8 +-
.../Internal/KafkaDesignTimeServices.cs | 9 +-
.../Internal/KafkaLoggerExtensions.cs | 9 +-
.../Internal/KafkaLoggingDefinitions.cs | 9 +-
src/net/KEFCore/Diagnostics/KafkaEventId.cs | 2 +-
.../KafkaDatabaseFacadeExtensions.cs | 2 +-
.../KafkaDbContextOptionsExtensions.cs | 38 +-
.../KafkaEntityTypeBuilderExtensions.cs | 2 +-
.../Extensions/KafkaEntityTypeExtensions.cs | 2 +-
.../KafkaServiceCollectionExtensions.cs | 2 +-
...kaDbContextOptionsBuilderInfrastructure.cs | 2 +-
.../Internal/IKafkaSingletonOptions.cs | 9 +-
.../Internal/KafkaModelValidator.cs | 9 +-
.../Internal/KafkaOptionsExtension.cs | 9 +-
.../Internal/KafkaSingletonOptions.cs | 11 +-
.../KEFCore/Infrastructure/KafkaDbContext.cs | 57 ++-
.../KafkaDbContextOptionsBuilder.cs | 24 +-
src/net/KEFCore/KEFCore.cs | 2 +-
.../DefiningQueryRewritingConvention.cs | 2 +-
.../Conventions/KafkaConventionSetBuilder.cs | 4 +-
.../Properties/KafkaStrings.Designer.cs | 4 -
.../KEFCore/Query/Internal/AnonymousObject.cs | 11 +-
.../CollectionResultShaperExpression.cs | 9 +-
.../Internal/EntityProjectionExpression.cs | 9 +-
...aExpressionTranslatingExpressionVisitor.cs | 9 +-
...KafkaProjectionBindingExpressionVisitor.cs | 9 +-
.../Query/Internal/KafkaQueryContext.cs | 10 +-
.../Internal/KafkaQueryContextFactory.cs | 9 +-
.../Internal/KafkaQueryExpression.Helper.cs | 9 +-
.../Query/Internal/KafkaQueryExpression.cs | 9 +-
...yableMethodTranslatingExpressionVisitor.cs | 9 +-
...thodTranslatingExpressionVisitorFactory.cs | 9 +-
...ingExpressionVisitor.QueryingEnumerable.cs | 9 +-
...erExpressionProcessingExpressionVisitor.cs | 9 +-
...kaShapedQueryCompilingExpressionVisitor.cs | 9 +-
...afkaShapedQueryExpressionVisitorFactory.cs | 9 +-
.../Query/Internal/KafkaTableExpression.cs | 9 +-
.../Internal/SingleResultShaperExpression.cs | 9 +-
.../Storage/Internal/EntityTypeProducer.cs | 13 +-
.../Storage/Internal/IEntityTypeProducer.cs | 9 +-
.../KEFCore/Storage/Internal/IKafkaCluster.cs | 9 +-
.../Storage/Internal/IKafkaClusterCache.cs | 9 +-
.../Storage/Internal/IKafkaDatabase.cs | 9 +-
.../KEFCore/Storage/Internal/IKafkaRowBag.cs | 9 +-
.../KEFCore/Storage/Internal/IKafkaTable.cs | 11 +-
.../Storage/Internal/IKafkaTableFactory.cs | 9 +-
.../KEFCore/Storage/Internal/KafkaCluster.cs | 9 +-
.../Storage/Internal/KafkaClusterCache.cs | 9 +-
.../Internal/KafkaClusterCacheExtensions.cs | 9 +-
.../KEFCore/Storage/Internal/KafkaDatabase.cs | 9 +-
.../Storage/Internal/KafkaDatabaseCreator.cs | 9 +-
.../KEFCore/Storage/Internal/KafkaRowBag.cs | 9 +-
.../Internal/KafkaStreamsBaseRetriever.cs | 348 +++++++++---------
.../KEFCore/Storage/Internal/KafkaTable.cs | 9 +-
.../Storage/Internal/KafkaTableFactory.cs | 9 +-
.../Storage/Internal/KafkaTableSnapshot.cs | 9 +-
.../Storage/Internal/KafkaTransaction.cs | 9 +-
.../Internal/KafkaTransactionManager.cs | 9 +-
.../Storage/Internal/KafkaTypeMapping.cs | 9 +-
.../Internal/KafkaTypeMappingSource.cs | 9 +-
.../Internal/IKafkaIntegerValueGenerator.cs | 12 +-
.../Internal/KafkaIntegerValueGenerator.cs | 12 +-
.../Internal/KafkaValueGeneratorSelector.cs | 12 +-
65 files changed, 629 insertions(+), 344 deletions(-)
diff --git a/LICENSE b/LICENSE
index 28f1ee49..ba7090fb 100644
--- a/LICENSE
+++ b/LICENSE
@@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.
- Copyright 2022 MASES s.r.l.
+ Copyright 2023 MASES s.r.l.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/src/documentation/articles/kafkadbcontext.md b/src/documentation/articles/kafkadbcontext.md
index 01e084a1..d785d8e6 100644
--- a/src/documentation/articles/kafkadbcontext.md
+++ b/src/documentation/articles/kafkadbcontext.md
@@ -1,16 +1,26 @@
# KEFCore: KafkaDbContext
-`KafkaDbContext` is a special class to define the `DbContext` to use with EntityFrameworkCore:
-- it inherits from `DbContext`: to define the model, and/or creating the database, see [getting started](https://docs.microsoft.com/ef/core/get-started/) in the docs
-- it defines the following properties:
+`KafkaDbContext` is a special class which helps to define the `DbContext` and use Entity Framework Core with Apache Kafka:
+- `KafkaDbContext` inherits from `DbContext`: to define the model, and/or creating the database, see [getting started](https://docs.microsoft.com/ef/core/get-started/) in the docs and [KEFCore usage](usage.md)
+- `KafkaDbContext` defines the following properties:
- **BootstrapServers**: the server hosting the broker of Apache Kafka
- **ApplicationId**: the application identifier used to identify the context
- **DbName**: the user defined name which declares the database name, it is used to prepend every Topic which belongs to this database
- **DefaultNumPartitions**: the default number of partitions used when topics are created for each entity
- **DefaultReplicationFactor**: the replication factor to use when data are stored in Apache Kafka
+ - **DefaultConsumerInstances**: the consumer instances to be allocated when UseCompactedReplicator is **true**
- **UsePersistentStorage**: set to **true** to use a persintent storage between multiple application startup
- - **UseProducerByEntity**: use a different producer for each enity of EntityFrameworkCore model
+ - **UseCompactedReplicator**: Use `KNetCompactedReplicator` instead of Apache Kafka Streams to manage data to or from topics
- **ProducerConfigBuilder**: parameters to use for Producer
- - **StreamsConfigBuilder**: parameters to use for Stream application
+ - **StreamsConfigBuilder**: parameters to use for Apche Kafka Streams application
- **TopicConfigBuilder**: parameters to use on topic creation for each entity
+## How to use `KafkaDbContext` class
+
+The most simple example of usage can be found in [KEFCore usage](usage.md). By default, `KafkaDbContext` automatically manages `OnConfiguring` method of `DbContext`:
+- checks for mandatory opions like **BootstrapServers** and **DbName**
+- setup the options to use an Apache Kafka cluster
+
+
+
+
diff --git a/src/net/KEFCore/Design/Internal/KafkaCSharpRuntimeAnnotationCodeGenerator.cs b/src/net/KEFCore/Design/Internal/KafkaCSharpRuntimeAnnotationCodeGenerator.cs
index 3c90d231..cfe7625a 100644
--- a/src/net/KEFCore/Design/Internal/KafkaCSharpRuntimeAnnotationCodeGenerator.cs
+++ b/src/net/KEFCore/Design/Internal/KafkaCSharpRuntimeAnnotationCodeGenerator.cs
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,6 +24,12 @@
namespace MASES.EntityFrameworkCore.KNet.Design.Internal;
#pragma warning disable EF1001 // Internal EF Core API usage.
+///
+/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
+/// the same compatibility standards as public APIs. It may be changed or removed without notice in
+/// any release. You should only use it directly in your code with extreme caution and knowing that
+/// doing so can result in application failures when updating to a new Entity Framework Core release.
+///
public class KafkaCSharpRuntimeAnnotationCodeGenerator : CSharpRuntimeAnnotationCodeGenerator
{
public KafkaCSharpRuntimeAnnotationCodeGenerator(
diff --git a/src/net/KEFCore/Design/Internal/KafkaDesignTimeServices.cs b/src/net/KEFCore/Design/Internal/KafkaDesignTimeServices.cs
index 423d4128..a60384b1 100644
--- a/src/net/KEFCore/Design/Internal/KafkaDesignTimeServices.cs
+++ b/src/net/KEFCore/Design/Internal/KafkaDesignTimeServices.cs
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,7 +24,12 @@
[assembly: DesignTimeProviderServices("MASES.EntityFrameworkCore.KNet.Design.Internal.KafkaDesignTimeServices")]
namespace MASES.EntityFrameworkCore.KNet.Design.Internal;
-
+///
+/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
+/// the same compatibility standards as public APIs. It may be changed or removed without notice in
+/// any release. You should only use it directly in your code with extreme caution and knowing that
+/// doing so can result in application failures when updating to a new Entity Framework Core release.
+///
public class KafkaDesignTimeServices : IDesignTimeServices
{
public virtual void ConfigureDesignTimeServices(IServiceCollection serviceCollection)
diff --git a/src/net/KEFCore/Diagnostics/Internal/KafkaLoggerExtensions.cs b/src/net/KEFCore/Diagnostics/Internal/KafkaLoggerExtensions.cs
index 53013d0d..c27cbeb6 100644
--- a/src/net/KEFCore/Diagnostics/Internal/KafkaLoggerExtensions.cs
+++ b/src/net/KEFCore/Diagnostics/Internal/KafkaLoggerExtensions.cs
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,7 +22,12 @@
using MASES.EntityFrameworkCore.KNet.Internal;
namespace MASES.EntityFrameworkCore.KNet.Diagnostics.Internal;
-
+///
+/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
+/// the same compatibility standards as public APIs. It may be changed or removed without notice in
+/// any release. You should only use it directly in your code with extreme caution and knowing that
+/// doing so can result in application failures when updating to a new Entity Framework Core release.
+///
public static class KafkaLoggerExtensions
{
public static void TransactionIgnoredWarning(
diff --git a/src/net/KEFCore/Diagnostics/Internal/KafkaLoggingDefinitions.cs b/src/net/KEFCore/Diagnostics/Internal/KafkaLoggingDefinitions.cs
index 16c67f2a..0062a21d 100644
--- a/src/net/KEFCore/Diagnostics/Internal/KafkaLoggingDefinitions.cs
+++ b/src/net/KEFCore/Diagnostics/Internal/KafkaLoggingDefinitions.cs
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,7 +20,12 @@
*/
namespace MASES.EntityFrameworkCore.KNet.Diagnostics.Internal;
-
+///
+/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
+/// the same compatibility standards as public APIs. It may be changed or removed without notice in
+/// any release. You should only use it directly in your code with extreme caution and knowing that
+/// doing so can result in application failures when updating to a new Entity Framework Core release.
+///
public class KafkaLoggingDefinitions : LoggingDefinitions
{
public EventDefinitionBase? LogSavedChanges;
diff --git a/src/net/KEFCore/Diagnostics/KafkaEventId.cs b/src/net/KEFCore/Diagnostics/KafkaEventId.cs
index bea11eb9..09675ee4 100644
--- a/src/net/KEFCore/Diagnostics/KafkaEventId.cs
+++ b/src/net/KEFCore/Diagnostics/KafkaEventId.cs
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/net/KEFCore/Extensions/KafkaDatabaseFacadeExtensions.cs b/src/net/KEFCore/Extensions/KafkaDatabaseFacadeExtensions.cs
index 978003b5..1a2b08b1 100644
--- a/src/net/KEFCore/Extensions/KafkaDatabaseFacadeExtensions.cs
+++ b/src/net/KEFCore/Extensions/KafkaDatabaseFacadeExtensions.cs
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/net/KEFCore/Extensions/KafkaDbContextOptionsExtensions.cs b/src/net/KEFCore/Extensions/KafkaDbContextOptionsExtensions.cs
index bf142526..2eb08c28 100644
--- a/src/net/KEFCore/Extensions/KafkaDbContextOptionsExtensions.cs
+++ b/src/net/KEFCore/Extensions/KafkaDbContextOptionsExtensions.cs
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -31,63 +31,63 @@ namespace MASES.EntityFrameworkCore.KNet;
public static class KafkaDbContextOptionsExtensions
{
///
- /// Configures the context to connect to an Kafka database.
- /// The Kafka database is shared anywhere the same name is used, but only for a given
+ /// Configures the context to connect to an Apache Kafka cluster.
+ /// The Apache Kafka cluster is shared anywhere the same name is used, but only for a given
/// service provider.
///
///
/// See Using DbContextOptions, and
- /// The EF Core Kafka database provider for more information and examples.
+ /// The EF Core Apache Kafka cluster provider for more information and examples.
///
/// The type of context being configured.
/// The builder being used to configure the context.
///
- /// The name of the application will use . This allows the scope of the Kafka database to be controlled
- /// independently of the context. The Kafka database is shared anywhere the same name is used.
+ /// The name of the application will use . This allows the scope of the Apache Kafka cluster to be controlled
+ /// independently of the context. The Apache Kafka cluster is shared anywhere the same name is used.
///
///
- /// The name of the Kafka database. This allows the scope of the Kafka database to be controlled
- /// independently of the context. The Kafka database is shared anywhere the same name is used.
+ /// The name of the Apache Kafka cluster. This allows the scope of the Apache Kafka cluster to be controlled
+ /// independently of the context. The Apache Kafka cluster is shared anywhere the same name is used.
///
///
/// The bootstrap servers of the Kafka cluster.
///
- /// An optional action to allow additional Kafka specific configuration.
+ /// An optional action to allow additional Apache Kafka cluster specific configuration.
/// The options builder so that further configuration can be chained.
- public static DbContextOptionsBuilder UseKafkaDatabase(
+ public static DbContextOptionsBuilder UseKafkaCluster(
this DbContextOptionsBuilder optionsBuilder,
string applicationId,
string databaseName,
string bootstrapServers,
Action? kafkaOptionsAction = null)
where TContext : DbContext
- => (DbContextOptionsBuilder)UseKafkaDatabase(
+ => (DbContextOptionsBuilder)UseKafkaCluster(
(DbContextOptionsBuilder)optionsBuilder, applicationId, databaseName, bootstrapServers, kafkaOptionsAction);
///
- /// Configures the context to connect to a named Kafka database.
- /// The Kafka database is shared anywhere the same name is used, but only for a given
+ /// Configures the context to connect to a named Apache Kafka cluster.
+ /// The Apache Kafka cluster is shared anywhere the same name is used, but only for a given
/// service provider.
///
///
/// See Using DbContextOptions, and
- /// The EF Core Kafka database provider for more information and examples.
+ /// The EF Core Apache Kafka cluster provider for more information and examples.
///
/// The builder being used to configure the context.
///
- /// The name of the application will use . This allows the scope of the Kafka database to be controlled
- /// independently of the context. The Kafka database is shared anywhere the same name is used.
+ /// The name of the application will use . This allows the scope of the Apache Kafka cluster to be controlled
+ /// independently of the context. The Apache Kafka cluster is shared anywhere the same name is used.
///
///
- /// The name of the Kafka database. This allows the scope of the Kafka database to be controlled
- /// independently of the context. The Kafka database is shared anywhere the same name is used.
+ /// The name of the Apache Kafka cluster. This allows the scope of the Apache Kafka cluster to be controlled
+ /// independently of the context. The Apache Kafka cluster is shared anywhere the same name is used.
///
///
/// The bootstrap servers of the Kafka cluster.
///
/// An optional action to allow additional Kafka specific configuration.
/// The options builder so that further configuration can be chained.
- public static DbContextOptionsBuilder UseKafkaDatabase(
+ public static DbContextOptionsBuilder UseKafkaCluster(
this DbContextOptionsBuilder optionsBuilder,
string applicationId,
string databaseName,
diff --git a/src/net/KEFCore/Extensions/KafkaEntityTypeBuilderExtensions.cs b/src/net/KEFCore/Extensions/KafkaEntityTypeBuilderExtensions.cs
index f9c66750..ba28565f 100644
--- a/src/net/KEFCore/Extensions/KafkaEntityTypeBuilderExtensions.cs
+++ b/src/net/KEFCore/Extensions/KafkaEntityTypeBuilderExtensions.cs
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/net/KEFCore/Extensions/KafkaEntityTypeExtensions.cs b/src/net/KEFCore/Extensions/KafkaEntityTypeExtensions.cs
index bb892bff..9a158759 100644
--- a/src/net/KEFCore/Extensions/KafkaEntityTypeExtensions.cs
+++ b/src/net/KEFCore/Extensions/KafkaEntityTypeExtensions.cs
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/net/KEFCore/Extensions/KafkaServiceCollectionExtensions.cs b/src/net/KEFCore/Extensions/KafkaServiceCollectionExtensions.cs
index 1de4991f..ef69994f 100644
--- a/src/net/KEFCore/Extensions/KafkaServiceCollectionExtensions.cs
+++ b/src/net/KEFCore/Extensions/KafkaServiceCollectionExtensions.cs
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/net/KEFCore/Infrastructure/IKafkaDbContextOptionsBuilderInfrastructure.cs b/src/net/KEFCore/Infrastructure/IKafkaDbContextOptionsBuilderInfrastructure.cs
index 982fdef4..e1052d33 100644
--- a/src/net/KEFCore/Infrastructure/IKafkaDbContextOptionsBuilderInfrastructure.cs
+++ b/src/net/KEFCore/Infrastructure/IKafkaDbContextOptionsBuilderInfrastructure.cs
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/net/KEFCore/Infrastructure/Internal/IKafkaSingletonOptions.cs b/src/net/KEFCore/Infrastructure/Internal/IKafkaSingletonOptions.cs
index d10ac5b8..19de56c9 100644
--- a/src/net/KEFCore/Infrastructure/Internal/IKafkaSingletonOptions.cs
+++ b/src/net/KEFCore/Infrastructure/Internal/IKafkaSingletonOptions.cs
@@ -1,5 +1,5 @@
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,7 +23,12 @@
using MASES.KNet.Streams;
namespace MASES.EntityFrameworkCore.KNet.Infrastructure.Internal;
-
+///
+/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
+/// the same compatibility standards as public APIs. It may be changed or removed without notice in
+/// any release. You should only use it directly in your code with extreme caution and knowing that
+/// doing so can result in application failures when updating to a new Entity Framework Core release.
+///
public interface IKafkaSingletonOptions : ISingletonOptions
{
bool UseNameMatching { get; }
diff --git a/src/net/KEFCore/Infrastructure/Internal/KafkaModelValidator.cs b/src/net/KEFCore/Infrastructure/Internal/KafkaModelValidator.cs
index 82bed95c..68648e8b 100644
--- a/src/net/KEFCore/Infrastructure/Internal/KafkaModelValidator.cs
+++ b/src/net/KEFCore/Infrastructure/Internal/KafkaModelValidator.cs
@@ -1,5 +1,5 @@
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,7 +17,12 @@
*/
namespace MASES.EntityFrameworkCore.KNet.Infrastructure.Internal;
-
+///
+/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
+/// the same compatibility standards as public APIs. It may be changed or removed without notice in
+/// any release. You should only use it directly in your code with extreme caution and knowing that
+/// doing so can result in application failures when updating to a new Entity Framework Core release.
+///
public class KafkaModelValidator : ModelValidator
{
public KafkaModelValidator(ModelValidatorDependencies dependencies)
diff --git a/src/net/KEFCore/Infrastructure/Internal/KafkaOptionsExtension.cs b/src/net/KEFCore/Infrastructure/Internal/KafkaOptionsExtension.cs
index 5d0d9e31..5fdbb9b2 100644
--- a/src/net/KEFCore/Infrastructure/Internal/KafkaOptionsExtension.cs
+++ b/src/net/KEFCore/Infrastructure/Internal/KafkaOptionsExtension.cs
@@ -1,5 +1,5 @@
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,7 +29,12 @@
using System.Globalization;
namespace MASES.EntityFrameworkCore.KNet.Infrastructure.Internal;
-
+///
+/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
+/// the same compatibility standards as public APIs. It may be changed or removed without notice in
+/// any release. You should only use it directly in your code with extreme caution and knowing that
+/// doing so can result in application failures when updating to a new Entity Framework Core release.
+///
public class KafkaOptionsExtension : IDbContextOptionsExtension
{
private bool _useNameMatching = true;
diff --git a/src/net/KEFCore/Infrastructure/Internal/KafkaSingletonOptions.cs b/src/net/KEFCore/Infrastructure/Internal/KafkaSingletonOptions.cs
index ffae2fd6..ec2ea120 100644
--- a/src/net/KEFCore/Infrastructure/Internal/KafkaSingletonOptions.cs
+++ b/src/net/KEFCore/Infrastructure/Internal/KafkaSingletonOptions.cs
@@ -1,5 +1,5 @@
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,7 +21,12 @@
using MASES.KNet.Streams;
namespace MASES.EntityFrameworkCore.KNet.Infrastructure.Internal;
-
+///
+/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
+/// the same compatibility standards as public APIs. It may be changed or removed without notice in
+/// any release. You should only use it directly in your code with extreme caution and knowing that
+/// doing so can result in application failures when updating to a new Entity Framework Core release.
+///
public class KafkaSingletonOptions : IKafkaSingletonOptions
{
public virtual void Initialize(IDbContextOptions options)
@@ -55,7 +60,7 @@ public virtual void Validate(IDbContextOptions options)
{
throw new InvalidOperationException(
CoreStrings.SingletonOptionChanged(
- nameof(KafkaDbContextOptionsExtensions.UseKafkaDatabase),
+ nameof(KafkaDbContextOptionsExtensions.UseKafkaCluster),
nameof(DbContextOptionsBuilder.UseInternalServiceProvider)));
}
}
diff --git a/src/net/KEFCore/Infrastructure/KafkaDbContext.cs b/src/net/KEFCore/Infrastructure/KafkaDbContext.cs
index 2924bfce..ef429045 100644
--- a/src/net/KEFCore/Infrastructure/KafkaDbContext.cs
+++ b/src/net/KEFCore/Infrastructure/KafkaDbContext.cs
@@ -1,8 +1,5 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,8 +23,42 @@
namespace MASES.EntityFrameworkCore.KNet.Infrastructure;
///
-/// Allows Kafka specific configuration to be performed on .
+/// A instance represents a session with the Apache Kafka cluster and can be used to query and save
+/// instances of your entities. extends and it is a combination of the Unit Of Work and Repository patterns.
///
+///
+///
+/// Entity Framework Core does not support multiple parallel operations being run on the same instance. This
+/// includes both parallel execution of async queries and any explicit concurrent use from multiple threads.
+/// Therefore, always await async calls immediately, or use separate DbContext instances for operations that execute
+/// in parallel. See Avoiding DbContext threading issues for more information
+/// and examples.
+///
+///
+/// Typically you create a class that derives from DbContext and contains
+/// properties for each entity in the model. If the properties have a public setter,
+/// they are automatically initialized when the instance of the derived context is created.
+///
+///
+/// Typically you don't need to override the method to configure the database (and
+/// other options) to be used for the context, just set the properties associated to class.
+/// Alternatively, if you would rather perform configuration externally instead of inline in your context, you can use
+/// (or ) to externally create an instance of
+/// (or ) and pass it to a base constructor of .
+///
+///
+/// The model is discovered by running a set of conventions over the entity classes found in the
+/// properties on the derived context. To further configure the model that
+/// is discovered by convention, you can override the method.
+///
+///
+/// See KafkaDbContext configuration and initialization,
+/// DbContext lifetime, configuration, and initialization,
+/// Querying data with EF Core,
+/// Changing tracking, and
+/// Saving data with EF Core for more information and examples.
+///
+///
public class KafkaDbContext : DbContext
{
#if DEBUG_PERFORMANCE
@@ -98,19 +129,19 @@ public KafkaDbContext(DbContextOptions options) : base(options)
///
public virtual string? DbName { get; set; }
///
- /// Database number of partitions
+ /// Default number of partitions associated to each topic
///
public virtual int DefaultNumPartitions { get; set; } = 10;
///
- /// Database replication factor
+ /// Default replication factor associated to each topic
///
public virtual short DefaultReplicationFactor { get; set; } = 1;
///
- /// Database consumr instances used in conjunction with
+ /// Default consumr instances used in conjunction with
///
public virtual int? DefaultConsumerInstances { get; set; } = null;
///
- /// Use persistent storage
+ /// Use persistent storage when Apache Kafka Streams is in use
///
public virtual bool UsePersistentStorage { get; set; } = false;
/////
@@ -136,14 +167,10 @@ public KafkaDbContext(DbContextOptions options) : base(options)
///
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
- if (BootstrapServers == null)
- {
- throw new ArgumentNullException(nameof(BootstrapServers));
- }
-
+ if (BootstrapServers == null) throw new ArgumentNullException(nameof(BootstrapServers));
if (DbName == null) throw new ArgumentNullException(nameof(DbName));
- optionsBuilder.UseKafkaDatabase(ApplicationId, DbName, BootstrapServers, (o) =>
+ optionsBuilder.UseKafkaCluster(ApplicationId, DbName, BootstrapServers, (o) =>
{
o.StreamsConfig(StreamsConfigBuilder ?? o.EmptyStreamsConfigBuilder).WithDefaultNumPartitions(DefaultNumPartitions);
o.WithUsePersistentStorage(UsePersistentStorage);
diff --git a/src/net/KEFCore/Infrastructure/KafkaDbContextOptionsBuilder.cs b/src/net/KEFCore/Infrastructure/KafkaDbContextOptionsBuilder.cs
index 0b43f008..78328061 100644
--- a/src/net/KEFCore/Infrastructure/KafkaDbContextOptionsBuilder.cs
+++ b/src/net/KEFCore/Infrastructure/KafkaDbContextOptionsBuilder.cs
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -37,7 +37,7 @@ namespace MASES.EntityFrameworkCore.KNet.Infrastructure;
///
/// Instances of this class are returned from a call to
///
+/// cref="KafkaDbContextOptionsExtensions.UseKafkaCluster(DbContextOptionsBuilder, string, string, string, Action{KafkaDbContextOptionsBuilder}?)" />
/// and it is not designed to be directly constructed in your application code.
///
///
@@ -63,17 +63,25 @@ public KafkaDbContextOptionsBuilder(DbContextOptionsBuilder optionsBuilder)
protected virtual DbContextOptionsBuilder OptionsBuilder { get; }
///
- DbContextOptionsBuilder IKafkaDbContextOptionsBuilderInfrastructure.OptionsBuilder
- => OptionsBuilder;
-
+ DbContextOptionsBuilder IKafkaDbContextOptionsBuilderInfrastructure.OptionsBuilder => OptionsBuilder;
+ ///
+ /// The default configuration
+ ///
+ /// The default configuration.
public ProducerConfigBuilder EmptyProducerConfigBuilder => ProducerConfigBuilder.Create();
-
+ ///
+ /// The default configuration
+ ///
+ /// The default configuration.
public StreamsConfigBuilder EmptyStreamsConfigBuilder => StreamsConfigBuilder.Create();
-
+ ///
+ /// The default configuration
+ ///
+ /// The default configuration.
public TopicConfigBuilder EmptyTopicConfigBuilder => TopicConfigBuilder.Create();
///
- /// Enables name matching on instead of matching
+ /// Enables name matching on instead of matching
///
///
/// See Using DbContextOptions, and
diff --git a/src/net/KEFCore/KEFCore.cs b/src/net/KEFCore/KEFCore.cs
index f743e683..80b83f70 100644
--- a/src/net/KEFCore/KEFCore.cs
+++ b/src/net/KEFCore/KEFCore.cs
@@ -1,5 +1,5 @@
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/net/KEFCore/Metadata/Conventions/DefiningQueryRewritingConvention.cs b/src/net/KEFCore/Metadata/Conventions/DefiningQueryRewritingConvention.cs
index 1bcb4869..5fced9c1 100644
--- a/src/net/KEFCore/Metadata/Conventions/DefiningQueryRewritingConvention.cs
+++ b/src/net/KEFCore/Metadata/Conventions/DefiningQueryRewritingConvention.cs
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/net/KEFCore/Metadata/Conventions/KafkaConventionSetBuilder.cs b/src/net/KEFCore/Metadata/Conventions/KafkaConventionSetBuilder.cs
index a124a17b..b123c267 100644
--- a/src/net/KEFCore/Metadata/Conventions/KafkaConventionSetBuilder.cs
+++ b/src/net/KEFCore/Metadata/Conventions/KafkaConventionSetBuilder.cs
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -95,7 +95,7 @@ private static IServiceScope CreateServiceScope()
.AddEntityFrameworkKafkaDatabase()
.AddDbContext(
(p, o) =>
- o.UseKafkaDatabase(Guid.NewGuid().ToString(), Guid.NewGuid().ToString(), Guid.NewGuid().ToString())
+ o.UseKafkaCluster(Guid.NewGuid().ToString(), Guid.NewGuid().ToString(), Guid.NewGuid().ToString())
.UseInternalServiceProvider(p))
.BuildServiceProvider();
diff --git a/src/net/KEFCore/Properties/KafkaStrings.Designer.cs b/src/net/KEFCore/Properties/KafkaStrings.Designer.cs
index bb45ce69..2151b1d7 100644
--- a/src/net/KEFCore/Properties/KafkaStrings.Designer.cs
+++ b/src/net/KEFCore/Properties/KafkaStrings.Designer.cs
@@ -1,12 +1,8 @@
//
-using System;
-using System.Reflection;
using System.Resources;
-using System.Threading;
using MASES.EntityFrameworkCore.KNet.Diagnostics;
using Microsoft.EntityFrameworkCore.Internal;
-using Microsoft.Extensions.Logging;
#nullable enable
diff --git a/src/net/KEFCore/Query/Internal/AnonymousObject.cs b/src/net/KEFCore/Query/Internal/AnonymousObject.cs
index bf5ad1bf..7fff5f8b 100644
--- a/src/net/KEFCore/Query/Internal/AnonymousObject.cs
+++ b/src/net/KEFCore/Query/Internal/AnonymousObject.cs
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,10 +19,13 @@
* Refer to LICENSE for more information.
*/
-using JetBrains.Annotations;
-
namespace MASES.EntityFrameworkCore.KNet.Query.Internal;
-
+///
+/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
+/// the same compatibility standards as public APIs. It may be changed or removed without notice in
+/// any release. You should only use it directly in your code with extreme caution and knowing that
+/// doing so can result in application failures when updating to a new Entity Framework Core release.
+///
public readonly struct AnonymousObject
{
private readonly object[] _values;
diff --git a/src/net/KEFCore/Query/Internal/CollectionResultShaperExpression.cs b/src/net/KEFCore/Query/Internal/CollectionResultShaperExpression.cs
index 5d447fb7..b177f1e9 100644
--- a/src/net/KEFCore/Query/Internal/CollectionResultShaperExpression.cs
+++ b/src/net/KEFCore/Query/Internal/CollectionResultShaperExpression.cs
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,7 +20,12 @@
*/
namespace MASES.EntityFrameworkCore.KNet.Query.Internal;
-
+///
+/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
+/// the same compatibility standards as public APIs. It may be changed or removed without notice in
+/// any release. You should only use it directly in your code with extreme caution and knowing that
+/// doing so can result in application failures when updating to a new Entity Framework Core release.
+///
public class CollectionResultShaperExpression : Expression, IPrintableExpression
{
public CollectionResultShaperExpression(
diff --git a/src/net/KEFCore/Query/Internal/EntityProjectionExpression.cs b/src/net/KEFCore/Query/Internal/EntityProjectionExpression.cs
index 436df31a..8d296ce5 100644
--- a/src/net/KEFCore/Query/Internal/EntityProjectionExpression.cs
+++ b/src/net/KEFCore/Query/Internal/EntityProjectionExpression.cs
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,7 +22,12 @@
using MASES.EntityFrameworkCore.KNet.Internal;
namespace MASES.EntityFrameworkCore.KNet.Query.Internal;
-
+///
+/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
+/// the same compatibility standards as public APIs. It may be changed or removed without notice in
+/// any release. You should only use it directly in your code with extreme caution and knowing that
+/// doing so can result in application failures when updating to a new Entity Framework Core release.
+///
public class EntityProjectionExpression : Expression, IPrintableExpression
{
private readonly IReadOnlyDictionary _readExpressionMap;
diff --git a/src/net/KEFCore/Query/Internal/KafkaExpressionTranslatingExpressionVisitor.cs b/src/net/KEFCore/Query/Internal/KafkaExpressionTranslatingExpressionVisitor.cs
index 1b3a0316..16e6b3e3 100644
--- a/src/net/KEFCore/Query/Internal/KafkaExpressionTranslatingExpressionVisitor.cs
+++ b/src/net/KEFCore/Query/Internal/KafkaExpressionTranslatingExpressionVisitor.cs
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,7 +26,12 @@
using ExpressionExtensions = Microsoft.EntityFrameworkCore.Infrastructure.ExpressionExtensions;
namespace MASES.EntityFrameworkCore.KNet.Query.Internal;
-
+///
+/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
+/// the same compatibility standards as public APIs. It may be changed or removed without notice in
+/// any release. You should only use it directly in your code with extreme caution and knowing that
+/// doing so can result in application failures when updating to a new Entity Framework Core release.
+///
public class KafkaExpressionTranslatingExpressionVisitor : ExpressionVisitor
{
private const string RuntimeParameterPrefix = QueryCompilationContext.QueryParameterPrefix + "entity_equality_";
diff --git a/src/net/KEFCore/Query/Internal/KafkaProjectionBindingExpressionVisitor.cs b/src/net/KEFCore/Query/Internal/KafkaProjectionBindingExpressionVisitor.cs
index 69a6b96c..c56ce010 100644
--- a/src/net/KEFCore/Query/Internal/KafkaProjectionBindingExpressionVisitor.cs
+++ b/src/net/KEFCore/Query/Internal/KafkaProjectionBindingExpressionVisitor.cs
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,7 +22,12 @@
using System.Diagnostics.CodeAnalysis;
namespace MASES.EntityFrameworkCore.KNet.Query.Internal;
-
+///
+/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
+/// the same compatibility standards as public APIs. It may be changed or removed without notice in
+/// any release. You should only use it directly in your code with extreme caution and knowing that
+/// doing so can result in application failures when updating to a new Entity Framework Core release.
+///
public class KafkaProjectionBindingExpressionVisitor : ExpressionVisitor
{
private readonly KafkaQueryableMethodTranslatingExpressionVisitor _queryableMethodTranslatingExpressionVisitor;
diff --git a/src/net/KEFCore/Query/Internal/KafkaQueryContext.cs b/src/net/KEFCore/Query/Internal/KafkaQueryContext.cs
index 86b2d318..669a5a46 100644
--- a/src/net/KEFCore/Query/Internal/KafkaQueryContext.cs
+++ b/src/net/KEFCore/Query/Internal/KafkaQueryContext.cs
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,9 +20,15 @@
*/
using MASES.EntityFrameworkCore.KNet.Storage.Internal;
+using System.Collections.Concurrent;
namespace MASES.EntityFrameworkCore.KNet.Query.Internal;
-
+///
+/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
+/// the same compatibility standards as public APIs. It may be changed or removed without notice in
+/// any release. You should only use it directly in your code with extreme caution and knowing that
+/// doing so can result in application failures when updating to a new Entity Framework Core release.
+///
public class KafkaQueryContext : QueryContext
{
private readonly IKafkaCluster _cluster;
diff --git a/src/net/KEFCore/Query/Internal/KafkaQueryContextFactory.cs b/src/net/KEFCore/Query/Internal/KafkaQueryContextFactory.cs
index 68cdb7af..3adfba7a 100644
--- a/src/net/KEFCore/Query/Internal/KafkaQueryContextFactory.cs
+++ b/src/net/KEFCore/Query/Internal/KafkaQueryContextFactory.cs
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,7 +22,12 @@
using MASES.EntityFrameworkCore.KNet.Storage.Internal;
namespace MASES.EntityFrameworkCore.KNet.Query.Internal;
-
+///
+/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
+/// the same compatibility standards as public APIs. It may be changed or removed without notice in
+/// any release. You should only use it directly in your code with extreme caution and knowing that
+/// doing so can result in application failures when updating to a new Entity Framework Core release.
+///
public class KafkaQueryContextFactory : IQueryContextFactory
{
private readonly IKafkaCluster _cluster;
diff --git a/src/net/KEFCore/Query/Internal/KafkaQueryExpression.Helper.cs b/src/net/KEFCore/Query/Internal/KafkaQueryExpression.Helper.cs
index 1f81499c..c70587b9 100644
--- a/src/net/KEFCore/Query/Internal/KafkaQueryExpression.Helper.cs
+++ b/src/net/KEFCore/Query/Internal/KafkaQueryExpression.Helper.cs
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,7 +26,12 @@
using System.Linq;
namespace MASES.EntityFrameworkCore.KNet.Query.Internal;
-
+///
+/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
+/// the same compatibility standards as public APIs. It may be changed or removed without notice in
+/// any release. You should only use it directly in your code with extreme caution and knowing that
+/// doing so can result in application failures when updating to a new Entity Framework Core release.
+///
public partial class KafkaQueryExpression
{
private sealed class ResultEnumerable : IEnumerable
diff --git a/src/net/KEFCore/Query/Internal/KafkaQueryExpression.cs b/src/net/KEFCore/Query/Internal/KafkaQueryExpression.cs
index c4e6dd93..8ff2b23d 100644
--- a/src/net/KEFCore/Query/Internal/KafkaQueryExpression.cs
+++ b/src/net/KEFCore/Query/Internal/KafkaQueryExpression.cs
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,7 +26,12 @@
using ExpressionExtensions = Microsoft.EntityFrameworkCore.Infrastructure.ExpressionExtensions;
namespace MASES.EntityFrameworkCore.KNet.Query.Internal;
-
+///
+/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
+/// the same compatibility standards as public APIs. It may be changed or removed without notice in
+/// any release. You should only use it directly in your code with extreme caution and knowing that
+/// doing so can result in application failures when updating to a new Entity Framework Core release.
+///
public partial class KafkaQueryExpression : Expression, IPrintableExpression
{
private static readonly ConstructorInfo ValueBufferConstructor
diff --git a/src/net/KEFCore/Query/Internal/KafkaQueryableMethodTranslatingExpressionVisitor.cs b/src/net/KEFCore/Query/Internal/KafkaQueryableMethodTranslatingExpressionVisitor.cs
index 34fdb34e..611620a0 100644
--- a/src/net/KEFCore/Query/Internal/KafkaQueryableMethodTranslatingExpressionVisitor.cs
+++ b/src/net/KEFCore/Query/Internal/KafkaQueryableMethodTranslatingExpressionVisitor.cs
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,7 +20,12 @@
*/
namespace MASES.EntityFrameworkCore.KNet.Query.Internal;
-
+///
+/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
+/// the same compatibility standards as public APIs. It may be changed or removed without notice in
+/// any release. You should only use it directly in your code with extreme caution and knowing that
+/// doing so can result in application failures when updating to a new Entity Framework Core release.
+///
public class KafkaQueryableMethodTranslatingExpressionVisitor : QueryableMethodTranslatingExpressionVisitor
{
private readonly KafkaExpressionTranslatingExpressionVisitor _expressionTranslator;
diff --git a/src/net/KEFCore/Query/Internal/KafkaQueryableMethodTranslatingExpressionVisitorFactory.cs b/src/net/KEFCore/Query/Internal/KafkaQueryableMethodTranslatingExpressionVisitorFactory.cs
index 70645246..2a7ab11f 100644
--- a/src/net/KEFCore/Query/Internal/KafkaQueryableMethodTranslatingExpressionVisitorFactory.cs
+++ b/src/net/KEFCore/Query/Internal/KafkaQueryableMethodTranslatingExpressionVisitorFactory.cs
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,7 +20,12 @@
*/
namespace MASES.EntityFrameworkCore.KNet.Query.Internal;
-
+///
+/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
+/// the same compatibility standards as public APIs. It may be changed or removed without notice in
+/// any release. You should only use it directly in your code with extreme caution and knowing that
+/// doing so can result in application failures when updating to a new Entity Framework Core release.
+///
public class KafkaQueryableMethodTranslatingExpressionVisitorFactory : IQueryableMethodTranslatingExpressionVisitorFactory
{
public KafkaQueryableMethodTranslatingExpressionVisitorFactory(
diff --git a/src/net/KEFCore/Query/Internal/KafkaShapedQueryCompilingExpressionVisitor.QueryingEnumerable.cs b/src/net/KEFCore/Query/Internal/KafkaShapedQueryCompilingExpressionVisitor.QueryingEnumerable.cs
index 14a3178f..4698bc7b 100644
--- a/src/net/KEFCore/Query/Internal/KafkaShapedQueryCompilingExpressionVisitor.QueryingEnumerable.cs
+++ b/src/net/KEFCore/Query/Internal/KafkaShapedQueryCompilingExpressionVisitor.QueryingEnumerable.cs
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,7 +23,12 @@
using MASES.EntityFrameworkCore.KNet.Internal;
namespace MASES.EntityFrameworkCore.KNet.Query.Internal;
-
+///
+/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
+/// the same compatibility standards as public APIs. It may be changed or removed without notice in
+/// any release. You should only use it directly in your code with extreme caution and knowing that
+/// doing so can result in application failures when updating to a new Entity Framework Core release.
+///
public partial class KafkaShapedQueryCompilingExpressionVisitor
{
private sealed class QueryingEnumerable : IAsyncEnumerable, IEnumerable, IQueryingEnumerable
diff --git a/src/net/KEFCore/Query/Internal/KafkaShapedQueryCompilingExpressionVisitor.ShaperExpressionProcessingExpressionVisitor.cs b/src/net/KEFCore/Query/Internal/KafkaShapedQueryCompilingExpressionVisitor.ShaperExpressionProcessingExpressionVisitor.cs
index d107f2a3..a56dc93f 100644
--- a/src/net/KEFCore/Query/Internal/KafkaShapedQueryCompilingExpressionVisitor.ShaperExpressionProcessingExpressionVisitor.cs
+++ b/src/net/KEFCore/Query/Internal/KafkaShapedQueryCompilingExpressionVisitor.ShaperExpressionProcessingExpressionVisitor.cs
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,7 +22,12 @@
using ExpressionExtensions = Microsoft.EntityFrameworkCore.Infrastructure.ExpressionExtensions;
namespace MASES.EntityFrameworkCore.KNet.Query.Internal;
-
+///
+/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
+/// the same compatibility standards as public APIs. It may be changed or removed without notice in
+/// any release. You should only use it directly in your code with extreme caution and knowing that
+/// doing so can result in application failures when updating to a new Entity Framework Core release.
+///
public partial class KafkaShapedQueryCompilingExpressionVisitor
{
private sealed class ShaperExpressionProcessingExpressionVisitor : ExpressionVisitor
diff --git a/src/net/KEFCore/Query/Internal/KafkaShapedQueryCompilingExpressionVisitor.cs b/src/net/KEFCore/Query/Internal/KafkaShapedQueryCompilingExpressionVisitor.cs
index a0a6bdf5..1d110592 100644
--- a/src/net/KEFCore/Query/Internal/KafkaShapedQueryCompilingExpressionVisitor.cs
+++ b/src/net/KEFCore/Query/Internal/KafkaShapedQueryCompilingExpressionVisitor.cs
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,7 +20,12 @@
*/
namespace MASES.EntityFrameworkCore.KNet.Query.Internal;
-
+///
+/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
+/// the same compatibility standards as public APIs. It may be changed or removed without notice in
+/// any release. You should only use it directly in your code with extreme caution and knowing that
+/// doing so can result in application failures when updating to a new Entity Framework Core release.
+///
public partial class KafkaShapedQueryCompilingExpressionVisitor : ShapedQueryCompilingExpressionVisitor
{
private readonly Type _contextType;
diff --git a/src/net/KEFCore/Query/Internal/KafkaShapedQueryExpressionVisitorFactory.cs b/src/net/KEFCore/Query/Internal/KafkaShapedQueryExpressionVisitorFactory.cs
index c734fba1..e91741a5 100644
--- a/src/net/KEFCore/Query/Internal/KafkaShapedQueryExpressionVisitorFactory.cs
+++ b/src/net/KEFCore/Query/Internal/KafkaShapedQueryExpressionVisitorFactory.cs
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,7 +20,12 @@
*/
namespace MASES.EntityFrameworkCore.KNet.Query.Internal;
-
+///
+/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
+/// the same compatibility standards as public APIs. It may be changed or removed without notice in
+/// any release. You should only use it directly in your code with extreme caution and knowing that
+/// doing so can result in application failures when updating to a new Entity Framework Core release.
+///
public class KafkaShapedQueryCompilingExpressionVisitorFactory : IShapedQueryCompilingExpressionVisitorFactory
{
public KafkaShapedQueryCompilingExpressionVisitorFactory(
diff --git a/src/net/KEFCore/Query/Internal/KafkaTableExpression.cs b/src/net/KEFCore/Query/Internal/KafkaTableExpression.cs
index 9b59365c..7fd627da 100644
--- a/src/net/KEFCore/Query/Internal/KafkaTableExpression.cs
+++ b/src/net/KEFCore/Query/Internal/KafkaTableExpression.cs
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,7 +20,12 @@
*/
namespace MASES.EntityFrameworkCore.KNet.Query.Internal;
-
+///
+/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
+/// the same compatibility standards as public APIs. It may be changed or removed without notice in
+/// any release. You should only use it directly in your code with extreme caution and knowing that
+/// doing so can result in application failures when updating to a new Entity Framework Core release.
+///
public class KafkaTableExpression : Expression, IPrintableExpression
{
public KafkaTableExpression(IEntityType entityType)
diff --git a/src/net/KEFCore/Query/Internal/SingleResultShaperExpression.cs b/src/net/KEFCore/Query/Internal/SingleResultShaperExpression.cs
index fd04e96f..a4ab613d 100644
--- a/src/net/KEFCore/Query/Internal/SingleResultShaperExpression.cs
+++ b/src/net/KEFCore/Query/Internal/SingleResultShaperExpression.cs
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,7 +20,12 @@
*/
namespace MASES.EntityFrameworkCore.KNet.Query.Internal;
-
+///
+/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
+/// the same compatibility standards as public APIs. It may be changed or removed without notice in
+/// any release. You should only use it directly in your code with extreme caution and knowing that
+/// doing so can result in application failures when updating to a new Entity Framework Core release.
+///
public class SingleResultShaperExpression : Expression, IPrintableExpression
{
public SingleResultShaperExpression(
diff --git a/src/net/KEFCore/Storage/Internal/EntityTypeProducer.cs b/src/net/KEFCore/Storage/Internal/EntityTypeProducer.cs
index 6d629483..4dd7e6a6 100644
--- a/src/net/KEFCore/Storage/Internal/EntityTypeProducer.cs
+++ b/src/net/KEFCore/Storage/Internal/EntityTypeProducer.cs
@@ -1,5 +1,5 @@
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,7 +29,12 @@
using System.Collections;
namespace MASES.EntityFrameworkCore.KNet.Storage.Internal;
-
+///
+/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
+/// the same compatibility standards as public APIs. It may be changed or removed without notice in
+/// any release. You should only use it directly in your code with extreme caution and knowing that
+/// doing so can result in application failures when updating to a new Entity Framework Core release.
+///
public class EntityTypeProducer : IEntityTypeProducer where TKey : notnull
{
private readonly bool _useCompactedReplicator;
@@ -38,8 +43,8 @@ public class EntityTypeProducer : IEntityTypeProducer where TKey : notnull
private readonly IKNetCompactedReplicator>? _kafkaCompactedReplicator;
private readonly IKNetProducer>? _kafkaProducer;
private readonly IKafkaStreamsBaseRetriever _streamData;
- private readonly KNetSerDes _keySerdes;
- private readonly KNetSerDes> _valueSerdes;
+ private readonly IKNetSerDes _keySerdes;
+ private readonly IKNetSerDes> _valueSerdes;
#region KNetCompactedReplicatorEnumerable
class KNetCompactedReplicatorEnumerable : IEnumerable
diff --git a/src/net/KEFCore/Storage/Internal/IEntityTypeProducer.cs b/src/net/KEFCore/Storage/Internal/IEntityTypeProducer.cs
index 84b81db0..57d1a720 100644
--- a/src/net/KEFCore/Storage/Internal/IEntityTypeProducer.cs
+++ b/src/net/KEFCore/Storage/Internal/IEntityTypeProducer.cs
@@ -1,5 +1,5 @@
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,7 +22,12 @@
using Org.Apache.Kafka.Clients.Producer;
namespace MASES.EntityFrameworkCore.KNet.Storage.Internal;
-
+///
+/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
+/// the same compatibility standards as public APIs. It may be changed or removed without notice in
+/// any release. You should only use it directly in your code with extreme caution and knowing that
+/// doing so can result in application failures when updating to a new Entity Framework Core release.
+///
public interface IEntityTypeProducer : IDisposable
{
IEntityType EntityType { get; }
diff --git a/src/net/KEFCore/Storage/Internal/IKafkaCluster.cs b/src/net/KEFCore/Storage/Internal/IKafkaCluster.cs
index 022d50e8..f2108593 100644
--- a/src/net/KEFCore/Storage/Internal/IKafkaCluster.cs
+++ b/src/net/KEFCore/Storage/Internal/IKafkaCluster.cs
@@ -1,5 +1,5 @@
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,7 +20,12 @@
using MASES.EntityFrameworkCore.KNet.ValueGeneration.Internal;
namespace MASES.EntityFrameworkCore.KNet.Storage.Internal;
-
+///
+/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
+/// the same compatibility standards as public APIs. It may be changed or removed without notice in
+/// any release. You should only use it directly in your code with extreme caution and knowing that
+/// doing so can result in application failures when updating to a new Entity Framework Core release.
+///
public interface IKafkaCluster : IDisposable
{
bool EnsureDeleted(IUpdateAdapterFactory updateAdapterFactory, IModel designModel, IDiagnosticsLogger updateLogger);
diff --git a/src/net/KEFCore/Storage/Internal/IKafkaClusterCache.cs b/src/net/KEFCore/Storage/Internal/IKafkaClusterCache.cs
index 4e9f5db0..c46d9858 100644
--- a/src/net/KEFCore/Storage/Internal/IKafkaClusterCache.cs
+++ b/src/net/KEFCore/Storage/Internal/IKafkaClusterCache.cs
@@ -1,5 +1,5 @@
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,7 +19,12 @@
using MASES.EntityFrameworkCore.KNet.Infrastructure.Internal;
namespace MASES.EntityFrameworkCore.KNet.Storage.Internal;
-
+///
+/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
+/// the same compatibility standards as public APIs. It may be changed or removed without notice in
+/// any release. You should only use it directly in your code with extreme caution and knowing that
+/// doing so can result in application failures when updating to a new Entity Framework Core release.
+///
public interface IKafkaClusterCache
{
IKafkaCluster GetCluster(KafkaOptionsExtension options);
diff --git a/src/net/KEFCore/Storage/Internal/IKafkaDatabase.cs b/src/net/KEFCore/Storage/Internal/IKafkaDatabase.cs
index e2aee765..1e00226d 100644
--- a/src/net/KEFCore/Storage/Internal/IKafkaDatabase.cs
+++ b/src/net/KEFCore/Storage/Internal/IKafkaDatabase.cs
@@ -1,5 +1,5 @@
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,7 +17,12 @@
*/
namespace MASES.EntityFrameworkCore.KNet.Storage.Internal;
-
+///
+/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
+/// the same compatibility standards as public APIs. It may be changed or removed without notice in
+/// any release. You should only use it directly in your code with extreme caution and knowing that
+/// doing so can result in application failures when updating to a new Entity Framework Core release.
+///
public interface IKafkaDatabase : IDatabase, IDisposable
{
IKafkaCluster Cluster { get; }
diff --git a/src/net/KEFCore/Storage/Internal/IKafkaRowBag.cs b/src/net/KEFCore/Storage/Internal/IKafkaRowBag.cs
index 9ea24303..cf3650b5 100644
--- a/src/net/KEFCore/Storage/Internal/IKafkaRowBag.cs
+++ b/src/net/KEFCore/Storage/Internal/IKafkaRowBag.cs
@@ -1,5 +1,5 @@
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,7 +19,12 @@
#nullable enable
namespace MASES.EntityFrameworkCore.KNet.Storage.Internal;
-
+///
+/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
+/// the same compatibility standards as public APIs. It may be changed or removed without notice in
+/// any release. You should only use it directly in your code with extreme caution and knowing that
+/// doing so can result in application failures when updating to a new Entity Framework Core release.
+///
public interface IKafkaRowBag
{
IUpdateEntry UpdateEntry { get; }
diff --git a/src/net/KEFCore/Storage/Internal/IKafkaTable.cs b/src/net/KEFCore/Storage/Internal/IKafkaTable.cs
index e3db233c..55cb0b97 100644
--- a/src/net/KEFCore/Storage/Internal/IKafkaTable.cs
+++ b/src/net/KEFCore/Storage/Internal/IKafkaTable.cs
@@ -1,5 +1,5 @@
/*
-* Copyright 2022 MASES s.r.l.
+* Copyright 2023 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,11 +19,14 @@
#nullable enable
using MASES.EntityFrameworkCore.KNet.ValueGeneration.Internal;
-using Java.Util.Concurrent;
-using Org.Apache.Kafka.Clients.Producer;
namespace MASES.EntityFrameworkCore.KNet.Storage.Internal;
-
+///
+/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
+/// the same compatibility standards as public APIs. It may be changed or removed without notice in
+/// any release. You should only use it directly in your code with extreme caution and knowing that
+/// doing so can result in application failures when updating to a new Entity Framework Core release.
+///
public interface IKafkaTable : IEntityTypeProducer
{
IReadOnlyList