public void GetOverwrittenOperationByName() { var helper = new OperationHelper(); var operations = new List <IOperation> { new EqualTo() }; helper.LoadOperations(operations, true); var operation = helper.GetOperationByName("EqualTo"); Assert.That(operation.Name, Is.EqualTo("EqualTo")); Assert.That(operation.Active, Is.True); Assert.That(operation.GetType().Namespace, Is.EqualTo("ExpressionBuilder.Test.CustomOperations")); OperationHelper.LoadDefaultOperations(); }
/// <summary> /// Instantiates an IOperation given its name. /// </summary> /// <param name="operationName">Name of the operation to be instantiated.</param> /// <returns></returns> public static IOperation ByName(string operationName) { return(_operationHelper.GetOperationByName(operationName)); }