protected override void EmitEffect(Effect effect) { if (effect is CallEffect) { var call = (CallEffect)effect; Writer.AppendLine("this." + call.MethodName + "();"); } else if (effect is SendEffect) { var send = (SendEffect)effect; Writer.AppendLine("this.PostEvent(" + Parameters.EventTypeName + "." + send.Event.Name + ");"); } else { throw new NotImplementedException("effect [" + effect + "] is not supported."); } }
public void AddEffect(Effect effect) { Effects.Add(effect); }
protected virtual void EmitEffect(Effect effect) { }