"In most jurisdictions today, the power to order costs is a discretionary power. Ordinarily, the power is exercised after a hearing on the merits and as a general rule the successful party is entitled to his or her costs. Success in the action or on particular issues is the fact that usually controls the exercise of the discretion. A successful party is prima facie entitled to a costs order. When there has been no hearing on the merits, however, a court is necessarily deprived of the factor that usually determines whether or how it will make a costs order. In an appropriate case, a court will make an order for costs even when there has been no hearing on the merits and the moving party no longer wishes to proceed with the action. The court cannot try a hypothetical action between the parties. To do so would burden the parties with the costs of a litigated action which by settlement or extra-curial action they had avoided. In some cases, however, the court may be able to conclude that one of the parties has acted so unreasonably that the other party should obtain the costs of the action... Moreover, in some cases a judge may feel confident that, although both parties have acted reasonably, one party was almost certain to have succeeded if the matter had been fully tried... But such cases are likely to be rare. If it appears that both parties have acted reasonably in commencing and defending the proceedings and the conduct of the parties continued to be reasonably until the litigation was settled or its further prosecution became futile, the proper exercise of the cost discretion will usually mean that the court will make no order as to the cost of the proceedings. This approach has been adopted in a large number of cases." [citations omitted]