AB3348 - Clean up unused usings, removed unused method...
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using System.Text;
|
||||
using Umbraco.Core.Composing;
|
||||
using Umbraco.ModelsBuilder.Configuration;
|
||||
|
||||
namespace Umbraco.ModelsBuilder.BackOffice
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Web.Hosting;
|
||||
using Umbraco.Core.Exceptions;
|
||||
using Umbraco.ModelsBuilder.Building;
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Microsoft.CodeAnalysis;
|
||||
using Microsoft.CodeAnalysis.CSharp;
|
||||
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
||||
using Umbraco.Core.Composing;
|
||||
using Umbraco.Core.Configuration;
|
||||
using Umbraco.ModelsBuilder.Configuration;
|
||||
|
||||
namespace Umbraco.ModelsBuilder.Building
|
||||
@@ -71,8 +65,8 @@ namespace Umbraco.ModelsBuilder.Building
|
||||
/// Initializes a new instance of the <see cref="Builder"/> class with a list of models to generate,
|
||||
/// the result of code parsing, and a models namespace.
|
||||
/// </summary>
|
||||
/// <param name="config"></param>
|
||||
/// <param name="typeModels">The list of models to generate.</param>
|
||||
/// <param name="modelsNamespace">The models namespace.</param>
|
||||
protected Builder(IModelsBuilderConfig config, IList<TypeModel> typeModels)
|
||||
{
|
||||
_typeModels = typeModels ?? throw new ArgumentNullException(nameof(typeModels));
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using Umbraco.ModelsBuilder.Configuration;
|
||||
|
||||
namespace Umbraco.ModelsBuilder.Building
|
||||
|
||||
@@ -3,8 +3,6 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Umbraco.Core.Composing;
|
||||
using Umbraco.Core.Configuration;
|
||||
using Umbraco.ModelsBuilder.Configuration;
|
||||
|
||||
namespace Umbraco.ModelsBuilder.Building
|
||||
@@ -18,6 +16,7 @@ namespace Umbraco.ModelsBuilder.Building
|
||||
/// Initializes a new instance of the <see cref="TextBuilder"/> class with a list of models to generate
|
||||
/// and the result of code parsing.
|
||||
/// </summary>
|
||||
/// <param name="config"></param>
|
||||
/// <param name="typeModels">The list of models to generate.</param>
|
||||
public TextBuilder(IModelsBuilderConfig config, IList<TypeModel> typeModels)
|
||||
: base(config, typeModels)
|
||||
|
||||
@@ -4,7 +4,7 @@ using Umbraco.ModelsBuilder.Configuration;
|
||||
namespace Umbraco.ModelsBuilder
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides extension methods for the <see cref="UmbracoConfig"/> class.
|
||||
/// Provides extension methods for the <see cref="Configs"/> class.
|
||||
/// </summary>
|
||||
public static class ConfigsExtensions
|
||||
{
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.Web.Configuration;
|
||||
using System.Web.Hosting;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.IO;
|
||||
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Web;
|
||||
using System.Web.Hosting;
|
||||
using Umbraco.Core.Exceptions;
|
||||
using Umbraco.Core.IO;
|
||||
using Umbraco.Core.Logging;
|
||||
using Umbraco.ModelsBuilder.Building;
|
||||
using Umbraco.ModelsBuilder.Configuration;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using Umbraco.Core.Composing;
|
||||
using Umbraco.ModelsBuilder.Configuration;
|
||||
|
||||
namespace Umbraco.ModelsBuilder
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.IO;
|
||||
using Umbraco.Core.Composing;
|
||||
using Umbraco.ModelsBuilder.Configuration;
|
||||
using Umbraco.Web.Cache;
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using Umbraco.Web.Composing;
|
||||
|
||||
@@ -13,10 +13,8 @@ using System.Web.Compilation;
|
||||
using System.Web.Hosting;
|
||||
using System.Web.WebPages.Razor;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Composing;
|
||||
using Umbraco.Core.Logging;
|
||||
using Umbraco.Core.Models.PublishedContent;
|
||||
using Umbraco.Web.Cache;
|
||||
using Umbraco.ModelsBuilder.Building;
|
||||
using Umbraco.ModelsBuilder.Configuration;
|
||||
using File = System.IO.File;
|
||||
|
||||
@@ -142,26 +142,6 @@ namespace Umbraco.ModelsBuilder
|
||||
|
||||
// ----
|
||||
|
||||
private static IEnumerable<Assembly> GetDeepReferencedAssemblies(Assembly assembly)
|
||||
{
|
||||
var visiting = new Stack<Assembly>();
|
||||
var visited = new HashSet<Assembly>();
|
||||
|
||||
visiting.Push(assembly);
|
||||
visited.Add(assembly);
|
||||
while (visiting.Count > 0)
|
||||
{
|
||||
var visAsm = visiting.Pop();
|
||||
foreach (var refAsm in visAsm.GetReferencedAssemblies()
|
||||
.Select(TryLoad)
|
||||
.Where(x => x != null && visited.Contains(x) == false))
|
||||
{
|
||||
yield return refAsm;
|
||||
visiting.Push(refAsm);
|
||||
visited.Add(refAsm);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static Assembly TryLoad(AssemblyName name)
|
||||
{
|
||||
|
||||
@@ -2,14 +2,12 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Composing;
|
||||
using Umbraco.Core.Exceptions;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.PublishedContent;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Core.Strings;
|
||||
using Umbraco.ModelsBuilder.Building;
|
||||
using Umbraco.ModelsBuilder.Configuration;
|
||||
|
||||
namespace Umbraco.ModelsBuilder
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user