Skip to content

Commit

Permalink
Reformatting (thanks Rider)
Browse files Browse the repository at this point in the history
  • Loading branch information
Webreaper committed Sep 15, 2022
1 parent 3aa4e6a commit 242f95c
Show file tree
Hide file tree
Showing 417 changed files with 184,892 additions and 127,658 deletions.
Binary file modified .DS_Store
Binary file not shown.
78 changes: 78 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
[*]
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = false
insert_final_newline = false
indent_style = space
indent_size = 4

# Microsoft .NET properties
csharp_new_line_before_members_in_object_initializers = false
csharp_preferred_modifier_order = public, private, protected, internal, new, static, abstract, virtual, sealed, readonly, override, extern, unsafe, volatile, async, required:suggestion
csharp_space_after_keywords_in_control_flow_statements = false
csharp_space_between_parentheses = control_flow_statements
csharp_style_var_elsewhere = true:suggestion
csharp_style_var_for_built_in_types = true:suggestion
csharp_style_var_when_type_is_apparent = true:suggestion
dotnet_naming_rule.event_rule.import_to_resharper = as_predefined
dotnet_naming_rule.event_rule.severity = warning
dotnet_naming_rule.event_rule.style = on_upper_camel_case_style
dotnet_naming_rule.event_rule.symbols = event_symbols
dotnet_naming_rule.unity_serialized_field_rule.import_to_resharper = True
dotnet_naming_rule.unity_serialized_field_rule.resharper_description = Unity serialized field
dotnet_naming_rule.unity_serialized_field_rule.resharper_guid = 5f0fdb63-c892-4d2c-9324-15c80b22a7ef
dotnet_naming_rule.unity_serialized_field_rule.severity = warning
dotnet_naming_rule.unity_serialized_field_rule.style = lower_camel_case_style
dotnet_naming_rule.unity_serialized_field_rule.symbols = unity_serialized_field_symbols
dotnet_naming_style.lower_camel_case_style.capitalization = camel_case
dotnet_naming_style.on_upper_camel_case_style.capitalization = pascal_case
dotnet_naming_style.on_upper_camel_case_style.required_prefix = On
dotnet_naming_symbols.event_symbols.applicable_accessibilities = *
dotnet_naming_symbols.event_symbols.applicable_kinds = event
dotnet_naming_symbols.unity_serialized_field_symbols.applicable_accessibilities = *
dotnet_naming_symbols.unity_serialized_field_symbols.applicable_kinds =
dotnet_naming_symbols.unity_serialized_field_symbols.resharper_applicable_kinds = unity_serialised_field
dotnet_naming_symbols.unity_serialized_field_symbols.resharper_required_modifiers = instance
dotnet_style_parentheses_in_arithmetic_binary_operators = never_if_unnecessary:none
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:none
dotnet_style_parentheses_in_relational_binary_operators = never_if_unnecessary:none
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
dotnet_style_predefined_type_for_member_access = true:suggestion
dotnet_style_qualification_for_event = false:suggestion
dotnet_style_qualification_for_field = false:suggestion
dotnet_style_qualification_for_method = false:suggestion
dotnet_style_qualification_for_property = false:suggestion
dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion

# ReSharper properties
resharper_autodetect_indent_settings = true
resharper_csharp_extra_spaces = leave_all
resharper_space_within_default_parentheses = true
resharper_space_within_new_parentheses = true
resharper_space_within_sizeof_parentheses = true
resharper_space_within_typeof_parentheses = true
resharper_use_indent_from_vs = false

# ReSharper inspection severities
resharper_arrange_redundant_parentheses_highlighting = hint
resharper_arrange_this_qualifier_highlighting = hint
resharper_arrange_type_member_modifiers_highlighting = hint
resharper_arrange_type_modifiers_highlighting = hint
resharper_built_in_type_reference_style_for_member_access_highlighting = hint
resharper_built_in_type_reference_style_highlighting = hint
resharper_redundant_base_qualifier_highlighting = warning
resharper_suggest_var_or_type_built_in_types_highlighting = hint
resharper_suggest_var_or_type_elsewhere_highlighting = hint
resharper_suggest_var_or_type_simple_types_highlighting = hint
resharper_web_config_module_not_resolved_highlighting = warning
resharper_web_config_type_not_resolved_highlighting = warning
resharper_web_config_wrong_module_highlighting = warning

