Skip to content

Commit 7407848

Browse files
Finish Refactor, Make Configurable Controller Pipeline, and Make ParseClients Dependency-Injectable (#329)
* Organize file structure and add Parse.Core project for future use. * Organize file structure further, and extract certain configuration items into core dependency injection container. * Make sure that temporary cache is cleared when the host application is closed. * Undo simplification of IParseCorePlugins and implementation in order to allow tests to pass, and apply minor refactorings. * Move IParseCorePlugins and implementation to management-related namespaces until it is converted into a generalized DI container or one is made. * Introduce new ServiceHub-based infrastructure elements and use them instead of the old plugins system, then make the main library compile. Also, restructure metadata injection, and inject revocable session token information as well as all server connection data, as opposed to having any of it statically defined or stored in the ParseClient class. * Complete refactored usage of dependency injection via merged plugin container interface IServiceHub, and rewrite tests to account for the change. * Fix all bugs according to tests. * Added theoretical support for concurrent users. * Change main project folder and namespace structure again, and clean up residual and/or unneeded files and systems. * Add late initialized IMutableServiceHub implementation, use IServiceHub implementation instance passed to ParseClient constructor as BuildHub call target if the implementation also implements IMutableServiceHub, make sure IMutableServiceHub-implementing IServiceHub implementations passed to ParseClient constructor are passed the given IServerConnectionData implementation instance if they have null ServerConnectionData properties, allow values to be set in LateInitializer, change LateInitializer to be an internal class, add tests for LateInitializer, rename Parse.Test to Parse.Tests, update appveyor build script to reflect Parse.Test rename and Visual Studio target version bump, add various syntax adjustments to make code more idiomatic, remove ParsePushModule.cs, and fix a race condition in ParseCommandRunner.cs. * Update README.md, add and document SignUpAsync IServiceHub extension method, and update documentation of non-cloning ParseClient constructors and LogInAsync IServiceHub extension method. * Rename IStorageController and related items to derivative names of ICacheController, add IDiskFileCacheController, rename ICacheLocationConfiguration and related items to derivative names of IRelativeCacheLocationGenerator, rename various items within renamed IStorageController, allow IDiskFileCacheController to regenerate tracked file wrappers and memory cache when requested storage paths change, make CacheController not auto-create files until needed, rename CacheLocationMutator to RelativeCacheLocationMutato, make AbsoluteCachePathMutator for changing the absolute cache path from a file in subfolder of LocalApplicationData or equivalent on other platforms, document various items, rename ParseClient.Configuration to ServerConnectionData and remove it to use IServiceHub-inherited member, rename IStorageDictionary to IDataCache, rename VirtualStorageDictionary to FileBackedCache, remove Parse.Abstractions.Storage and Parse.Abstractions.Internal namespaces, and update README.md to reflect changes. * Rename ConcurrentUserStorageController to VirtualCacheController, and VirtualStorageDictionary to VirtualDataStore. * Update exception messages, rename ConcurrentUserStorageController to TransientCacheController, and rename VirtualDataStore to VirtualCache. * Update README.md. * Update SignUpAsync IServiceHub extension method logic, and make ParseObject.Services publicly settable. Co-authored-by: Tobias <TobiasPott@users.noreply.github.com>
1 parent daafde9 commit 7407848

File tree

266 files changed

+12511
-13548
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

266 files changed

+12511
-13548
lines changed

.appveyor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
version: '2.0.0-develop-{build}'
2-
image: Visual Studio 2017
2+
image: Visual Studio 2019
33
before_build:
44
- nuget restore Parse.sln
55
build_script:
@@ -9,7 +9,7 @@ before_test:
99
- choco install opencover.portable
1010
- choco install codecov
1111
test_script:
12-
- OpenCover.Console.exe -target:dotnet.exe -targetargs:"test --test-adapter-path:. --logger:Appveyor /p:DebugType=full .\Parse.Test\Parse.Test.csproj" -filter:"+[Parse*]* -[Parse.Test*]*" -oldstyle -output:parse_sdk_dotnet_coverage.xml -register:user
12+
- OpenCover.Console.exe -target:dotnet.exe -targetargs:"test --test-adapter-path:. --logger:Appveyor /p:DebugType=full .\Parse.Tests\Parse.Tests.csproj" -filter:"+[Parse*]* -[Parse.Tests*]*" -oldstyle -output:parse_sdk_dotnet_coverage.xml -register:user
1313
after_test:
1414
- codecov -f "parse_sdk_dotnet_coverage.xml"
1515
artifacts:

.editorconfig

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,16 @@ csharp_space_between_method_call_parameter_list_parentheses = false
8181
csharp_space_between_parentheses = false
8282

8383
csharp_preserve_single_line_statements = false
84-
csharp_preserve_single_line_blocks = true
84+
csharp_preserve_single_line_blocks = true
85+
86+
# CC0005: Empty Object Initializer
87+
dotnet_diagnostic.CC0005.severity = none
88+
89+
# CC0105: You should use 'var' whenever possible.
90+
dotnet_diagnostic.CC0105.severity = none
91+
92+
# CC0001: You should use 'var' whenever possible.
93+
dotnet_diagnostic.CC0001.severity = none
94+
95+
# CC0057: Unused parameters
96+
dotnet_diagnostic.CC0057.severity = none

Parse.Test/AnalyticsTests.cs

Lines changed: 0 additions & 98 deletions
This file was deleted.

Parse.Test/CloudControllerTests.cs

Lines changed: 0 additions & 73 deletions
This file was deleted.

Parse.Test/CloudTests.cs

Lines changed: 0 additions & 42 deletions
This file was deleted.

Parse.Test/CommandTests.cs

Lines changed: 0 additions & 136 deletions
This file was deleted.

0 commit comments

Comments
 (0)