App\Email\NewsletterManager:
# the first argument is the class and the second argument is the static method
factory: ['App\Email\NewsletterManagerStaticFactory', 'createNewsletterManager']
class Modification
{
public string link;
public string name;
public string product;
public int size;
public string color;
public string code;
}
class Tvshop
{
public List<Modification> getModification(){
int offset = 0;
ReadJson json = new ReadJson(offset);
var Modification = new List<Modification>();
JObject data = JObject.Parse(json.getResponseModification());
for (int v = 0; v < 10; v++)
{
foreach (JObject item in (JArray)data["rows"])
{
Modification.Add(new Modification
{
// Здесь заменяемая часть кода.
product = item.GetValue("product")["meta"]["href"].ToString(),
link = item.GetValue("meta")["href"].ToString(),
name = item.GetValue("name").ToString(),
color = colors,
size = sizes,
code = bcodes
});
}
json = new ReadJson(offset += 100);
data = JObject.Parse(json.getResponseModification());
}
return Modification;
}
}
class Mamsi
{
public List<Modification> getModification(){
int offset = 0;
ReadJson json = new ReadJson(offset);
var Modification = new List<Modification>();
JObject data = JObject.Parse(json.getResponseModification());
for (int v = 0; v < 10; v++)
{
foreach (JObject item in (JArray)data["rows"])
{
Modification.Add(new Modification
{
// Здесь заменяемая часть кода.
product = item.GetValue("product")["meta"]["href"].ToString(),
link = item.GetValue("meta")["href"].ToString(),
name = item.GetValue("name").ToString(),
});
}
json = new ReadJson(offset += 100);
data = JObject.Parse(json.getResponseModification());
}
return Modification;
}
}
class Counterparty{
public List<Modification> getModification(){
int offset = 0;
ReadJson json = new ReadJson(offset);
var Modification = new List<Modification>();
JObject data = JObject.Parse(json.getResponseModification());
for (int v = 0; v < 10; v++)
{
foreach (JObject item in (JArray)data["rows"])
{
Modification.Add(new Modification
{
// Здесь заменяемая часть кода.
product = item.GetValue("product")["meta"]["href"].ToString(),
link = item.GetValue("meta")["href"].ToString(),
name = item.GetValue("name").ToString(),
});
}
json = new ReadJson(offset += 100);
data = JObject.Parse(json.getResponseModification());
}
return Modification;
}
class CounterpartyMamsi : Counterparty {
}
Modification.Add(new Modification
{
// Здесь заменяемая часть кода.
product = item.GetValue("product")["meta"]["href"].ToString(),
link = item.GetValue("meta")["href"].ToString(),
name = item.GetValue("name").ToString(),
});
class CounterpartyMamsi : Counterparty {
ModififcationAdd(item){
}
}