-
Notifications
You must be signed in to change notification settings - Fork 1
Editor on .NET Core. #13
base: master
Are you sure you want to change the base?
Conversation
Here is an overview of what got changed by this pull request: Issues
======
- Added 12
Complexity increasing per file
==============================
- GroupDocs.Editor.MVC/Products/Common/Config/CommonConfiguration.cs 1
- GroupDocs.Editor.MVC/Program.cs 1
- GroupDocs.Editor.MVC/Products/Common/Config/GlobalConfiguration.cs 1
- GroupDocs.Editor.MVC/Products/Common/Config/ApplicationConfiguration.cs 5
- GroupDocs.Editor.MVC/Products/Editor/Config/EditorConfiguration.cs 4
- GroupDocs.Editor.MVC/Products/Common/Entity/Web/FileDescriptionEntity.cs 1
- GroupDocs.Editor.MVC/Products/Common/Util/Parser/YamlParser.cs 2
- GroupDocs.Editor.MVC/Products/Common/Config/ServerConfiguration.cs 1
- GroupDocs.Editor.MVC/Startup.cs 2
- GroupDocs.Editor.MVC/Controllers/EditorController.cs 1
- GroupDocs.Editor.MVC/AppDomainGenerator/DomainGenerator.cs 1
- GroupDocs.Editor.MVC/Products/Editor/Controllers/EditorApiController.cs 19
Clones added
============
- GroupDocs.Editor.MVC/Products/Common/Config/ApplicationConfiguration.cs 1
- GroupDocs.Editor.MVC/Products/Editor/Config/EditorConfiguration.cs 1
See the complete overview on Codacy |
} | ||
|
||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. | ||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue found: Make 'Configure' a static method.
|
||
namespace GroupDocs.Editor.MVC | ||
{ | ||
public class Program |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -10,7 +10,8 @@ namespace GroupDocs.Editor.MVC.Products.Common.Util.Parser | |||
{ | |||
public class YamlParser | |||
{ | |||
private static string YamlPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "configuration.yml"); | |||
private static string appRoot = AppContext.BaseDirectory.Substring(0, AppContext.BaseDirectory.LastIndexOf("bin")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return format; | ||
} | ||
|
||
private dynamic GetSaveOptions(string saveFilePath) | ||
private ILoadOptions GetLoadOptions(string guid) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue found: Make 'GetLoadOptions' a static method.
string license = valuesGetter.GetStringPropertyValue("licensePath"); | ||
if (String.IsNullOrEmpty(license)) | ||
string licPath = valuesGetter.GetStringPropertyValue("licensePath"); | ||
var appRoot = AppContext.BaseDirectory.Substring(0, AppContext.BaseDirectory.LastIndexOf("bin")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ | ||
Mock<IConfigurationSection> mockServerConfSection; | ||
Mock<IConfigurationSection> mockCommonConfSection; | ||
Mock<IConfiguration> mockConfig; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public IConfiguration Configuration { get; } | ||
|
||
// This method gets called by the runtime. Use this method to add services to the container. | ||
public void ConfigureServices(IServiceCollection services) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue found: Make 'ConfigureServices' a static method.
@@ -37,7 +38,9 @@ public EditorConfiguration() | |||
filesDirectory = valuesGetter.GetStringPropertyValue("filesDirectory", filesDirectory); | |||
if (!IsFullPath(filesDirectory)) | |||
{ | |||
filesDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, filesDirectory); | |||
// TODO: check for more cross-platform solution | |||
var appRoot = AppContext.BaseDirectory.Substring(0, AppContext.BaseDirectory.LastIndexOf("bin")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
public class EditorControllerTest | ||
{ | ||
Mock<IConfigurationSection> mockServerConfSection; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public class EditorControllerTest | ||
{ | ||
Mock<IConfigurationSection> mockServerConfSection; | ||
Mock<IConfigurationSection> mockCommonConfSection; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return options; | ||
} | ||
|
||
private ISaveOptions GetSaveOptions(string saveFilePath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue found: Make 'GetSaveOptions' a static method.
return options; | ||
} | ||
|
||
private static List<string> PrepareFormats() | ||
private IEditOptions GetEditOptions(string guid) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue found: Make 'GetEditOptions' a static method.
Please, do not merge this PR yet.
Problem:
We would like to have implementation for the Editor app on .NET Core.
Solution:
Screenshots:
Take a look
How it works on Ubuntu right after re-clone and click RUN in VS Code: