Skip to content

Commit

Permalink
Solution Name modified to AspNetCore, add a new webapplication test p…
Browse files Browse the repository at this point in the history
…roject.

Updated to the last .Net Core
  • Loading branch information
robson-paproski committed Jun 1, 2016
1 parent dd37501 commit e5df4c9
Show file tree
Hide file tree
Showing 125 changed files with 28,475 additions and 41 deletions.
40 changes: 0 additions & 40 deletions AspNet.Identity3.PostgreSQL.sln

This file was deleted.

39 changes: 39 additions & 0 deletions AspNetCore.Identity3.PostgreSQL.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25123.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{F031D30B-35A0-432F-8E84-943BC9E3B34F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{15018028-6BE9-47BE-A29C-65F7D74A9B58}"
ProjectSection(SolutionItems) = preProject
global.json = global.json
EndProjectSection
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "AspNetCore.Identity.PostgreSQL", "src\AspNetCore.Identity.PostgreSQL\AspNetCore.Identity.PostgreSQL.xproj", "{874256E7-0142-4E61-BDD8-F672A3994053}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "WebTestApp", "src\WebTestApp\WebTestApp.xproj", "{90E747DF-DFD7-4F34-85B8-47C9E9CE9400}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{874256E7-0142-4E61-BDD8-F672A3994053}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{874256E7-0142-4E61-BDD8-F672A3994053}.Debug|Any CPU.Build.0 = Debug|Any CPU
{874256E7-0142-4E61-BDD8-F672A3994053}.Release|Any CPU.ActiveCfg = Release|Any CPU
{874256E7-0142-4E61-BDD8-F672A3994053}.Release|Any CPU.Build.0 = Release|Any CPU
{90E747DF-DFD7-4F34-85B8-47C9E9CE9400}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{90E747DF-DFD7-4F34-85B8-47C9E9CE9400}.Debug|Any CPU.Build.0 = Debug|Any CPU
{90E747DF-DFD7-4F34-85B8-47C9E9CE9400}.Release|Any CPU.ActiveCfg = Release|Any CPU
{90E747DF-DFD7-4F34-85B8-47C9E9CE9400}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{874256E7-0142-4E61-BDD8-F672A3994053} = {F031D30B-35A0-432F-8E84-943BC9E3B34F}
{90E747DF-DFD7-4F34-85B8-47C9E9CE9400} = {F031D30B-35A0-432F-8E84-943BC9E3B34F}
EndGlobalSection
EndGlobal
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"wrap"
],
"sdk": {
"version": "1.0.0-rc1-update1"
"version": "1.0.0-preview1-002702"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>

<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals">
<ProjectGuid>874256e7-0142-4e61-bdd8-f672a3994053</ProjectGuid>
<RootNamespace>AspNetCore.Identity.PostgreSQL</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
</PropertyGroup>

<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>
103 changes: 103 additions & 0 deletions src/AspNetCore.Identity.PostgreSQL/IdentityRole.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
using System;
using System.Collections.Generic;

namespace AspNetCore.Identity.PostgreSQL
{

/// <summary>
/// The default implementation of <see cref="IdentityRole{TKey}"/> which uses a guid as the primary key.
/// </summary>
public class IdentityRole : IdentityRole<Guid>
{
private string roleId;

/// <summary>
/// Initializes a new instance of <see cref="IdentityRole"/>.
/// </summary>
/// <remarks>
/// The Id property is initialized to from a new GUID string value.
/// </remarks>
public IdentityRole()
{
Id = Guid.NewGuid();
}

/// <summary>
/// Initializes a new instance of <see cref="IdentityRole"/>.
/// </summary>
/// <param name="roleName">The role name.</param>
/// <remarks>
/// The Id property is initialized to from a new GUID string value.
/// </remarks>
public IdentityRole(string roleName) : this()
{
Name = roleName;
}

public IdentityRole(string roleName, string roleId) : this(roleName)
{
this.roleId = roleId;
}
}

/// <summary>
/// Represents a role in the identity system
/// </summary>
/// <typeparam name="TKey">The type used for the primary key for the role.</typeparam>
public class IdentityRole<TKey> where TKey : IEquatable<TKey>
{
/// <summary>
/// Initializes a new instance of <see cref="IdentityRole{TKey}"/>.
/// </summary>
public IdentityRole() { }

/// <summary>
/// Initializes a new instance of <see cref="IdentityRole{TKey}"/>.
/// </summary>
/// <param name="roleName">The role name.</param>
public IdentityRole(string roleName) : this()
{
Name = roleName;
}

/// <summary>
/// Navigation property for the users in this role.
/// </summary>
public virtual ICollection<IdentityUserRole<TKey>> Users { get; } = new List<IdentityUserRole<TKey>>();

/// <summary>
/// Navigation property for claims in this role.
/// </summary>
public virtual ICollection<IdentityRoleClaim<TKey>> Claims { get; } = new List<IdentityRoleClaim<TKey>>();

/// <summary>
/// Gets or sets the primary key for this role.
/// </summary>
public virtual TKey Id { get; set; }

/// <summary>
/// Gets or sets the name for this role.
/// </summary>
public virtual string Name { get; set; }

/// <summary>
/// Gets or sets the normalized name for this role.
/// </summary>
public virtual string NormalizedName { get; set; }

/// <summary>
/// A random value that should change whenever a role is persisted to the store
/// </summary>
public virtual string ConcurrencyStamp { get; set; } = Guid.NewGuid().ToString();

/// <summary>
/// Returns the name of the role.
/// </summary>
/// <returns>The name of the role.</returns>
public override string ToString()
{
return Name;
}
}

}
31 changes: 31 additions & 0 deletions src/AspNetCore.Identity.PostgreSQL/IdentityRoleClaim.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using System;

namespace AspNetCore.Identity.PostgreSQL
{
/// <summary>
/// Represents a claim that is granted to all users within a role.
/// </summary>
/// <typeparam name="TKey">The type of the primary key of the role associated with this claim.</typeparam>
public class IdentityRoleClaim<TKey> where TKey : IEquatable<TKey>
{
/// <summary>
/// Gets or sets the identifier for this role claim.
/// </summary>
public virtual int Id { get; set; }

/// <summary>
/// Gets or sets the of the primary key of the role associated with this claim.
/// </summary>
public virtual TKey RoleId { get; set; }

/// <summary>
/// Gets or sets the claim type for this claim.
/// </summary>
public virtual string ClaimType { get; set; }

/// <summary>
/// Gets or sets the claim value for this claim.
/// </summary>
public virtual string ClaimValue { get; set; }
}
}
Loading

0 comments on commit e5df4c9

Please sign in to comment.