The research presented in this work is motivated by recent papers by Brigo, Capponi, and Pallavicini [Math. Finance, 24 (2014), pp. 125--46], Brigo et al. [Collateral Margining in Arbitrage-Free Counterparty Valuation Adjustment Including Re-hypothecation and Netting, preprint, arXiv:1101.3926, 2011], Burgard and Kjaer [Partial Differential Equation Representations of Options with Bilateral Counterparty Risk and Funding Costs, Working paper, 2009; J. Credit Risk, 7 (2011), pp. 1--19; Risk, December (2013), pp. 82--87], Crépey [Math. Finance, 25 (2015), pp. 1--22; Math. Finance, 25 (2015), pp. 23--50], Fujii and Takahashi [Quant. Finance, 13 (2013), pp. 749--768], Piterbarg [RISK, 24 (2012), pp. 97--102], and Pallavicini, Perini, and Brigo [Funding, Collateral and Hedging: Uncovering the Mechanics and the Subtleties of Funding Valuation Adjustments, preprint, arXiv:1210.3811, 2012]. Our goal is to provide a sound theoretical underpinning for some results presented in these papers by developing a unified fr...