[{*.har,*.inputactions,*.jsb2,*.jsb3,*.json,.babelrc,.eslintrc,.stylelintrc,bowerrc,jest.config}]
indent_style = space
indent_size = 2

[*.{appxmanifest,asax,ascx,aspx,axaml,build,c,c++,cc,cginc,compute,cp,cpp,cs,cshtml,cu,cuh,cxx,dtd,fs,fsi,fsscript,fsx,fx,fxh,h,hh,hlsl,hlsli,hlslinc,hpp,hxx,inc,inl,ino,ipp,master,ml,mli,mpp,mq4,mq5,mqh,nuspec,paml,razor,resw,resx,shader,skin,tpp,usf,ush,vb,xaml,xamlx,xoml,xsd}]
indent_style = space
indent_size = 4
tab_width = 4
5 changes: 2 additions & 3 deletions Damselfly.Core.Constants/AzureDetectionType.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
using System;
namespace Damselfly.Core.Constants;
namespace Damselfly.Core.Constants;

public enum AzureDetection
{
Disabled = 0,
AllImages = 1,
ImagesWithFaces = 2
}
}
8 changes: 3 additions & 5 deletions Damselfly.Core.Constants/BasketChangeType.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
using System;
namespace Damselfly.Core.Constants;

namespace Damselfly.Core.Constants;

public enum BasketChangeType
{
ImagesAdded = 1,
ImagesRemoved = 2,
BasketCreated = 3,
BasketDeleted = 4,
BasketChanged = 5
}

}
7 changes: 3 additions & 4 deletions Damselfly.Core.Constants/ConfigSettings.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

namespace Damselfly.Core.Constants;

namespace Damselfly.Core.Constants;

public class ConfigSettings
{
public const bool DefaultEnableRolesAndAuth = true;
Expand Down Expand Up @@ -53,4 +52,4 @@ public class ConfigSettings

public const string SendGridFromAddress = "SendGridFromAddress";
public const string SendGridKey = "SendGridKey";
}
}
10 changes: 5 additions & 5 deletions Damselfly.Core.Constants/Damselfly.Core.Constants.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
9 changes: 3 additions & 6 deletions Damselfly.Core.Constants/EmptyClass.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
using System;
namespace Damselfly.Core.Constants;

namespace Damselfly.Core.Constants;

public class PolicyDefinitions
{
public const string s_IsEditor = "IsEditor";
public const string s_IsDownloader = "IsDownloader";
public const string s_IsAdmin = "IsAdmin";
public const string s_IsLoggedIn = "IsLoggedIn";
}


}
37 changes: 17 additions & 20 deletions Damselfly.Core.Constants/ExportTypes.cs
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
using System;
namespace Damselfly.Core.Constants
{
public enum ExportType
{
Download = 1,
Email = 2,
Wordpress = 3,
Facebook = 4,
Twitter = 5,
Instagram = 6,
};
namespace Damselfly.Core.Constants;

public enum ExportSize
{
FullRes = 1,
Large = 2,
Medium = 3,
Small = 4,
ExtraLarge = 5
};
public enum ExportType
{
Download = 1,
Email = 2,
Wordpress = 3,
Facebook = 4,
Twitter = 5,
Instagram = 6
}

public enum ExportSize
{
FullRes = 1,
Large = 2,
Medium = 3,
Small = 4,
ExtraLarge = 5
}
6 changes: 2 additions & 4 deletions Damselfly.Core.Constants/JobStatus.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
namespace Damselfly.Core.Constants;
namespace Damselfly.Core.Constants;

public enum JobStatus
{
Expand All @@ -10,10 +9,9 @@ public enum JobStatus
Error
}


public class ServiceStatus
{
public string StatusText { get; set; } = "Initialising";
public JobStatus Status { get; set; } = JobStatus.Idle;
public int CPULevel { get; set; }
};
}
8 changes: 3 additions & 5 deletions Damselfly.Core.Constants/LoggingLevel.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
using System;
namespace Damselfly.Core.Constants;

