36 lines
859 B
C#
36 lines
859 B
C#
///
|
|
/// Copyright (c) 2017 Sensus Metering Systems
|
|
///
|
|
using System.Net;
|
|
using log4net;
|
|
using TBF.Rig.GenericDevices;
|
|
|
|
namespace TBF.Rig.Network.RestAPI
|
|
{
|
|
public class RestAPIAdapter : ComponentBase, GenericDevices.IRestAPIAdapter
|
|
{
|
|
private static readonly ILog log = LogManager.GetLogger(typeof(RestAPIAdapter));
|
|
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(-1)); }
|
|
|
|
readonly RestAPIadapterCfg restApIadapterCfg;
|
|
|
|
private string path;
|
|
public string Path { get => path; }
|
|
|
|
|
|
public RestAPIAdapter() { }
|
|
|
|
public RestAPIAdapter(Generic.IComponentCfg cfg)
|
|
: base(cfg)
|
|
{
|
|
restApIadapterCfg = cfg as RestAPIadapterCfg;
|
|
log.Warn(this.ToString());
|
|
}
|
|
|
|
public override void Initialize()
|
|
{
|
|
path = restApIadapterCfg.Path;
|
|
}
|
|
}
|
|
}
|