using System;
using System.Collections.Generic;
using System.Text;
using FormulaEditor.Attributes;
using FormulaEditor.Interfaces;
namespace FormulaEditor
{
[TreeTransformation()]
public class DerivationDetector : IOperationDetector
{
#region Fields
private string detected;
private string der;
#endregion
#region Ctor
public DerivationDetector(string detected, string der)
{
this.detected = detected;
this.der = der;
}
#endregion
#region IOperationDetector Members
IOperationAcceptor IOperationDetector.Detect(MathSymbol s)
{
if (s.String.Equals(detected))
{
return new DerivationTransformation(der);
}
return null;
}
#endregion
}
}