Browse Source

Backport code style changes to OpenIddict 1.x

pull/2236/head
Kévin Chalet 8 years ago
parent
commit
1f37aaa2b1
  1. 14
      src/OpenIddict.Abstractions/OpenIddictBuilder.cs
  2. 14
      src/OpenIddict.Core/OpenIddictCoreBuilder.cs
  3. 10
      src/OpenIddict.EntityFramework/Configurations/OpenIddictApplicationConfiguration.cs
  4. 2
      src/OpenIddict.EntityFramework/Configurations/OpenIddictAuthorizationConfiguration.cs
  5. 14
      src/OpenIddict.EntityFramework/OpenIddictEntityFrameworkBuilder.cs
  6. 2
      src/OpenIddict.EntityFrameworkCore/Configurations/OpenIddictAuthorizationConfiguration.cs
  7. 14
      src/OpenIddict.EntityFrameworkCore/OpenIddictEntityFrameworkCoreBuilder.cs
  8. 14
      src/OpenIddict.MongoDb/OpenIddictMongoDbBuilder.cs
  9. 14
      src/OpenIddict.Mvc/OpenIddictMvcBuilder.cs
  10. 14
      src/OpenIddict.Server/OpenIddictServerBuilder.cs
  11. 14
      src/OpenIddict.Validation/OpenIddictValidationBuilder.cs

14
src/OpenIddict.Abstractions/OpenIddictBuilder.cs

@ -35,13 +35,6 @@ namespace Microsoft.Extensions.DependencyInjection
[EditorBrowsable(EditorBrowsableState.Never)] [EditorBrowsable(EditorBrowsableState.Never)]
public IServiceCollection Services { get; } public IServiceCollection Services { get; }
/// <summary>
/// Returns a string that represents the current object.
/// </summary>
/// <returns>A string that represents the current object.</returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public override string ToString() => base.ToString();
/// <summary> /// <summary>
/// Determines whether the specified object is equal to the current object. /// Determines whether the specified object is equal to the current object.
/// </summary> /// </summary>
@ -56,5 +49,12 @@ namespace Microsoft.Extensions.DependencyInjection
/// <returns>A hash code for the current object.</returns> /// <returns>A hash code for the current object.</returns>
[EditorBrowsable(EditorBrowsableState.Never)] [EditorBrowsable(EditorBrowsableState.Never)]
public override int GetHashCode() => base.GetHashCode(); public override int GetHashCode() => base.GetHashCode();
/// <summary>
/// Returns a string that represents the current object.
/// </summary>
/// <returns>A string that represents the current object.</returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public override string ToString() => base.ToString();
} }
} }

14
src/OpenIddict.Core/OpenIddictCoreBuilder.cs

@ -806,13 +806,6 @@ namespace Microsoft.Extensions.DependencyInjection
return Configure(options => options.EntityCacheLimit = limit); return Configure(options => options.EntityCacheLimit = limit);
} }
/// <summary>
/// Returns a string that represents the current object.
/// </summary>
/// <returns>A string that represents the current object.</returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public override string ToString() => base.ToString();
/// <summary> /// <summary>
/// Determines whether the specified object is equal to the current object. /// Determines whether the specified object is equal to the current object.
/// </summary> /// </summary>
@ -827,5 +820,12 @@ namespace Microsoft.Extensions.DependencyInjection
/// <returns>A hash code for the current object.</returns> /// <returns>A hash code for the current object.</returns>
[EditorBrowsable(EditorBrowsableState.Never)] [EditorBrowsable(EditorBrowsableState.Never)]
public override int GetHashCode() => base.GetHashCode(); public override int GetHashCode() => base.GetHashCode();
/// <summary>
/// Returns a string that represents the current object.
/// </summary>
/// <returns>A string that represents the current object.</returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public override string ToString() => base.ToString();
} }
} }

10
src/OpenIddict.EntityFramework/Configurations/OpenIddictApplicationConfiguration.cs

@ -65,11 +65,17 @@ namespace OpenIddict.EntityFramework
HasMany(application => application.Authorizations) HasMany(application => application.Authorizations)
.WithOptional(authorization => authorization.Application) .WithOptional(authorization => authorization.Application)
.Map(association => association.MapKey("ApplicationId")); .Map(association =>
{
association.MapKey(nameof(OpenIddictAuthorization.Application) + nameof(OpenIddictApplication.Id));
});
HasMany(application => application.Tokens) HasMany(application => application.Tokens)
.WithOptional(token => token.Application) .WithOptional(token => token.Application)
.Map(association => association.MapKey("ApplicationId")); .Map(association =>
{
association.MapKey(nameof(OpenIddictToken.Application) + nameof(OpenIddictApplication.Id));
});
ToTable("OpenIddictApplications"); ToTable("OpenIddictApplications");
} }

