mirror of
https://github.com/mxpv/podsync.git
synced 2024-05-11 05:55:04 +00:00
Remove Shared folder
This commit is contained in:
@@ -15,14 +15,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Podsync", "src\Podsync\Pods
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{D94416F2-31EA-4D38-A3D0-BB74180687D4}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared", "Shared", "{35F181BF-B2AD-42AB-BB11-DC66D57E6514}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
src\Shared\EnumerableExtensions.cs = src\Shared\EnumerableExtensions.cs
|
||||
src\Shared\ListExtensions.cs = src\Shared\ListExtensions.cs
|
||||
src\Shared\ServiceProviderExtensions.cs = src\Shared\ServiceProviderExtensions.cs
|
||||
src\Shared\StringExtensions.cs = src\Shared\StringExtensions.cs
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Podsync.Tests", "test\Podsync.Tests\Podsync.Tests.csproj", "{81ABAF5F-4CB6-42A6-8EAA-19EB9BAF66AA}"
|
||||
EndProject
|
||||
Global
|
||||
@@ -65,7 +57,6 @@ Global
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{C9283472-E95E-4517-AE3B-3E276B9851E4} = {3EF2294C-C807-46F3-B3F4-98B7F30688D0}
|
||||
{35F181BF-B2AD-42AB-BB11-DC66D57E6514} = {3EF2294C-C807-46F3-B3F4-98B7F30688D0}
|
||||
{81ABAF5F-4CB6-42A6-8EAA-19EB9BAF66AA} = {D94416F2-31EA-4D38-A3D0-BB74180687D4}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
@@ -11,7 +11,6 @@ using Podsync.Services.Links;
|
||||
using Podsync.Services.Rss;
|
||||
using Podsync.Services.Rss.Contracts;
|
||||
using Podsync.Services.Storage;
|
||||
using Shared;
|
||||
|
||||
namespace Podsync.Controllers
|
||||
{
|
||||
|
@@ -2,7 +2,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Shared
|
||||
namespace Podsync.Helpers
|
||||
{
|
||||
internal static class EnumerableExtensions
|
||||
{
|
@@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Reflection;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace Shared
|
||||
namespace Podsync.Helpers
|
||||
{
|
||||
internal static class ServiceProviderExtensions
|
||||
{
|
@@ -5,9 +5,9 @@ using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Podsync.Helpers;
|
||||
using Podsync.Services.Links;
|
||||
using Podsync.Services.Storage;
|
||||
using Shared;
|
||||
|
||||
namespace Podsync.Services.Rss.Builders
|
||||
{
|
||||
@@ -29,10 +29,7 @@ namespace Podsync.Services.Rss.Builders
|
||||
_builders = new ReadOnlyDictionary<Provider, IRssBuilder>(builders);
|
||||
}
|
||||
|
||||
public override Provider Provider
|
||||
{
|
||||
get { throw new NotSupportedException(); }
|
||||
}
|
||||
public override Provider Provider => throw new NotSupportedException();
|
||||
|
||||
public override Task<Contracts.Feed> Query(FeedMetadata feed)
|
||||
{
|
||||
|
@@ -2,7 +2,7 @@
|
||||
using System.Xml;
|
||||
using System.Xml.Schema;
|
||||
using System.Xml.Serialization;
|
||||
using Shared;
|
||||
using Podsync.Helpers;
|
||||
|
||||
namespace Podsync.Services.Rss.Contracts
|
||||
{
|
||||
|
@@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Xml;
|
||||
using System.Xml.Schema;
|
||||
using System.Xml.Serialization;
|
||||
using Shared;
|
||||
using Podsync.Helpers;
|
||||
|
||||
namespace Podsync.Services.Rss.Contracts
|
||||
{
|
||||
|
@@ -7,8 +7,8 @@ using Google.Apis.Services;
|
||||
using Google.Apis.YouTube.v3;
|
||||
using Google.Apis.YouTube.v3.Data;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Podsync.Helpers;
|
||||
using Podsync.Services.Links;
|
||||
using Shared;
|
||||
|
||||
namespace Podsync.Services.Videos.YouTube
|
||||
{
|
||||
|
@@ -1,20 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Shared
|
||||
{
|
||||
internal static class ListExtensions
|
||||
{
|
||||
public static void AddRange<T>(this IList<T> source, T[] elements)
|
||||
{
|
||||
if (source == null || elements == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (var element in elements)
|
||||
{
|
||||
source.Add(element);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,60 +0,0 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace Shared
|
||||
{
|
||||
internal static class StringExtensions
|
||||
{
|
||||
public static string TrimEnd(this string value, string word)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(value) || string.IsNullOrWhiteSpace(word) || !value.EndsWith(word, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return value;
|
||||
}
|
||||
|
||||
return value.Substring(0, value.Length - word.Length);
|
||||
}
|
||||
|
||||
public static string TrimStart(this string value, string word, StringComparison comparison = StringComparison.Ordinal)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(value))
|
||||
{
|
||||
return value;
|
||||
}
|
||||
|
||||
string result = value;
|
||||
while (result.StartsWith(word, comparison))
|
||||
{
|
||||
result = result.Substring(word.Length);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static string RemoveChars(this string value, char[] list)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(value))
|
||||
{
|
||||
return value;
|
||||
}
|
||||
|
||||
return string.Concat(value.Split(list, StringSplitOptions.RemoveEmptyEntries));
|
||||
}
|
||||
|
||||
public static string FirstCharToUpperInvariant(this string value)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(value))
|
||||
{
|
||||
return value;
|
||||
}
|
||||
|
||||
var first = value.First();
|
||||
if (char.IsUpper(first))
|
||||
{
|
||||
return value;
|
||||
}
|
||||
|
||||
return first.ToString().ToUpperInvariant() + value.Substring(1);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user