namespace Damselfly.Core.Constants;

public enum LoggingLevel
{
Information,
Verbose,
Debug
}

}
3 changes: 1 addition & 2 deletions Damselfly.Core.Constants/NavigationContexts.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
namespace Damselfly.Core.Constants;
namespace Damselfly.Core.Constants;

public enum NavigationContexts
{
Expand Down
5 changes: 2 additions & 3 deletions Damselfly.Core.Constants/NotificationTypes.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
using System;
namespace Damselfly.Core.Constants;
namespace Damselfly.Core.Constants;

/// <summary>
/// Types of Server-to-Client notifications
/// Types of Server-to-Client notifications
/// </summary>
public enum NotificationType
{
Expand Down
7 changes: 3 additions & 4 deletions Damselfly.Core.Constants/RescanTypes.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
namespace Damselfly.Core.Constants;

[Flags]
namespace Damselfly.Core.Constants;

[Flags]
public enum RescanTypes
{
None = 0,
Expand Down
14 changes: 5 additions & 9 deletions Damselfly.Core.Constants/SearchTypes.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
using System;
namespace Damselfly.Core.Constants;

namespace Damselfly.Core.Constants;

public enum SortOrderType
{
Ascending,
Descending
};
}

public enum GroupingType
{
None,
Folder,
Date
};
}

public enum FaceSearchType
{
Expand All @@ -28,7 +27,4 @@ public enum OrientationType
Portrait,
Panorama,
Square
}



}
25 changes: 11 additions & 14 deletions Damselfly.Core.Constants/ThumbSize.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
using System;
namespace Damselfly.Core.Constants
{
public enum ThumbSize
{
Unknown = -1,
ExtraLarge = 0,
Large = 1,
Big = 2,
Medium = 3,
Preview = 4,
Small = 5
};
}
namespace Damselfly.Core.Constants;

public enum ThumbSize
{
Unknown = -1,
ExtraLarge = 0,
Large = 1,
Big = 2,
Medium = 3,
Preview = 4,
Small = 5
}
27 changes: 12 additions & 15 deletions Damselfly.Core.DbModels/Authentication/AppIdentityUser.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
using Microsoft.AspNetCore.Identity;
using System.Collections.Generic;
using Damselfly.Core.Interfaces;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;
using System;
using Microsoft.AspNetCore.Identity;

namespace Damselfly.Core.DbModels.Authentication
{
public partial class AppIdentityUser : IdentityUser<int>, IDamselflyUser
{
public ICollection<ApplicationUserRole> UserRoles { get; set; }
}
namespace Damselfly.Core.DbModels.Authentication;

public partial class ApplicationUserRole : IdentityUserRole<int>
{
public virtual AppIdentityUser User { get; set; }
public virtual ApplicationRole Role { get; set; }
}
public class AppIdentityUser : IdentityUser<int>, IDamselflyUser
{
public ICollection<ApplicationUserRole> UserRoles { get; set; }
}

public class ApplicationUserRole : IdentityUserRole<int>
{
public virtual AppIdentityUser User { get; set; }
public virtual ApplicationRole Role { get; set; }
}
13 changes: 4 additions & 9 deletions Damselfly.Core.DbModels/Authentication/ApplicationRole.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
using System;
using System.Collections.Generic;
using Microsoft.AspNetCore.Identity;
using System.Collections.Generic;
using System.Xml.Linq;
using Microsoft.EntityFrameworkCore;

namespace Damselfly.Core.DbModels.Authentication;


public partial class ApplicationRole : IdentityRole<int>
public class ApplicationRole : IdentityRole<int>
{
public ApplicationRole() : base()
public ApplicationRole()
{

}

public ApplicationRole(string roleName)
Expand All @@ -21,4 +16,4 @@ public ApplicationRole(string roleName)

public ICollection<AppIdentityUser> AspNetUsers { get; set; }
public ICollection<ApplicationUserRole> UserRoles { get; set; }
}
}
Loading

0 comments on commit 242f95c

Please sign in to comment.