diff --git a/Authentication/MongoAuth/MongoAuth.csproj b/Authentication/MongoAuth/MongoAuth.csproj
index 9df5ac1..88de18b 100644
--- a/Authentication/MongoAuth/MongoAuth.csproj
+++ b/Authentication/MongoAuth/MongoAuth.csproj
@@ -9,7 +9,7 @@
Properties
MongoAuth
MongoAuth
- v4.6.1
+ v4.6.2
512
@@ -31,16 +31,16 @@
4
-
- ..\..\packages\MongoDB.Bson.2.2.4\lib\net45\MongoDB.Bson.dll
+
+ ..\..\packages\MongoDB.Bson.2.3.0\lib\net45\MongoDB.Bson.dll
True
-
- ..\..\packages\MongoDB.Driver.2.2.4\lib\net45\MongoDB.Driver.dll
+
+ ..\..\packages\MongoDB.Driver.2.3.0\lib\net45\MongoDB.Driver.dll
True
-
- ..\..\packages\MongoDB.Driver.Core.2.2.4\lib\net45\MongoDB.Driver.Core.dll
+
+ ..\..\packages\MongoDB.Driver.Core.2.3.0\lib\net45\MongoDB.Driver.Core.dll
True
diff --git a/Authentication/MongoAuth/MongoMembershipProvider.cs b/Authentication/MongoAuth/MongoMembershipProvider.cs
index 4ce218d..f55daf2 100644
--- a/Authentication/MongoAuth/MongoMembershipProvider.cs
+++ b/Authentication/MongoAuth/MongoMembershipProvider.cs
@@ -18,13 +18,13 @@ public class MongoMembershipProvider : MembershipProvider
private bool _enablePasswordReset = true;
private int _maxInvalidPasswordAttempts = 5;
+
+ private IMongoCollection _memberCollection;
private int _minRequiredNonAlphanumericCharacters = 1;
private int _minRequriedPasswordLength = 12;
private int _passwordAttemptWindow = 60;
private bool _requiresUniqueEmail = true;
- private IMongoCollection _memberCollection;
-
public override string ApplicationName { get; set; }
public override bool EnablePasswordReset => _enablePasswordReset;
@@ -97,7 +97,7 @@ public override bool ChangePassword(string username, string oldPassword, string
return false;
}
- byte[] salt = new byte[24];
+ var salt = new byte[24];
byte[] hash = CalculateHash(newPassword, ref salt);
mm.PassSalt = salt;
@@ -112,7 +112,10 @@ public override bool ChangePassword(string username, string oldPassword, string
return false;
}
- public override bool ChangePasswordQuestionAndAnswer(string username, string password, string newPasswordQuestion, string newPasswordAnswer) { throw new NotImplementedException(); }
+ public override bool ChangePasswordQuestionAndAnswer(string username, string password, string newPasswordQuestion, string newPasswordAnswer)
+ {
+ throw new NotImplementedException();
+ }
public override MembershipUser CreateUser(string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status)
{
@@ -139,7 +142,7 @@ public override MembershipUser CreateUser(string username, string password, stri
}
else
{
- byte[] salt = new byte[24];
+ var salt = new byte[24];
byte[] hash = CalculateHash(password, ref salt);
MongoMember mm = new MongoMember
@@ -179,12 +182,18 @@ public override bool DeleteUser(string username, bool deleteAllRelatedData)
Task task = _memberCollection.DeleteOneAsync(m => m.UserName.ToLower() == username.ToLower());
task.Wait();
- return task.Result.IsAcknowledged && task.Result.DeletedCount == 1;
+ return task.Result.IsAcknowledged && (task.Result.DeletedCount == 1);
}
- public override MembershipUserCollection FindUsersByEmail(string emailToMatch, int pageIndex, int pageSize, out int totalRecords) { throw new NotImplementedException(); }
+ public override MembershipUserCollection FindUsersByEmail(string emailToMatch, int pageIndex, int pageSize, out int totalRecords)
+ {
+ throw new NotImplementedException();
+ }
- public override MembershipUserCollection FindUsersByName(string usernameToMatch, int pageIndex, int pageSize, out int totalRecords) { throw new NotImplementedException(); }
+ public override MembershipUserCollection FindUsersByName(string usernameToMatch, int pageIndex, int pageSize, out int totalRecords)
+ {
+ throw new NotImplementedException();
+ }
public override MembershipUserCollection GetAllUsers(int pageIndex, int pageSize, out int totalRecords)
{
@@ -208,9 +217,15 @@ public override MembershipUserCollection GetAllUsers(int pageIndex, int pageSize
return muc;
}
- public override int GetNumberOfUsersOnline() { throw new NotImplementedException(); }
+ public override int GetNumberOfUsersOnline()
+ {
+ throw new NotImplementedException();
+ }
- public override string GetPassword(string username, string answer) { throw new NotImplementedException(); }
+ public override string GetPassword(string username, string answer)
+ {
+ throw new NotImplementedException();
+ }
public override MembershipUser GetUser(string username, bool userIsOnline)
{
@@ -244,7 +259,10 @@ public override string GetUserNameByEmail(string email)
return task.Result.UserName;
}
- public override string ResetPassword(string username, string answer) { throw new NotImplementedException(); }
+ public override string ResetPassword(string username, string answer)
+ {
+ throw new NotImplementedException();
+ }
public void ChangeApproval(Guid id, bool newStatus)
{
@@ -254,8 +272,10 @@ public void ChangeApproval(Guid id, bool newStatus)
public void ChangeLockStatus(Guid id, bool newStatus)
{
- List> updateDefinition = new List>();
- updateDefinition.Add(Builders.Update.Set(u => u.IsLockedOut, newStatus));
+ var updateDefinition = new List>
+ {
+ Builders.Update.Set(u => u.IsLockedOut, newStatus)
+ };
if (newStatus)
{
@@ -276,10 +296,13 @@ public override bool UnlockUser(string userName)
Task task = _memberCollection.UpdateOneAsync(Builders.Filter.Eq(m => m.UserName.ToLower(), userName.ToLower()), Builders.Update.Set(m => m.IsLockedOut, false));
task.Wait();
- return task.Result.IsAcknowledged && task.Result.ModifiedCount == 1;
+ return task.Result.IsAcknowledged && (task.Result.ModifiedCount == 1);
}
- public override void UpdateUser(MembershipUser user) { throw new NotImplementedException(); }
+ public override void UpdateUser(MembershipUser user)
+ {
+ throw new NotImplementedException();
+ }
public override bool ValidateUser(string username, string password)
{
@@ -287,7 +310,7 @@ public override bool ValidateUser(string username, string password)
task.Wait();
MongoMember mm = task.Result;
- if (mm == null
+ if ((mm == null)
|| !(mm.IsApproved && !mm.IsLockedOut))
{
return false;
@@ -353,7 +376,7 @@ private static byte[] CalculateHash(string password, ref byte[] salt)
byte[] passwordBytes = Encoding.UTF8.GetBytes(password);
- byte[] hashPlaintext = new byte[salt.Length + passwordBytes.Length];
+ var hashPlaintext = new byte[salt.Length + passwordBytes.Length];
passwordBytes.CopyTo(hashPlaintext, 0);
salt.CopyTo(hashPlaintext, passwordBytes.Length);
diff --git a/Authentication/MongoAuth/MongoRoleProvider.cs b/Authentication/MongoAuth/MongoRoleProvider.cs
index c1a9f18..0cd10c1 100644
--- a/Authentication/MongoAuth/MongoRoleProvider.cs
+++ b/Authentication/MongoAuth/MongoRoleProvider.cs
@@ -17,8 +17,8 @@ public class MongoRoleProvider : RoleProvider
{
private const string MEMBER_COLLECTION_NAME = "members";
private const string ROLE_COLLECTION_NAME = "roles";
- private IMongoCollection _roleCollection;
private IMongoCollection _memberCollection;
+ private IMongoCollection _roleCollection;
public override string ApplicationName
{
@@ -61,7 +61,7 @@ public override void AddUsersToRoles(string[] usernames, string[] roleNames)
for (int i = 0; i < roles.Count; i++)
{
- List newUsers = new List();
+ var newUsers = new List();
if (roles[i].Users != null)
{
@@ -98,8 +98,8 @@ public override bool DeleteRole(string roleName, bool throwOnPopulatedRole)
Task role = _roleCollection.Find(r => r.RoleName == roleName).SingleOrDefaultAsync();
role.Wait();
- if (role.Result != null
- && role.Result.Users.Length > 0
+ if ((role.Result != null)
+ && (role.Result.Users.Length > 0)
&& throwOnPopulatedRole)
{
throw new ProviderException(Resources.RoleNotEmpty);
@@ -145,7 +145,7 @@ public override string[] GetRolesForUser(string username)
return Array.Empty();
}
- Task> role = _roleCollection.Find(r => r.Users != null && r.Users.Contains(user.Result.Id)).ToListAsync();
+ Task> role = _roleCollection.Find(r => (r.Users != null) && r.Users.Contains(user.Result.Id)).ToListAsync();
role.Wait();
return role.Result.Select(r => r.RoleName).ToArray();
@@ -174,8 +174,8 @@ public override bool IsUserInRole(string username, string roleName)
user.Wait();
role.Wait();
- if (user.Result == null
- || role.Result?.Users == null)
+ if ((user.Result == null)
+ || (role.Result?.Users == null))
{
return false;
}
diff --git a/Authentication/MongoAuth/packages.config b/Authentication/MongoAuth/packages.config
index 225850e..1b64f9c 100644
--- a/Authentication/MongoAuth/packages.config
+++ b/Authentication/MongoAuth/packages.config
@@ -1,6 +1,6 @@
-
-
-
+
+
+
\ No newline at end of file
diff --git a/BuildFeed.Model/BuildFeed.Model.csproj b/BuildFeed.Model/BuildFeed.Model.csproj
index 48f59ce..b3cfb0c 100644
--- a/BuildFeed.Model/BuildFeed.Model.csproj
+++ b/BuildFeed.Model/BuildFeed.Model.csproj
@@ -39,16 +39,16 @@
..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll
True
-
- ..\packages\MongoDB.Bson.2.2.4\lib\net45\MongoDB.Bson.dll
+
+ ..\packages\MongoDB.Bson.2.3.0\lib\net45\MongoDB.Bson.dll
True
-
- ..\packages\MongoDB.Driver.2.2.4\lib\net45\MongoDB.Driver.dll
+
+ ..\packages\MongoDB.Driver.2.3.0\lib\net45\MongoDB.Driver.dll
True
-
- ..\packages\MongoDB.Driver.Core.2.2.4\lib\net45\MongoDB.Driver.Core.dll
+
+ ..\packages\MongoDB.Driver.Core.2.3.0\lib\net45\MongoDB.Driver.Core.dll
True
diff --git a/BuildFeed.Model/BuildGroup.cs b/BuildFeed.Model/BuildGroup.cs
index d05fa38..a90496d 100644
--- a/BuildFeed.Model/BuildGroup.cs
+++ b/BuildFeed.Model/BuildGroup.cs
@@ -1,6 +1,6 @@
namespace BuildFeed.Model
{
- public class BuildGroup
+ public struct BuildGroup
{
public uint Major { get; set; }
public uint Minor { get; set; }
diff --git a/BuildFeed.Model/packages.config b/BuildFeed.Model/packages.config
index d8999af..07e16fb 100644
--- a/BuildFeed.Model/packages.config
+++ b/BuildFeed.Model/packages.config
@@ -5,7 +5,7 @@
-
-
-
+
+
+
\ No newline at end of file
diff --git a/BuildFeed/BuildFeed.csproj b/BuildFeed/BuildFeed.csproj
index 98cf424..cd62fd3 100644
--- a/BuildFeed/BuildFeed.csproj
+++ b/BuildFeed/BuildFeed.csproj
@@ -1,6 +1,6 @@
-
+
@@ -97,8 +97,8 @@
..\packages\Microsoft.ApplicationInsights.2.1.0\lib\net46\Microsoft.ApplicationInsights.dll
True
-
- ..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.1\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll
+
+ ..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.2\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll
True
@@ -106,16 +106,16 @@
..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll
True
-
- ..\packages\MongoDB.Bson.2.2.4\lib\net45\MongoDB.Bson.dll
+
+ ..\packages\MongoDB.Bson.2.3.0\lib\net45\MongoDB.Bson.dll
True
-
- ..\packages\MongoDB.Driver.2.2.4\lib\net45\MongoDB.Driver.dll
+
+ ..\packages\MongoDB.Driver.2.3.0\lib\net45\MongoDB.Driver.dll
True
-
- ..\packages\MongoDB.Driver.Core.2.2.4\lib\net45\MongoDB.Driver.Core.dll
+
+ ..\packages\MongoDB.Driver.Core.2.3.0\lib\net45\MongoDB.Driver.Core.dll
True
@@ -499,7 +499,7 @@
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
+