Skip to content

Commit

Permalink
Rename AndcultureCode.CSharp to RSM.HCD.CSharp
Browse files Browse the repository at this point in the history
Fixes #53
  • Loading branch information
myty committed May 10, 2024
1 parent 532d9ae commit 4d1854a
Show file tree
Hide file tree
Showing 241 changed files with 1,003 additions and 997 deletions.
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"omnisharp.autoStart": true,
"omnisharp.organizeImportsOnFormat": true,
"omnisharp.enableEditorConfigSupport": true,
"omnisharp.enableImportCompletion": true,
"omnisharp.enableRoslynAnalyzers": true,
"csharp.format.enable": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
Expand All @@ -29,5 +28,6 @@
"prettier.requireConfig": true,
"trailing-spaces.trimOnSave": true,
"typescript.preferences.quoteStyle": "double",
"typescript.tsdk": "./frontend/node_modules/typescript/lib"
"typescript.tsdk": "./frontend/node_modules/typescript/lib",
"dotnet.completion.showCompletionItemsFromUnimportedNamespaces": true
}
14 changes: 7 additions & 7 deletions src/Conductors/Aspects/LockingConductor.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using System;
using AndcultureCode.CSharp.Core;
using AndcultureCode.CSharp.Core.Extensions;
using AndcultureCode.CSharp.Core.Interfaces;
using AndcultureCode.CSharp.Core.Interfaces.Conductors;
using AndcultureCode.CSharp.Core.Interfaces.Entity;
using RSM.HCD.CSharp.Core;
using RSM.HCD.CSharp.Core.Extensions;
using RSM.HCD.CSharp.Core.Interfaces;
using RSM.HCD.CSharp.Core.Interfaces.Conductors;
using RSM.HCD.CSharp.Core.Interfaces.Entity;
using Microsoft.Extensions.Logging;

namespace AndcultureCode.CSharp.Conductors.Aspects
namespace RSM.HCD.CSharp.Conductors.Aspects
{
/// <summary>
/// Repository implementation for handling ILockable entities
Expand Down Expand Up @@ -359,4 +359,4 @@ IRepositoryUpdateConductor<T> repositoryUpdateConductor
#endregion ILockingConductor

}
}
}
6 changes: 3 additions & 3 deletions src/Conductors/Conductor.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using AndcultureCode.CSharp.Core.Interfaces.Conductors;
using RSM.HCD.CSharp.Core.Interfaces.Conductors;

namespace AndcultureCode.CSharp.Conductors
namespace RSM.HCD.CSharp.Conductors
{
/// <summary>
/// Conductor class
/// </summary>
public class Conductor : IConductor
{

}
}
8 changes: 4 additions & 4 deletions src/Conductors/Conductors.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>AndcultureCode.CSharp.Conductors</AssemblyName>
<RootNamespace>AndcultureCode.CSharp.Conductors</RootNamespace>
<PackageId>AndcultureCode.CSharp.Conductors</PackageId>
<AssemblyName>RSM.HCD.CSharp.Conductors</AssemblyName>
<RootNamespace>RSM.HCD.CSharp.Conductors</RootNamespace>
<PackageId>RSM.HCD.CSharp.Conductors</PackageId>
<TargetFramework>netstandard2.0</TargetFramework>
<Description>Commonly used interfaces, patterns and utilities when building Conductors by andculture engineering</Description>
<PackageProjectUrl>https://github.com/AndcultureCode/AndcultureCode.CSharp#andcutlurecodecsharpconductors</PackageProjectUrl>
<PackageProjectUrl>https://github.com/AndcultureCode/RSM.HCD.CSharp#andcutlurecodecsharpconductors</PackageProjectUrl>
<IsPackable>true</IsPackable>
<IsTestProject>false</IsTestProject>
</PropertyGroup>
Expand Down
24 changes: 12 additions & 12 deletions src/Conductors/RepositoryConductor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using AndcultureCode.CSharp.Core;
using AndcultureCode.CSharp.Core.Extensions;
using AndcultureCode.CSharp.Core.Interfaces;
using AndcultureCode.CSharp.Core.Interfaces.Conductors;
using AndcultureCode.CSharp.Core.Models.Entities;
using RSM.HCD.CSharp.Core;
using RSM.HCD.CSharp.Core.Extensions;
using RSM.HCD.CSharp.Core.Interfaces;
using RSM.HCD.CSharp.Core.Interfaces.Conductors;
using RSM.HCD.CSharp.Core.Models.Entities;