2
src/OpenIddict.EntityFramework/Configurations/OpenIddictAuthorizationConfiguration.cs

@ -63,7 +63,7 @@ namespace OpenIddict.EntityFramework
HasMany(authorization => authorization.Tokens) HasMany(authorization => authorization.Tokens)
.WithOptional(token => token.Authorization) .WithOptional(token => token.Authorization)
.Map(association => association.MapKey("AuthorizationId")) .Map(association => association.MapKey(nameof(OpenIddictToken.Authorization) + nameof(OpenIddictAuthorization.Id)))
.WillCascadeOnDelete(); .WillCascadeOnDelete();
ToTable("OpenIddictAuthorizations"); ToTable("OpenIddictAuthorizations");

14
src/OpenIddict.EntityFramework/OpenIddictEntityFrameworkBuilder.cs

@ -112,13 +112,6 @@ namespace Microsoft.Extensions.DependencyInjection
return Configure(options => options.DbContextType = type); return Configure(options => options.DbContextType = type);
} }
/// <summary>
/// Returns a string that represents the current object.
/// </summary>
/// <returns>A string that represents the current object.</returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public override string ToString() => base.ToString();
/// <summary> /// <summary>
/// Determines whether the specified object is equal to the current object. /// Determines whether the specified object is equal to the current object.
/// </summary> /// </summary>
@ -133,5 +126,12 @@ namespace Microsoft.Extensions.DependencyInjection
/// <returns>A hash code for the current object.</returns> /// <returns>A hash code for the current object.</returns>
[EditorBrowsable(EditorBrowsableState.Never)] [EditorBrowsable(EditorBrowsableState.Never)]
public override int GetHashCode() => base.GetHashCode(); public override int GetHashCode() => base.GetHashCode();
/// <summary>
/// Returns a string that represents the current object.
/// </summary>
/// <returns>A string that represents the current object.</returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public override string ToString() => base.ToString();
} }
} }

2
src/OpenIddict.EntityFrameworkCore/Configurations/OpenIddictAuthorizationConfiguration.cs

@ -64,7 +64,7 @@ namespace OpenIddict.EntityFrameworkCore
builder.HasMany(authorization => authorization.Tokens) builder.HasMany(authorization => authorization.Tokens)
.WithOne(token => token.Authorization) .WithOne(token => token.Authorization)
.HasForeignKey("AuthorizationId") .HasForeignKey(nameof(OpenIddictToken.Authorization) + nameof(OpenIddictAuthorization.Id))
.IsRequired(required: false); .IsRequired(required: false);
builder.ToTable("OpenIddictAuthorizations"); builder.ToTable("OpenIddictAuthorizations");

14
src/OpenIddict.EntityFrameworkCore/OpenIddictEntityFrameworkCoreBuilder.cs

@ -122,13 +122,6 @@ namespace Microsoft.Extensions.DependencyInjection
return Configure(options => options.DbContextType = type); return Configure(options => options.DbContextType = type);
} }
/// <summary>
/// Returns a string that represents the current object.
/// </summary>
/// <returns>A string that represents the current object.</returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public override string ToString() => base.ToString();
/// <summary> /// <summary>
/// Determines whether the specified object is equal to the current object. /// Determines whether the specified object is equal to the current object.
/// </summary> /// </summary>
@ -143,5 +136,12 @@ namespace Microsoft.Extensions.DependencyInjection
/// <returns>A hash code for the current object.</returns> /// <returns>A hash code for the current object.</returns>
[EditorBrowsable(EditorBrowsableState.Never)] [EditorBrowsable(EditorBrowsableState.Never)]
public override int GetHashCode() => base.GetHashCode(); public override int GetHashCode() => base.GetHashCode();
/// <summary>
/// Returns a string that represents the current object.
/// </summary>
/// <returns>A string that represents the current object.</returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public override string ToString() => base.ToString();
} }
} }

14
src/OpenIddict.MongoDb/OpenIddictMongoDbBuilder.cs

