Made progress on implementing some shops.
Performed some folder restructuring as well.
This commit is contained in:
35
Props-Modules/Props.Shop/Ebay/Options/SandboxOption.cs
Normal file
35
Props-Modules/Props.Shop/Ebay/Options/SandboxOption.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using Props.Shop.Framework;
|
||||
|
||||
namespace Props.Shop.Ebay
|
||||
{
|
||||
public class SandboxOption : IOption
|
||||
{
|
||||
private Configuration configuration;
|
||||
public string Name => "Ebay Sandbox";
|
||||
|
||||
public string Description => "For development purposes, Ebay Sandbox allows use of Ebay APIs (with exceptions) in a sandbox environment before applying for production use.";
|
||||
|
||||
public bool Required => true;
|
||||
|
||||
public Type Type => typeof(bool);
|
||||
|
||||
internal SandboxOption(Configuration configuration)
|
||||
{
|
||||
this.configuration = configuration;
|
||||
}
|
||||
|
||||
public string GetValue()
|
||||
{
|
||||
return configuration.Sandbox.ToString();
|
||||
}
|
||||
|
||||
public bool SetValue(string value)
|
||||
{
|
||||
bool sandbox = false;
|
||||
bool res = bool.TryParse(value, out sandbox);
|
||||
configuration.Sandbox = sandbox;
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user