Skip to content

Commit

Permalink
Marked required classes as internal.
Browse files Browse the repository at this point in the history
  • Loading branch information
dfyda committed Jun 8, 2024
1 parent 7c2ce47 commit 81e4559
Show file tree
Hide file tree
Showing 53 changed files with 56 additions and 51 deletions.
4 changes: 4 additions & 0 deletions library/SlothfulCrud/SlothfulCrud/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
using System.Runtime.CompilerServices;

[assembly: InternalsVisibleTo("SlothfulCrud.Tests.Unit")]
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")]
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace SlothfulCrud.Builders.Abstract
{
public class AbstractFunctionalBuilder<TSubject, TSelf> : IAbstractFunctionalBuilder<TSubject, TSelf>
internal class AbstractFunctionalBuilder<TSubject, TSelf> : IAbstractFunctionalBuilder<TSubject, TSelf>
where TSelf : AbstractFunctionalBuilder<TSubject, TSelf>
where TSubject : class
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace SlothfulCrud.Builders.Abstract
{
public class FunctionalBuilder<TSubject, TSelf> : AbstractFunctionalBuilder<TSubject, TSelf>
internal class FunctionalBuilder<TSubject, TSelf> : AbstractFunctionalBuilder<TSubject, TSelf>
where TSelf : FunctionalBuilder<TSubject, TSelf>
where TSubject : class, new()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace SlothfulCrud.Builders.Abstract
{
public interface IAbstractFunctionalBuilder<TSubject, TSelf>
internal interface IAbstractFunctionalBuilder<TSubject, TSelf>
where TSelf : IAbstractFunctionalBuilder<TSubject, TSelf>
where TSubject : class
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace SlothfulCrud.Builders.Configurations
{
public class SlothConfigurationBuilder
internal class SlothConfigurationBuilder
{
private readonly ICollection<object> _builders = new List<object>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace SlothfulCrud.Builders.Dynamic
{
public class DynamicTypeBuilder : AbstractFunctionalBuilder<TypeBuilder, DynamicTypeBuilder>
internal class DynamicTypeBuilder : AbstractFunctionalBuilder<TypeBuilder, DynamicTypeBuilder>
{
private static readonly AssemblyName AssemblyName = new AssemblyName("DynamicAssembly");
private static readonly AssemblyBuilder AssemblyBuilder =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace SlothfulCrud.Builders.Dynamic.Extensions.Methods
{
public static class DynamicTypeBuilderExtensions
internal static class DynamicTypeBuilderExtensions
{
public static DynamicTypeBuilder AddFakeTryParse(this DynamicTypeBuilder dynamicTypeBuilder)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace SlothfulCrud.Builders.Dynamic.Extensions.Properties
{
public static class DynamicTypeBuilderExtensions
internal static class DynamicTypeBuilderExtensions
{
public static DynamicTypeBuilder AddProperty(
this DynamicTypeBuilder dynamicTypeBuilder,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SlothfulCrud.Builders.Endpoints.Behaviors.Constructor
{
public class BaseCreateConstructorBehavior : ICreateConstructorBehavior
internal class BaseCreateConstructorBehavior : ICreateConstructorBehavior
{
public ConstructorInfo GetConstructorInfo(Type entityType)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace SlothfulCrud.Builders.Endpoints.Methods
{
public class SlothfulBrowseEndpointBuilder<TEntity> : SlothfulMethodEndpointRouteBuilder<TEntity>
internal class SlothfulBrowseEndpointBuilder<TEntity> : SlothfulMethodEndpointRouteBuilder<TEntity>
where TEntity : class, ISlothfulEntity
{
public SlothfulBrowseEndpointBuilder(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace SlothfulCrud.Builders.Endpoints.Methods
{
public class SlothfulBrowseSelectableEndpointBuilder<TEntity> : SlothfulMethodEndpointRouteBuilder<TEntity>
internal class SlothfulBrowseSelectableEndpointBuilder<TEntity> : SlothfulMethodEndpointRouteBuilder<TEntity>
where TEntity : class, ISlothfulEntity
{
public SlothfulBrowseSelectableEndpointBuilder(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace SlothfulCrud.Builders.Endpoints.Methods
{
public class SlothfulCreateEndpointBuilder<TEntity> : SlothfulMethodEndpointRouteBuilder<TEntity>
internal class SlothfulCreateEndpointBuilder<TEntity> : SlothfulMethodEndpointRouteBuilder<TEntity>
where TEntity : class, ISlothfulEntity
{
public SlothfulCreateEndpointBuilder(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace SlothfulCrud.Builders.Endpoints.Methods
{
public class SlothfulDeleteEndpointBuilder<TEntity> : SlothfulMethodEndpointRouteBuilder<TEntity>
internal class SlothfulDeleteEndpointBuilder<TEntity> : SlothfulMethodEndpointRouteBuilder<TEntity>
where TEntity : class, ISlothfulEntity
{
public SlothfulDeleteEndpointBuilder(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace SlothfulCrud.Builders.Endpoints.Methods
{
public class SlothfulGetEndpointBuilder<TEntity> : SlothfulMethodEndpointRouteBuilder<TEntity>
internal class SlothfulGetEndpointBuilder<TEntity> : SlothfulMethodEndpointRouteBuilder<TEntity>
where TEntity : class, ISlothfulEntity
{
public SlothfulGetEndpointBuilder(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace SlothfulCrud.Builders.Endpoints.Methods
{
public class SlothfulUpdateEndpointBuilder<TEntity> : SlothfulMethodEndpointRouteBuilder<TEntity>
internal class SlothfulUpdateEndpointBuilder<TEntity> : SlothfulMethodEndpointRouteBuilder<TEntity>
where TEntity : class, ISlothfulEntity
{
public SlothfulUpdateEndpointBuilder(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace SlothfulCrud.Builders.Endpoints
{
public class SlothfulEndpointRouteBuilder<TEntity> where TEntity : class, ISlothfulEntity
internal class SlothfulEndpointRouteBuilder<TEntity> where TEntity : class, ISlothfulEntity
{
private readonly SlothEntityBuilder<TEntity> _configurationBuilder;
protected SlothfulBuilderParams BuilderParams { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace SlothfulCrud.Builders.Endpoints
{
public abstract class SlothfulMethodEndpointRouteBuilder<TEntity> : SlothfulEndpointRouteBuilder<TEntity>
internal abstract class SlothfulMethodEndpointRouteBuilder<TEntity> : SlothfulEndpointRouteBuilder<TEntity>
where TEntity : class, ISlothfulEntity
{
protected RouteHandlerBuilder ConventionBuilder { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace SlothfulCrud.Exceptions.Handlers
{
public class ExceptionHandler : IExceptionHandler
internal class ExceptionHandler : IExceptionHandler
{
private readonly ILogger<ExceptionHandler> _logger;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace SlothfulCrud.Exceptions.Middlewares
{
public class ExceptionMiddleware
internal class ExceptionMiddleware
{
private readonly RequestDelegate _next;
private readonly IExceptionHandler _exceptionHandler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace SlothfulCrud.Extensions
{
public static class ObjectExtensions
internal static class ObjectExtensions
{
public static IDictionary<string, object> GetProperties(this object obj)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace SlothfulCrud.Extensions
{
public static class ParameterInfoExtensions
internal static class ParameterInfoExtensions
{
public static object GetDomainMethodParam<TContext>(this ParameterInfo param, object command, TContext dbContext)
where TContext : DbContext
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace SlothfulCrud.Extensions
{
public static class QueryExtensions
internal static class QueryExtensions
{
private const string DefaultCode = "not_found";
private const string DefaultMessage = "Object not found";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace SlothfulCrud.Extensions
{
public static class QueryableExtensions
internal static class QueryableExtensions
{
public static IQueryable<T> IncludeAllFirstLevelDependencies<T>(this IQueryable<T> query) where T : class
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SlothfulCrud.Extensions
{
public static class StringExtensions
internal static class StringExtensions
{
public static string CamelToHyphen(this string input)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace SlothfulCrud.Extensions
{
public static class TypeExtensions
internal static class TypeExtensions
{
public static bool IsNullable(this Type type)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace SlothfulCrud.Managers
{
public class SlothfulCrudManager : ISlothfulCrudManager
internal class SlothfulCrudManager : ISlothfulCrudManager
{
private readonly IApiSegmentProvider _apiSegmentProvider;
private readonly ICreateConstructorBehavior _createConstructorBehavior;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SlothfulCrud.Providers
{
public class ApiSegmentProvider : IApiSegmentProvider
internal class ApiSegmentProvider : IApiSegmentProvider
{
public string GetApiSegment(string entityName)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SlothfulCrud.Providers
{
public class EntityConfigurationProvider : IEntityConfigurationProvider
internal class EntityConfigurationProvider : IEntityConfigurationProvider
{
private readonly Dictionary<string, EntityConfiguration> _configurations = new();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace SlothfulCrud.Providers
{
public class EntityPropertyKeyValueProvider<TEntity> : IEntityPropertyKeyValueProvider<TEntity>
internal class EntityPropertyKeyValueProvider<TEntity> : IEntityPropertyKeyValueProvider<TEntity>
where TEntity : class, ISlothfulEntity
{
public object GetNextValue(EntityConfiguration configuration)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SlothfulCrud.Providers
{
public interface IEntityConfigurationProvider
internal interface IEntityConfigurationProvider
{
void Register(Type type, EntityConfiguration configuration);
EntityConfiguration GetConfiguration(Type type);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace SlothfulCrud.Providers
{
public static class QueryObjectProvider
internal static class QueryObjectProvider
{
public static T PrepareQueryObject<T>(HttpContext context) where T : new()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace SlothfulCrud.Providers
{
public static class SlothfulTypesProvider
internal static class SlothfulTypesProvider
{
public static IEnumerable<Type> GetSlothfulEntityTypes(Assembly assembly)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace SlothfulCrud.Providers.Types
{
public static class CommandProvider
internal static class CommandProvider
{
public static Type PrepareCreateCommand(ConstructorInfo constructor, Type entityType)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace SlothfulCrud.Services.Endpoints
{
public abstract class BaseBrowseEndpointService<TEntity, TContext> : BaseEndpointService<TEntity>
internal abstract class BaseBrowseEndpointService<TEntity, TContext> : BaseEndpointService<TEntity>
where TEntity : class, ISlothfulEntity, new()
where TContext : DbContext
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace SlothfulCrud.Services.Endpoints
{
public abstract class BaseEndpointService<TEntity>
internal abstract class BaseEndpointService<TEntity>
where TEntity : class, ISlothfulEntity, new()
{
protected readonly EntityConfiguration EntityConfiguration;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace SlothfulCrud.Services.Endpoints.Delete
{
public class DeleteService<TEntity, TContext> : BaseEndpointService<TEntity>, IDeleteService<TEntity, TContext>
internal class DeleteService<TEntity, TContext> : BaseEndpointService<TEntity>, IDeleteService<TEntity, TContext>
where TEntity : class, ISlothfulEntity, new()
where TContext : DbContext
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace SlothfulCrud.Services.Endpoints.Delete
{
public interface IDeleteService<TEntity, TContext>
internal interface IDeleteService<TEntity, TContext>
where TEntity : class, ISlothfulEntity, new()
where TContext : DbContext
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace SlothfulCrud.Services.Endpoints.Get
{
public class BrowseSelectableService<TEntity, TContext> : BaseBrowseEndpointService<TEntity, TContext>, IBrowseSelectableService<TEntity, TContext>
internal class BrowseSelectableService<TEntity, TContext> : BaseBrowseEndpointService<TEntity, TContext>, IBrowseSelectableService<TEntity, TContext>
where TEntity : class, ISlothfulEntity, new()
where TContext : DbContext
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace SlothfulCrud.Services.Endpoints.Get
{
public class BrowseService<TEntity, TContext> : BaseBrowseEndpointService<TEntity, TContext>, IBrowseService<TEntity, TContext>
internal class BrowseService<TEntity, TContext> : BaseBrowseEndpointService<TEntity, TContext>, IBrowseService<TEntity, TContext>
where TEntity : class, ISlothfulEntity, new()
where TContext : DbContext
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace SlothfulCrud.Services.Endpoints.Get
{
public class GetService<TEntity, TContext> : BaseEndpointService<TEntity>, IGetService<TEntity, TContext>
internal class GetService<TEntity, TContext> : BaseEndpointService<TEntity>, IGetService<TEntity, TContext>
where TEntity : class, ISlothfulEntity, new()
where TContext : DbContext
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace SlothfulCrud.Services.Endpoints.Get
{
public interface IBrowseSelectableService<TEntity, TContext>
internal interface IBrowseSelectableService<TEntity, TContext>
where TEntity : class, ISlothfulEntity, new()
where TContext : DbContext
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace SlothfulCrud.Services.Endpoints.Get
{
public interface IBrowseService<TEntity, TContext>
internal interface IBrowseService<TEntity, TContext>
where TEntity : class, ISlothfulEntity, new()
where TContext : DbContext
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace SlothfulCrud.Services.Endpoints.Get
{
public interface IGetService<TEntity, TContext>
internal interface IGetService<TEntity, TContext>
where TEntity : class, ISlothfulEntity, new()
where TContext : DbContext
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace SlothfulCrud.Services.Endpoints.Post
{
public class CreateService<TEntity, TContext> : BaseEndpointService<TEntity>, ICreateService<TEntity, TContext>
internal class CreateService<TEntity, TContext> : BaseEndpointService<TEntity>, ICreateService<TEntity, TContext>
where TEntity : class, ISlothfulEntity, new()
where TContext : DbContext
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace SlothfulCrud.Services.Endpoints.Post
{
public interface ICreateService<TEntity, TContext>
internal interface ICreateService<TEntity, TContext>
where TEntity : class, ISlothfulEntity, new()
where TContext : DbContext
{
Expand Down
Loading

0 comments on commit 81e4559

Please sign in to comment.