@ -198,13 +198,6 @@ namespace Microsoft.Extensions.DependencyInjection
return Configure(options => options.Database = database); return Configure(options => options.Database = database);
} }
/// <summary>
/// Returns a string that represents the current object.
/// </summary>
/// <returns>A string that represents the current object.</returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public override string ToString() => base.ToString();
/// <summary> /// <summary>
/// Determines whether the specified object is equal to the current object. /// Determines whether the specified object is equal to the current object.
/// </summary> /// </summary>
@ -219,5 +212,12 @@ namespace Microsoft.Extensions.DependencyInjection
/// <returns>A hash code for the current object.</returns> /// <returns>A hash code for the current object.</returns>
[EditorBrowsable(EditorBrowsableState.Never)] [EditorBrowsable(EditorBrowsableState.Never)]
public override int GetHashCode() => base.GetHashCode(); public override int GetHashCode() => base.GetHashCode();
/// <summary>
/// Returns a string that represents the current object.
/// </summary>
/// <returns>A string that represents the current object.</returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public override string ToString() => base.ToString();
} }
} }

14
src/OpenIddict.Mvc/OpenIddictMvcBuilder.cs

@ -64,13 +64,6 @@ namespace Microsoft.Extensions.DependencyInjection
public OpenIddictMvcBuilder DisableBindingExceptions() public OpenIddictMvcBuilder DisableBindingExceptions()
=> Configure(options => options.DisableBindingExceptions = true); => Configure(options => options.DisableBindingExceptions = true);
/// <summary>
/// Returns a string that represents the current object.
/// </summary>
/// <returns>A string that represents the current object.</returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public override string ToString() => base.ToString();
/// <summary> /// <summary>
/// Determines whether the specified object is equal to the current object. /// Determines whether the specified object is equal to the current object.
/// </summary> /// </summary>
@ -85,5 +78,12 @@ namespace Microsoft.Extensions.DependencyInjection
/// <returns>A hash code for the current object.</returns> /// <returns>A hash code for the current object.</returns>
[EditorBrowsable(EditorBrowsableState.Never)] [EditorBrowsable(EditorBrowsableState.Never)]
public override int GetHashCode() => base.GetHashCode(); public override int GetHashCode() => base.GetHashCode();
/// <summary>
/// Returns a string that represents the current object.
/// </summary>
/// <returns>A string that represents the current object.</returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public override string ToString() => base.ToString();
} }
} }

14
src/OpenIddict.Server/OpenIddictServerBuilder.cs

@ -761,13 +761,6 @@ namespace Microsoft.Extensions.DependencyInjection
public OpenIddictServerBuilder UseRollingTokens() public OpenIddictServerBuilder UseRollingTokens()
=> Configure(options => options.UseRollingTokens = true); => Configure(options => options.UseRollingTokens = true);
/// <summary>
/// Returns a string that represents the current object.
/// </summary>
/// <returns>A string that represents the current object.</returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public override string ToString() => base.ToString();
/// <summary> /// <summary>
/// Determines whether the specified object is equal to the current object. /// Determines whether the specified object is equal to the current object.
/// </summary> /// </summary>
@ -782,5 +775,12 @@ namespace Microsoft.Extensions.DependencyInjection
/// <returns>A hash code for the current object.</returns> /// <returns>A hash code for the current object.</returns>
[EditorBrowsable(EditorBrowsableState.Never)] [EditorBrowsable(EditorBrowsableState.Never)]
public override int GetHashCode() => base.GetHashCode(); public override int GetHashCode() => base.GetHashCode();
/// <summary>
/// Returns a string that represents the current object.
/// </summary>
/// <returns>A string that represents the current object.</returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public override string ToString() => base.ToString();
} }
} }

14
src/OpenIddict.Validation/OpenIddictValidationBuilder.cs

@ -204,13 +204,6 @@ namespace Microsoft.Extensions.DependencyInjection
public OpenIddictValidationBuilder UseReferenceTokens() public OpenIddictValidationBuilder UseReferenceTokens()
=> Configure(options => options.UseReferenceTokens = true); => Configure(options => options.UseReferenceTokens = true);
/// <summary>
/// Returns a string that represents the current object.
/// </summary>
/// <returns>A string that represents the current object.</returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public override string ToString() => base.ToString();
/// <summary> /// <summary>
/// Determines whether the specified object is equal to the current object. /// Determines whether the specified object is equal to the current object.
/// </summary> /// </summary>
@ -225,5 +218,12 @@ namespace Microsoft.Extensions.DependencyInjection
/// <returns>A hash code for the current object.</returns> /// <returns>A hash code for the current object.</returns>
[EditorBrowsable(EditorBrowsableState.Never)] [EditorBrowsable(EditorBrowsableState.Never)]
public override int GetHashCode() => base.GetHashCode(); public override int GetHashCode() => base.GetHashCode();
/// <summary>
/// Returns a string that represents the current object.
/// </summary>
/// <returns>A string that represents the current object.</returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public override string ToString() => base.ToString();
} }
} }

Loading…
Cancel
Save