Skip to content

Commit

Permalink
minor formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
asulwer committed Jul 24, 2018
1 parent 4121b72 commit 30868af
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 33 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using Microsoft.EntityFrameworkCore;
using TrackerEnabledDbContext.Common.Configuration;
using Microsoft.EntityFrameworkCore;
using TrackerEnabledDbContext.Common.Tests.Models;
using TrackerEnabledDbContext.Common.Tests;

Expand Down
1 change: 0 additions & 1 deletion TrackerEnabledDbContext.Core/TrackerContext.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.ChangeTracking;
using Microsoft.EntityFrameworkCore.Storage;
using System;
using System.Collections.Generic;
using System.Dynamic;
Expand Down
8 changes: 3 additions & 5 deletions TrackerEnabledDbContext/Auditors/ChangeLogDetailsAuditor.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.ChangeTracking;
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.ChangeTracking;
using TrackerEnabledDbContext.Common.Auditors.Comparators;
using TrackerEnabledDbContext.Common.Configuration;
using TrackerEnabledDbContext.Common.Extensions;
using TrackerEnabledDbContext.Common.Interfaces;
using TrackerEnabledDbContext.Common.Models;

Expand Down
7 changes: 3 additions & 4 deletions TrackerEnabledDbContext/Auditors/LogAuditor.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.ChangeTracking;
using System;
using System;
using System.Collections.Generic;
using System.Dynamic;
using System.Linq;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.ChangeTracking;
using TrackerEnabledDbContext.Common.Configuration;
using TrackerEnabledDbContext.Common.Extensions;
using TrackerEnabledDbContext.Common.Models;
using TrackerEnabledDbContext.Core.Common.Configuration;
using TrackerEnabledDbContext.Core.Common.Interfaces;
Expand Down
4 changes: 2 additions & 2 deletions TrackerEnabledDbContext/Configuration/DbContextExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Microsoft.EntityFrameworkCore;
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.EntityFrameworkCore;
using TrackerEnabledDbContext.Common.Configuration;

namespace TrackerEnabledDbContext.Core.Common.Configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,14 @@ internal static bool IsTrackingEnabled(Type entityType)
{
if (typeof (IUnTrackable).IsAssignableFrom(entityType)) return false;

TrackingConfigurationValue value = TrackingDataStore.EntityConfigStore.GetOrAdd(
entityType.FullName,
(key) => EntityConfigValueFactory(key, entityType)
);
TrackingConfigurationValue value = TrackingDataStore.EntityConfigStore.GetOrAdd(entityType.FullName, (key) => EntityConfigValueFactory(key, entityType));

return value.Value;
}

internal static TrackingConfigurationValue EntityConfigValueFactory(string key, Type entityType)
{
TrackChangesAttribute trackChangesAttribute =
entityType.GetCustomAttributes(true).OfType<TrackChangesAttribute>().SingleOrDefault();
TrackChangesAttribute trackChangesAttribute = entityType.GetCustomAttributes(true).OfType<TrackChangesAttribute>().SingleOrDefault();
bool value = trackChangesAttribute != null;

return new TrackingConfigurationValue(value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ public static void ClearFluentConfiguration()
internal static Type SoftDeletableType;
internal static string SoftDeletablePropertyName;

public static void SetSoftDeletableCriteria<TSoftDeletable>(
Expression<Func<TSoftDeletable,bool>> softDeletableProperty)
public static void SetSoftDeletableCriteria<TSoftDeletable>(Expression<Func<TSoftDeletable,bool>> softDeletableProperty)
{
SoftDeletableType = typeof (TSoftDeletable);
SoftDeletablePropertyName = softDeletableProperty.GetPropertyInfo().Name;
Expand Down
6 changes: 3 additions & 3 deletions TrackerEnabledDbContext/CoreTracker.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.ChangeTracking;
using System;
using System;
using System.Collections.Generic;
using System.Dynamic;
using System.Linq;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.ChangeTracking;
using TrackerEnabledDbContext.Common.Configuration;
using TrackerEnabledDbContext.Common.EventArgs;
using TrackerEnabledDbContext.Common.Models;
Expand Down
9 changes: 4 additions & 5 deletions TrackerEnabledDbContext/Interfaces/IDbContext.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
using Microsoft.EntityFrameworkCore;
using System;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.ChangeTracking;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage;
using System;
using System.Threading;
using System.Threading.Tasks;

namespace TrackerEnabledDbContext.Core.Common.Interfaces
{
Expand Down
4 changes: 2 additions & 2 deletions TrackerEnabledDbContext/Tools/LogDataMigration.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using Microsoft.EntityFrameworkCore;
using System;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using TrackerEnabledDbContext.Common.Models;
using TrackerEnabledDbContext.Common.Tools;
using TrackerEnabledDbContext.Core.Common.Interfaces;
Expand Down

0 comments on commit 30868af

Please sign in to comment.