public void InvocationExpressionEquals() { var expressionAction = new ExpressionAction() { Key = "Test", Value = "Test2", ExpressionActionFunc = _expressionActions.GetAddCommentAction("Test") }; var cloned = expressionAction.Clone <ExpressionAction>(); Assert.True(expressionAction.Equals(cloned)); cloned.Value = "DifferentValue"; Assert.False(expressionAction.Equals(cloned)); }
protected WeakActionBase(object target, MethodInfo method) { if (target != null) { _targetReference = new WeakReference(target); } #if SILVERLIGHT _invoker = method.IsPublic == false ? (object)ExpressionAction.CreateInvoker(method, target?.GetType()) : method; #else _invoker = method; #endif }
private static ExpressionAction ReadExpressionAction(FSMXmlReader reader) { ExpressionAction action = new ExpressionAction(); if (reader.CurrentNode.ChildNodes.Count == 0) { action.Expr = reader.ReadExpressionByAttribute("expr", false); } else { action.Expr = reader.ReadExpression(true); } return(action); }