1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 23:52:50 -05:00

Run dotnet format (#1764)

This commit is contained in:
Oscar Hinton
2021-12-16 15:35:09 +01:00
committed by GitHub
parent 61dc65aa59
commit 23b0a1f9df
531 changed files with 3024 additions and 3000 deletions

View File

@ -1,4 +1,4 @@
namespace Bit.Core.Models.Api
namespace Bit.Core.Models.Api
{
public interface ICaptchaProtectedModel
{

View File

@ -1,5 +1,5 @@
using Bit.Core.Enums;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
using Bit.Core.Enums;
namespace Bit.Core.Models.Api
{

View File

@ -1,6 +1,6 @@
using Bit.Core.Enums;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Collections.Generic;
using Bit.Core.Enums;
namespace Bit.Core.Models.Api
{

View File

@ -1,5 +1,5 @@
using System.Linq;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNetCore.Mvc.ModelBinding;
namespace Bit.Core.Models.Api

View File

@ -1,8 +1,8 @@
using Bit.Core.Enums;
using System;
using System.Collections.Generic;
using Bit.Core.Enums;
using Bit.Core.Models.Table;
using Stripe;
using System;
using System.Collections.Generic;
namespace Bit.Core.Models.Business
{

View File

@ -1,11 +1,11 @@
using System;
using System;
namespace Bit.Core.Models.Business
{
public class ExpiringToken
{
public readonly string Token;
public readonly DateTime ExpirationDate;
public readonly string Token;
public readonly DateTime ExpirationDate;
public ExpiringToken(string token, DateTime expirationDate)
{

View File

@ -1,5 +1,5 @@
using Bit.Core.Models.Table;
using System.Collections.Generic;
using System.Collections.Generic;
using Bit.Core.Models.Table;
namespace Bit.Core.Models.Business
{

View File

@ -1,14 +1,14 @@
using Bit.Core.Enums;
using Bit.Core.Models.Table;
using Bit.Core.Services;
using Bit.Core.Settings;
using Newtonsoft.Json;
using System;
using System;
using System.Linq;
using System.Reflection;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using Bit.Core.Enums;
using Bit.Core.Models.Table;
using Bit.Core.Services;
using Bit.Core.Settings;
using Newtonsoft.Json;
namespace Bit.Core.Models.Business
{

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using Bit.Core.Models.Data;
namespace Bit.Core.Models.Business
@ -11,7 +11,7 @@ namespace Bit.Core.Models.Business
public Permissions Permissions { get; set; }
public IEnumerable<SelectionReadOnly> Collections { get; set; }
public OrganizationUserInvite() {}
public OrganizationUserInvite() { }
public OrganizationUserInvite(OrganizationUserInviteData requestModel)
{

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using Bit.Core.Enums.Provider;

View File

@ -24,7 +24,7 @@ namespace Bit.Core.Models.Business
[JsonConverter(typeof(StringEnumConverter))]
public ReferenceEventType Type { get; set; }
[JsonConverter(typeof(StringEnumConverter))]
public ReferenceEventSource Source { get; set; }

View File

@ -1,6 +1,6 @@
using System.Collections.Generic;
using Bit.Core.Models.Table;
using Stripe;
using System.Collections.Generic;
namespace Bit.Core.Models.Business
{

View File

@ -1,7 +1,7 @@
using Stripe;
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using Stripe;
namespace Bit.Core.Models.Business
{

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using Bit.Core.Models.Table;
using Stripe;

View File

@ -1,12 +1,12 @@
using Bit.Core.Models.Table;
using Bit.Core.Services;
using Newtonsoft.Json;
using System;
using System;
using System.Linq;
using System.Reflection;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using Bit.Core.Models.Table;
using Bit.Core.Services;
using Newtonsoft.Json;
namespace Bit.Core.Models.Business
{

View File

@ -1,5 +1,5 @@
using Newtonsoft.Json;
using System;
using System;
using Newtonsoft.Json;
namespace Bit.Core.Models.Data
{

View File

@ -1,6 +1,6 @@
using System;
using Bit.Core.Enums;
using Bit.Core.Context;
using Bit.Core.Enums;
using Bit.Core.Settings;
namespace Bit.Core.Models.Data

View File

@ -143,7 +143,7 @@ namespace Bit.Core.Models.Data
{
return $"OrganizationId={e.OrganizationId}";
}
if (e.ProviderId.HasValue)
{
return $"ProviderId={e.ProviderId}";

View File

@ -1,4 +1,4 @@
using System.Data;
using System.Data;
using Bit.Core.Models.Table;
namespace Bit.Core.Models.Data

View File

@ -15,7 +15,7 @@ namespace Bit.Core.Models.Data
public bool UseEvents { get; set; }
public bool UseTotp { get; set; }
public bool Use2fa { get; set; }
public bool UseApi{ get; set; }
public bool UseApi { get; set; }
public bool UseResetPassword { get; set; }
public bool SelfHost { get; set; }
public bool UsersGetPremium { get; set; }

View File

@ -12,12 +12,12 @@ namespace Bit.Core.Models.Data
{
throw new ArgumentNullException(nameof(orgUser));
}
if (user == null)
{
throw new ArgumentNullException(nameof(user));
}
if (org == null)
{
throw new ArgumentNullException(nameof(org));

View File

@ -1,4 +1,4 @@
using System.Data;
using System.Data;
using Bit.Core.Models.Table;
namespace Bit.Core.Models.Data

View File

@ -1,8 +1,8 @@
using System;
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
namespace Bit.Core.Models.Data
namespace Bit.Core.Models.Data
{
public class Permissions
{

View File

@ -16,7 +16,7 @@ namespace Bit.Core.Models.Data
public bool UseEvents { get; set; }
public bool UseTotp { get; set; }
public bool Use2fa { get; set; }
public bool UseApi{ get; set; }
public bool UseApi { get; set; }
public bool UseResetPassword { get; set; }
public bool SelfHost { get; set; }
public bool UsersGetPremium { get; set; }

View File

@ -1,4 +1,4 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
namespace Bit.Core.Models.Data
{

View File

@ -95,19 +95,19 @@ namespace Bit.Core.Models.Data
.Where(c => !string.IsNullOrWhiteSpace(c))?
.Select(c => c.Trim()) ??
Array.Empty<string>();
public IEnumerable<string> GetAdditionalUserIdClaimTypes() => AdditionalUserIdClaimTypes?
.Split(',')?
.Where(c => !string.IsNullOrWhiteSpace(c))?
.Select(c => c.Trim()) ??
Array.Empty<string>();
public IEnumerable<string> GetAdditionalEmailClaimTypes() => AdditionalEmailClaimTypes?
.Split(',')?
.Where(c => !string.IsNullOrWhiteSpace(c))?
.Select(c => c.Trim()) ??
Array.Empty<string>();
public IEnumerable<string> GetAdditionalNameClaimTypes() => AdditionalNameClaimTypes?
.Split(',')?
.Where(c => !string.IsNullOrWhiteSpace(c))?

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text.Json;
using AutoMapper;

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text.Json;
using AutoMapper;

View File

@ -1,4 +1,4 @@
using AutoMapper;
using AutoMapper;
namespace Bit.Core.Models.EntityFramework
{

View File

@ -1,4 +1,4 @@
using AutoMapper;
using AutoMapper;
namespace Bit.Core.Models.EntityFramework
{

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text.Json;
using AutoMapper;

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text.Json;
using AutoMapper;

View File

@ -1,4 +1,4 @@
using AutoMapper;
using AutoMapper;
namespace Bit.Core.Models.EntityFramework
{

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text.Json;
using AutoMapper;

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text.Json;
using AutoMapper;

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text.Json;
using AutoMapper;

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text.Json;
using AutoMapper;

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text.Json;
using AutoMapper;

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text.Json;
using AutoMapper;

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text.Json;
using AutoMapper;

View File

@ -1,4 +1,4 @@
using AutoMapper;
using AutoMapper;
namespace Bit.Core.Models.EntityFramework.Provider
{

View File

@ -1,4 +1,4 @@
using AutoMapper;
using AutoMapper;
namespace Bit.Core.Models.EntityFramework.Provider
{

View File

@ -1,4 +1,4 @@
using AutoMapper;
using AutoMapper;
namespace Bit.Core.Models.EntityFramework.Provider
{

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text.Json;
using AutoMapper;

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text.Json;
using AutoMapper;

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text.Json;
using AutoMapper;

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text.Json;
using AutoMapper;

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text.Json;
using AutoMapper;

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text.Json;
using AutoMapper;

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text.Json;
using AutoMapper;

View File

@ -1,4 +1,4 @@
namespace Bit.Core.Models.Mail.FamiliesForEnterprise
namespace Bit.Core.Models.Mail.FamiliesForEnterprise
{
public class FamiliesForEnterpriseOfferExistingAccountViewModel : BaseMailModel
{

View File

@ -1,4 +1,4 @@
namespace Bit.Core.Models.Mail.FamiliesForEnterprise
namespace Bit.Core.Models.Mail.FamiliesForEnterprise
{
public class FamiliesForEnterpriseOfferNewAccountViewModel : BaseMailModel
{

View File

@ -1,4 +1,4 @@
namespace Bit.Core.Models.Mail.FamiliesForEnterprise
namespace Bit.Core.Models.Mail.FamiliesForEnterprise
{
public class FamiliesForEnterpriseSponsorshipRevertingViewModel : BaseMailModel
{

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
namespace Bit.Core.Models.Mail
{

View File

@ -1,6 +1,6 @@
using System.Collections.Generic;
using Newtonsoft.Json;
using System.Collections.Generic;
using Bit.Core.Utilities;
using Newtonsoft.Json;
namespace Bit.Core.Models.Mail
{

View File

@ -1,4 +1,4 @@
using System;
using System;
namespace Bit.Core.Models.Mail
{

View File

@ -1,4 +1,4 @@
using System;
using System;
namespace Bit.Core.Models.Mail
{

View File

@ -1,6 +1,6 @@
using Bit.Core.Enums;
using System;
using System;
using System.Collections.Generic;
using Bit.Core.Enums;
namespace Bit.Core.Models
{
@ -12,7 +12,7 @@ namespace Bit.Core.Models
Payload = payload;
ContextId = contextId;
}
public PushType Type { get; set; }
public T Payload { get; set; }
public string ContextId { get; set; }

View File

@ -1,4 +1,4 @@
using System;
using System;
using Bit.Core.Enums;
using Bit.Core.Models.Data;

View File

@ -1,8 +1,8 @@
using System;
using Bit.Core.Utilities;
using Bit.Core.Models.Data;
using Newtonsoft.Json;
using System.Collections.Generic;
using Bit.Core.Models.Data;
using Bit.Core.Utilities;
using Newtonsoft.Json;
namespace Bit.Core.Models.Table
{

View File

@ -1,4 +1,4 @@
using System;
using System;
using Bit.Core.Utilities;
namespace Bit.Core.Models.Table

View File

@ -1,4 +1,4 @@
using System;
using System;
using Bit.Core.Utilities;
namespace Bit.Core.Models.Table

View File

@ -25,7 +25,7 @@ namespace Bit.Core.Models.Table
{
Id = CoreHelpers.GenerateComb();
}
public EmergencyAccess ToEmergencyAccess()
{
return new EmergencyAccess

View File

@ -1,6 +1,6 @@
using Bit.Core.Utilities;
using System;
using System;
using System.ComponentModel.DataAnnotations;
using Bit.Core.Utilities;
namespace Bit.Core.Models.Table
{

View File

@ -1,10 +1,10 @@
using System;
using Bit.Core.Utilities;
using Bit.Core.Enums;
using System.Collections.Generic;
using Newtonsoft.Json;
using System.Linq;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using Bit.Core.Enums;
using Bit.Core.Utilities;
using Newtonsoft.Json;
namespace Bit.Core.Models.Table
{

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.ComponentModel.DataAnnotations;
using Bit.Core.Enums;
using Bit.Core.Utilities;

View File

@ -1,7 +1,7 @@
using System;
using Bit.Core.Utilities;
using Bit.Core.Enums;
using System.ComponentModel.DataAnnotations;
using Bit.Core.Enums;
using Bit.Core.Utilities;
namespace Bit.Core.Models.Table
{

View File

@ -1,24 +1,24 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
namespace Bit.Core.Models.Table
{
public class TaxRate: ITableObject<string>
{
[MaxLength(40)]
public string Id { get; set; }
[MaxLength(50)]
public string Country { get; set; }
[MaxLength(2)]
public string State { get; set; }
[MaxLength(10)]
public string PostalCode { get; set; }
public decimal Rate { get; set; }
public bool Active { get; set; }
public class TaxRate : ITableObject<string>
{
[MaxLength(40)]
public string Id { get; set; }
[MaxLength(50)]
public string Country { get; set; }
[MaxLength(2)]
public string State { get; set; }
[MaxLength(10)]
public string PostalCode { get; set; }
public decimal Rate { get; set; }
public bool Active { get; set; }
public void SetNewId()
{
// Id is created by Stripe, should exist before this gets called
return;
}
}
public void SetNewId()
{
// Id is created by Stripe, should exist before this gets called
return;
}
}
}

View File

@ -1,10 +1,10 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Bit.Core.Enums;
using Bit.Core.Utilities;
using System.Collections.Generic;
using Newtonsoft.Json;
using Microsoft.AspNetCore.Identity;
using System.ComponentModel.DataAnnotations;
using Newtonsoft.Json;
namespace Bit.Core.Models.Table
{

View File

@ -1,11 +1,11 @@
using Bit.Core.Enums;
using System;
using System.Collections.Generic;
using System.Security.Cryptography;
using Bit.Core.Enums;
using Fido2NetLib.Objects;
using Microsoft.Extensions.Options;
using Newtonsoft.Json;
using PeterO.Cbor;
using System;
using System.Collections.Generic;
using System.Security.Cryptography;
using U2F.Core.Utils;
namespace Bit.Core.Models