Created dotnet2.0 Builder Image and Added /v2/specialized Endpoint to dotnet2.0 Envrionment (#1001)

This commit is contained in:
Paras Patidar
2019-05-15 16:35:55 +08:00
committed by Ta-Ching Chen
parent 56fa8fe766
commit 4632269314
35 changed files with 1973 additions and 5 deletions
@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
namespace Fission.DotNetCore.Utilty
{
public static class EnvironmentExtension
{
public static IEnumerable<TSource> DistinctBy<TSource, TKey>(
this IEnumerable<TSource> source,
Func<TSource, TKey> keySelector)
{
var knownKeys = new HashSet<TKey>();
return source.Where(element => knownKeys.Add(keySelector(element)));
}
public static string GetrelevantPathAsPerOS(this string curruntPath)
{
if (EnvironmentHelper.Instance.environmentSettings.RunningOnwindows && curruntPath.Contains("\\"))
{
return curruntPath;
}
else
{
return curruntPath.Replace("\\", "/");
}
}
}
}