Add function decorator pattern

This commit is contained in:
Иван Ивашкин
2024-10-10 16:11:04 +05:00
parent 72add44fe7
commit b5ed00341c
8 changed files with 200 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
using StructureHelperCommon.Infrastructures.Enums;
using StructureHelperCommon.Infrastructures.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StructureHelperCommon.Models.Functions
{
public class FormulaFunction : IOneVariableFunction
{
public FunctionType Type { get; set; }
public string Name { get; set; }
public bool Check()
{
throw new NotImplementedException();
}
public double GetByX(double xValue)
{
throw new NotImplementedException();
}
}
public class CopyOfFormulaFunction : IOneVariableFunction
{
public FunctionType Type { get; set; }
public string Name { get; set; }
public bool Check()
{
throw new NotImplementedException();
}
public double GetByX(double xValue)
{
throw new NotImplementedException();
}
}
}

View File

@@ -0,0 +1,14 @@
using StructureHelperCommon.Infrastructures.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StructureHelperCommon.Models.Functions
{
public interface ILimitFunction : IFunctionDecorator
{
public void Limit();
}
}

View File

@@ -0,0 +1,14 @@
using StructureHelperCommon.Infrastructures.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StructureHelperCommon.Models.Functions
{
public interface IScaleFunction : IFunctionDecorator
{
public void Scale();
}
}

View File

@@ -0,0 +1,40 @@
using StructureHelperCommon.Infrastructures.Enums;
using StructureHelperCommon.Infrastructures.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StructureHelperCommon.Models.Functions
{
public class TableFunction : IOneVariableFunction
{
public FunctionType Type { get; set; }
public string Name { get; set; }
public bool Check()
{
throw new NotImplementedException();
}
public double GetByX(double xValue)
{
throw new NotImplementedException();
}
}
public class CopyOfTableFunction : IOneVariableFunction
{
public FunctionType Type { get; set; }
public string Name { get; set; }
public bool Check()
{
throw new NotImplementedException();
}
public double GetByX(double xValue)
{
throw new NotImplementedException();
}
}
}