This repository has been archived by the owner on Mar 9, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Adds a blog factory and uses polymorphism to control between the different kind of blogs in the ManagerController class. - Improves downloader detection. - Runs the blog addition on one task of the threadpool (Task.Run) to mitigate ui lag during the blog addition using the Clipboard Manager. - Defaults to .NET Framework version 4.6 as it should be available for all supported windows versions (Windows Vista and above).
- Loading branch information
1 parent
f5abb5b
commit c0ef034
Showing
16 changed files
with
133 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,16 @@ | ||
<?xml | ||
version="1.0"?> | ||
<?xml version="1.0"?> | ||
<configuration> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/> | ||
</startup> | ||
|
||
<runtime> | ||
<loadFromRemoteSources enabled="true" /> | ||
<ThrowUnobservedTaskExceptions enabled="true" /> | ||
<loadFromRemoteSources enabled="true"/> | ||
<ThrowUnobservedTaskExceptions enabled="true"/> | ||
</runtime> | ||
<!--<system.net> | ||
<connectionManagement> | ||
<add address="*" maxconnection="400"/> | ||
</connectionManagement> | ||
</system.net>--> | ||
</configuration> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 10 additions & 14 deletions
24
src/TumblThree/TumblThree.Applications/Properties/Settings.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
<?xml | ||
version="1.0"?> | ||
<?xml version="1.0"?> | ||
<configuration> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/> | ||
</startup> | ||
|
||
<runtime> | ||
<loadFromRemoteSources enabled="true" /> | ||
<ThrowUnobservedTaskExceptions enabled="true" /> | ||
<loadFromRemoteSources enabled="true"/> | ||
<ThrowUnobservedTaskExceptions enabled="true"/> | ||
</runtime> | ||
</configuration> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
using System.ComponentModel.Composition; | ||
|
||
namespace TumblThree.Domain.Models | ||
{ | ||
[Export(typeof(IBlogFactory))] | ||
public class BlogFactory : IBlogFactory | ||
{ | ||
[ImportingConstructor] | ||
internal BlogFactory() | ||
{ | ||
} | ||
|
||
public IBlog GetBlog(string blogUrl, string path) | ||
{ | ||
if (Validator.IsValidTumblrUrl(blogUrl)) | ||
return new Blog(blogUrl, path, BlogTypes.tumblr); | ||
if (Validator.IsValidTumblrLikedByUrl(blogUrl)) | ||
return new Blog(blogUrl, path, BlogTypes.tlb); | ||
//if (Validator.IsValidTumblrSearchUrl(blogUrl)) | ||
// return new Blog(blogUrl, path, BlogTypes.ts); | ||
throw new ArgumentException("Website is not supported!", nameof(blogUrl)); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace TumblThree.Domain.Models | ||
{ | ||
public interface IBlogFactory | ||
{ | ||
IBlog GetBlog(string blogUrl, string path); | ||
} | ||
} |
45 changes: 18 additions & 27 deletions
45
src/TumblThree/TumblThree.Domain/Properties/Resources.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.