/// <summary> /// Returns <c>true</c> if the given statement modifies the given variable. /// </summary> /// <remarks> /// The current implementation is not capable of detecting modifications of variables which are referenced as "out" arguments of some method. /// </remarks> /// <param name="stmt">statement</param> /// <param name="variable">variable</param> public static bool Modifies(this Statement stmt, IStorable variable) { VariableModificationDetector vmd = new VariableModificationDetector(variable); stmt.Accept(vmd); return(vmd.Result); }
/// <summary> /// Returns <c>true</c> if the given statement modifies the given variable. /// </summary> /// <remarks> /// The current implementation is not capable of detecting modifications of variables which are referenced as "out" arguments of some method. /// </remarks> /// <param name="stmt">statement</param> /// <param name="variable">variable</param> public static bool Modifies(this Statement stmt, IStorable variable) { VariableModificationDetector vmd = new VariableModificationDetector(variable); stmt.Accept(vmd); return vmd.Result; }