An action may be maintained by the owner of a junior participating share or interest in a bond or note secured by a mortgage on real, or on real and personal property, for the payment of principal and interest and for foreclosure of such bond or note and mortgage in its entirety, or in the alternative, subject to the interest of the owner of the senior share, notwithstanding that the entire mortgage debt may be due and payable according to its terms, in the event that the owner of the senior share, to whom is given the right in the participating agreement to enforce such bond or note and mortgage shall fail or refuse to commence an action for the enforcement of such bond or note and mortgage in any manner permitted thereby, after ten days' written notice and demand to commence any such action, following default in the performance of any of the terms and covenants of such bond or note and mortgage. Upon such failure or refusal, such junior participant may exercise any and all options and remedies provided in such bond or note and mortgage or otherwise available to any holder thereof.
N.Y. Real Prop. Acts. Law § 1315