Created dotnet2.0 Builder Image and Added /v2/specialized Endpoint to dotnet2.0 Envrionment (#1001)
This commit is contained in:
committed by
Ta-Ching Chen
parent
56fa8fe766
commit
4632269314
@@ -0,0 +1,36 @@
|
||||
using Fission.DotNetCore.Model;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Fission.DotNetCore.Utilty
|
||||
{
|
||||
public sealed class ObjectConverter
|
||||
{
|
||||
|
||||
private static readonly Lazy<ObjectConverter> lazy =
|
||||
new Lazy<ObjectConverter>(() => new ObjectConverter());
|
||||
|
||||
public static ObjectConverter Instance { get { return lazy.Value; } }
|
||||
|
||||
private ObjectConverter()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
public EnvironmentSettings GetWatcherSettingsFromJson(string json)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<EnvironmentSettings>(json);
|
||||
}
|
||||
|
||||
public FunctionSpecification GetFunctionSpecificationFromJson(string json)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<FunctionSpecification>(json);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user