namespace AndcultureCode.CSharp.Conductors
namespace RSM.HCD.CSharp.Conductors
{
/// <summary>
/// Provides CRUD operations on a given repository
Expand Down Expand Up @@ -41,7 +41,7 @@ public partial class RepositoryConductor<T> : Conductor, IRepositoryConductor<T>
public virtual IResult<List<T>> BulkCreateDistinct<TKey>(IEnumerable<T> items, Func<T, TKey> property, long? createdById = null) => _createConductor.BulkCreateDistinct(items, property, createdById);

/// <summary>
/// Ability to create an entity
/// Ability to create an entity
/// </summary>
/// <param name="item">Item to be created</param>
/// <param name="createdById">Id of user creating the item</param>
Expand All @@ -50,7 +50,7 @@ public partial class RepositoryConductor<T> : Conductor, IRepositoryConductor<T>
public virtual IResult<T> Create(T item, long? createdById = default(long?)) => _createConductor.Create(item, createdById);

/// <summary>
/// Ability to create entities individually using a list
/// Ability to create entities individually using a list
/// </summary>
/// <param name="items">List of items to be created</param>
/// <param name="createdById">Id of user creating the items</param>
Expand Down Expand Up @@ -219,7 +219,7 @@ public partial class RepositoryConductor<T> : Conductor, IRepositoryConductor<T>
public virtual IResult<bool> Delete(IEnumerable<T> items, long? deletedById = default(long?), long batchSize = 100, bool soft = true) => _deleteConductor.Delete(items, deletedById, batchSize, soft);

/// <summary>
/// Ability to restore a soft-deleted entity using the entity itself.
/// Ability to restore a soft-deleted entity using the entity itself.
/// </summary>
/// <param name="o">Entity to be restored</param>
/// <returns></returns>
Expand Down Expand Up @@ -342,17 +342,17 @@ public partial class RepositoryConductor<T> : Conductor, IRepositoryConductor<T>

/// <inheritdoc />
[Obsolete("This method is deprecated in favor of its async counter part", false)]
public virtual IResult<bool> BulkUpdate(IEnumerable<T> items, long? updatedBy = default(long?)) =>
public virtual IResult<bool> BulkUpdate(IEnumerable<T> items, long? updatedBy = default(long?)) =>
_updateConductor.BulkUpdate(items, updatedBy);

/// <inheritdoc />
[Obsolete("This method is deprecated in favor of its async counter part", false)]
public virtual IResult<bool> Update(T item, long? updatedBy = default(long?)) =>
public virtual IResult<bool> Update(T item, long? updatedBy = default(long?)) =>
_updateConductor.Update(item, updatedBy);

/// <inheritdoc />
[Obsolete("This method is deprecated in favor of its async counter part", false)]
public virtual IResult<bool> Update(IEnumerable<T> items, long? updatedBy = default(long?)) =>
public virtual IResult<bool> Update(IEnumerable<T> items, long? updatedBy = default(long?)) =>
_updateConductor.Update(items, updatedBy);

#endregion Update
Expand Down
44 changes: 22 additions & 22 deletions src/Conductors/RepositoryConductorAsync.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
using System.Linq.Expressions;
using System.Threading;
using System.Threading.Tasks;
using AndcultureCode.CSharp.Core.Interfaces;
using AndcultureCode.CSharp.Core.Interfaces.Conductors;
using AndcultureCode.CSharp.Core.Models.Entities;
using RSM.HCD.CSharp.Core.Interfaces;
using RSM.HCD.CSharp.Core.Interfaces.Conductors;
using RSM.HCD.CSharp.Core.Models.Entities;

namespace AndcultureCode.CSharp.Conductors
namespace RSM.HCD.CSharp.Conductors
{
public partial class RepositoryConductor<T> : Conductor, IRepositoryConductor<T>
where T : Entity
Expand Down Expand Up @@ -77,67 +77,67 @@ public partial class RepositoryConductor<T> : Conductor, IRepositoryConductor<T>

#region Create
/// <inheritdoc />
public Task<IResult<List<T>>> BulkCreateAsync(IEnumerable<T> items, long? createdById = null, CancellationToken cancellationToken = default) =>
public Task<IResult<List<T>>> BulkCreateAsync(IEnumerable<T> items, long? createdById = null, CancellationToken cancellationToken = default) =>
_createConductor.BulkCreateAsync(items, createdById, cancellationToken);

/// <inheritdoc />
public Task<IResult<List<T>>> BulkCreateDistinctAsync<TKey>(IEnumerable<T> items, System.Func<T, TKey> property, long? createdById = null, CancellationToken cancellationToken = default) =>
_createConductor.BulkCreateDistinctAsync(items, property, createdById, cancellationToken);

/// <inheritdoc />
public Task<IResult<T>> CreateAsync(T item, long? createdById = null, CancellationToken cancellationToken = default) =>
public Task<IResult<T>> CreateAsync(T item, long? createdById = null, CancellationToken cancellationToken = default) =>
_createConductor.CreateAsync(item, createdById, cancellationToken);

/// <inheritdoc />
public Task<IResult<List<T>>> CreateAsync(IEnumerable<T> items, long? createdById = null, CancellationToken cancellationToken = default) =>
_createConductor.CreateAsync(items, createdById, cancellationToken);

/// <inheritdoc />
public Task<IResult<List<T>>> CreateDistinctAsync<TKey>(IEnumerable<T> items, System.Func<T, TKey> property, long? createdById = null, CancellationToken cancellationToken = default) =>
public Task<IResult<List<T>>> CreateDistinctAsync<TKey>(IEnumerable<T> items, System.Func<T, TKey> property, long? createdById = null, CancellationToken cancellationToken = default) =>
_createConductor.CreateDistinctAsync(items, property, createdById, cancellationToken);

#endregion Create

#region Delete

/// <inheritdoc />
public Task<IResult<bool>> BulkDeleteAsync(IEnumerable<T> items, long? deletedById = default(long?), bool soft = true, CancellationToken cancellationToken = default) =>
public Task<IResult<bool>> BulkDeleteAsync(IEnumerable<T> items, long? deletedById = default(long?), bool soft = true, CancellationToken cancellationToken = default) =>
_deleteConductor.BulkDeleteAsync(items, deletedById, soft, cancellationToken);

/// <inheritdoc />
public Task<IResult<bool>> DeleteAsync(long id, long? deletedById = default(long?), bool soft = true, CancellationToken cancellationToken = default) =>
public Task<IResult<bool>> DeleteAsync(long id, long? deletedById = default(long?), bool soft = true, CancellationToken cancellationToken = default) =>
_deleteConductor.DeleteAsync(id, deletedById, soft, cancellationToken);

/// <inheritdoc />
public Task<IResult<bool>> DeleteAsync(T o, long? deletedById = default(long?), bool soft = true, CancellationToken cancellationToken = default) =>
public Task<IResult<bool>> DeleteAsync(T o, long? deletedById = default(long?), bool soft = true, CancellationToken cancellationToken = default) =>
_deleteConductor.DeleteAsync(o, deletedById, soft, cancellationToken);

/// <inheritdoc />
public Task<IResult<bool>> DeleteAsync(IEnumerable<T> items, long? deletedById = default(long?), long batchSize = 100, bool soft = true, CancellationToken cancellationToken = default) =>
public Task<IResult<bool>> DeleteAsync(IEnumerable<T> items, long? deletedById = default(long?), long batchSize = 100, bool soft = true, CancellationToken cancellationToken = default) =>
_deleteConductor.DeleteAsync(items, deletedById, batchSize, soft, cancellationToken);

/// <inheritdoc />
public Task<IResult<bool>> RestoreAsync(T o, CancellationToken cancellationToken = default) =>
public Task<IResult<bool>> RestoreAsync(T o, CancellationToken cancellationToken = default) =>
_deleteConductor.RestoreAsync(o, cancellationToken);

/// <inheritdoc />
public Task<IResult<bool>> RestoreAsync(long id, CancellationToken cancellationToken = default) =>
public Task<IResult<bool>> RestoreAsync(long id, CancellationToken cancellationToken = default) =>
_deleteConductor.RestoreAsync(id, cancellationToken);

#endregion Delete

#region Update

/// <inheritdoc />
public Task<IResult<bool>> BulkUpdateAsync(IEnumerable<T> items, long? updatedBy = default(long?), CancellationToken cancellationToken = default) =>
public Task<IResult<bool>> BulkUpdateAsync(IEnumerable<T> items, long? updatedBy = default(long?), CancellationToken cancellationToken = default) =>
_updateConductor.BulkUpdateAsync(items, updatedBy, cancellationToken);

/// <inheritdoc />
public Task<IResult<bool>> UpdateAsync(T item, long? updatedBy = default(long?), CancellationToken cancellationToken = default) =>
public Task<IResult<bool>> UpdateAsync(T item, long? updatedBy = default(long?), CancellationToken cancellationToken = default) =>
_updateConductor.UpdateAsync(item, updatedBy, cancellationToken);

/// <inheritdoc />
public Task<IResult<bool>> UpdateAsync(IEnumerable<T> items, long? updatedBy = default(long?), CancellationToken cancellationToken = default) =>
public Task<IResult<bool>> UpdateAsync(IEnumerable<T> items, long? updatedBy = default(long?), CancellationToken cancellationToken = default) =>
_updateConductor.UpdateAsync(items, updatedBy, cancellationToken);

#endregion Update
Expand Down Expand Up @@ -266,27 +266,27 @@ public partial class RepositoryConductor<T> : Conductor, IRepositoryConductor<T>
#region FindById

/// <inheritdoc />
public Task<IResult<T>>FindByIdAsync(long id, bool ignoreQueryFilters = false, CancellationToken cancellationToken = default) =>
public Task<IResult<T>> FindByIdAsync(long id, bool ignoreQueryFilters = false, CancellationToken cancellationToken = default) =>
_readConductor.FindByIdAsync(id, ignoreQueryFilters, cancellationToken);

/// <inheritdoc />
public Task<IResult<T>> FindByIdAsync(long id, Expression<Func<T, bool>> filter, CancellationToken cancellationToken = default) =>
public Task<IResult<T>> FindByIdAsync(long id, Expression<Func<T, bool>> filter, CancellationToken cancellationToken = default) =>
_readConductor.FindByIdAsync(id, filter, cancellationToken);

/// <inheritdoc />
public Task<IResult<T>> FindByIdAsync(long id, CancellationToken cancellationToken = default, params Expression<Func<T, object>>[] includeProperties) =>
public Task<IResult<T>> FindByIdAsync(long id, CancellationToken cancellationToken = default, params Expression<Func<T, object>>[] includeProperties) =>
_readConductor.FindByIdAsync(id, cancellationToken, includeProperties);

/// <inheritdoc />
public Task<IResult<T>> FindByIdAsync(long id, bool ignoreQueryFilters, CancellationToken cancellationToken = default, params Expression<Func<T, object>>[] includeProperties) =>
public Task<IResult<T>> FindByIdAsync(long id, bool ignoreQueryFilters, CancellationToken cancellationToken = default, params Expression<Func<T, object>>[] includeProperties) =>
_readConductor.FindByIdAsync(id, ignoreQueryFilters, cancellationToken, includeProperties);

/// <inheritdoc />
public Task<IResult<T>> FindByIdAsync(long id, CancellationToken cancellationToken = default, params string[] includeProperties) =>
public Task<IResult<T>> FindByIdAsync(long id, CancellationToken cancellationToken = default, params string[] includeProperties) =>
_readConductor.FindByIdAsync(id, cancellationToken, includeProperties);

/// <inheritdoc />
public Task<IResult<T>> FindByIdAsync(long id, string includeProperties, CancellationToken cancellationToken = default) =>
public Task<IResult<T>> FindByIdAsync(long id, string includeProperties, CancellationToken cancellationToken = default) =>
_readConductor.FindByIdAsync(id, cancellationToken, includeProperties);

#endregion FindById
Expand Down
8 changes: 4 additions & 4 deletions src/Conductors/RepositoryCreateConductor.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System;
using System.Collections.Generic;
using AndcultureCode.CSharp.Core.Interfaces;
using AndcultureCode.CSharp.Core.Interfaces.Conductors;
using AndcultureCode.CSharp.Core.Interfaces.Entity;
using RSM.HCD.CSharp.Core.Interfaces;
using RSM.HCD.CSharp.Core.Interfaces.Conductors;
using RSM.HCD.CSharp.Core.Interfaces.Entity;

namespace AndcultureCode.CSharp.Conductors
namespace RSM.HCD.CSharp.Conductors
{
/// <summary>
/// Ability to create an entity or multiple entities
Expand Down
14 changes: 7 additions & 7 deletions src/Conductors/RepositoryCreateConductorAsync.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using AndcultureCode.CSharp.Core.Interfaces;
using AndcultureCode.CSharp.Core.Interfaces.Conductors;
using AndcultureCode.CSharp.Core.Interfaces.Data;
using AndcultureCode.CSharp.Core.Interfaces.Entity;
using RSM.HCD.CSharp.Core.Interfaces;
using RSM.HCD.CSharp.Core.Interfaces.Conductors;
using RSM.HCD.CSharp.Core.Interfaces.Data;
using RSM.HCD.CSharp.Core.Interfaces.Entity;

namespace AndcultureCode.CSharp.Conductors
namespace RSM.HCD.CSharp.Conductors
{
public partial class RepositoryCreateConductor<T> : Conductor, IRepositoryCreateConductor<T>
where T : class, IEntity
Expand Down Expand Up @@ -37,11 +37,11 @@ IRepository<T> repository
}

/// <inheritdoc />
public virtual Task<IResult<List<T>>> BulkCreateAsync(IEnumerable<T> items, long? createdById = null, CancellationToken cancellationToken = default)
public virtual Task<IResult<List<T>>> BulkCreateAsync(IEnumerable<T> items, long? createdById = null, CancellationToken cancellationToken = default)
{
cancellationToken.ThrowIfCancellationRequested();
if (items == null) throw new ArgumentNullException(nameof(items));
if(!items.Any()) throw new ArgumentException(ARGUMENT_EXCEPTION_MESSAGE, nameof(items));
if (!items.Any()) throw new ArgumentException(ARGUMENT_EXCEPTION_MESSAGE, nameof(items));
return _repository.BulkCreateAsync(items, createdById, cancellationToken);
}

Expand Down
10 changes: 5 additions & 5 deletions src/Conductors/RepositoryDeleteConductor.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System;
using System.Collections.Generic;
using AndcultureCode.CSharp.Core.Interfaces;
using AndcultureCode.CSharp.Core.Interfaces.Conductors;
using AndcultureCode.CSharp.Core.Interfaces.Entity;
using RSM.HCD.CSharp.Core.Interfaces;
using RSM.HCD.CSharp.Core.Interfaces.Conductors;
using RSM.HCD.CSharp.Core.Interfaces.Entity;

namespace AndcultureCode.CSharp.Conductors
namespace RSM.HCD.CSharp.Conductors
{
/// <summary>
/// Ability to delete an entity or list of entities
Expand All @@ -24,7 +24,7 @@ public partial class RepositoryDeleteConductor<T> : Conductor, IRepositoryDelete

/// <inheritdoc />
[Obsolete("This method is deprecated in favor of its async counter part", false)]
public virtual IResult<bool> Delete(T o, long? deletedById = default(long?), bool soft = true) => _repository.Delete(o, deletedById, soft);
public virtual IResult<bool> Delete(T o, long? deletedById = default(long?), bool soft = true) => _repository.Delete(o, deletedById, soft);

/// <inheritdoc />
[Obsolete("This method is deprecated in favor of its async counter part", false)]
Expand Down
10 changes: 5 additions & 5 deletions src/Conductors/RepositoryDeleteConductorAsync.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using AndcultureCode.CSharp.Core.Interfaces;
using AndcultureCode.CSharp.Core.Interfaces.Conductors;
using AndcultureCode.CSharp.Core.Interfaces.Data;
using AndcultureCode.CSharp.Core.Interfaces.Entity;
using RSM.HCD.CSharp.Core.Interfaces;
using RSM.HCD.CSharp.Core.Interfaces.Conductors;
using RSM.HCD.CSharp.Core.Interfaces.Data;
using RSM.HCD.CSharp.Core.Interfaces.Entity;

namespace AndcultureCode.CSharp.Conductors
namespace RSM.HCD.CSharp.Conductors
{
public partial class RepositoryDeleteConductor<T> : Conductor, IRepositoryDeleteConductor<T>
where T : class, IEntity
Expand Down
8 changes: 4 additions & 4 deletions src/Conductors/RepositoryReadConductor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using AndcultureCode.CSharp.Core.Interfaces;
using AndcultureCode.CSharp.Core.Interfaces.Conductors;
using AndcultureCode.CSharp.Core.Interfaces.Entity;
using RSM.HCD.CSharp.Core.Interfaces;
using RSM.HCD.CSharp.Core.Interfaces.Conductors;
using RSM.HCD.CSharp.Core.Interfaces.Entity;

namespace AndcultureCode.CSharp.Conductors
namespace RSM.HCD.CSharp.Conductors
{
/// <summary>
/// Provides read operations on a given repository.
Expand Down
Loading

0 comments on commit 4d1854a

Please sign in to comment.