A limited partnership is dissolved and its affairs shall be wound up upon the happening of the first to occur of the following:
(1) At the time or upon the happening of events specified in the certificate of limited partnership;
(2) Upon the happening of events specified in writing in the partnership agreement;
(3) The written consent of all partners;
(4) An event of withdrawal of a general partner, unless at the time there is at least one other general partner and the written provisions of the partnership agreement permit the business of the limited partnership to be carried on by the remaining general partner and that partner does so, but the limited partnership is not dissolved and is not required to be wound up by reason of any event of withdrawal if, within ninety days after the withdrawal, all partners agree in writing to continue the business of the limited partnership and to the appointment of one or more additional general partners if necessary or desired;
(5) Entry of a decree of judicial dissolution under section forty-five of this article; or
(6) Signing of a certificate of dissolution by the Secretary of State under section ten-a of this article.