  We apply supersymmetric localization to N=(2,2) gauged linear sigma models on
a hemisphere, with boundary conditions, i.e., D-branes, preserving B-type
supersymmetries. We explain how to compute the hemisphere partition function
for each object in the derived category of equivariant coherent sheaves, and
argue that it depends only on its K theory class. The hemisphere partition
function computes exactly the central charge of the D-brane, completing the
well-known formula obtained by an anomaly inflow argument. We also formulate
supersymmetric domain walls as D-branes in the product of two theories. In
particular 4d line operators bound to a surface operator, corresponding via the
AGT relation to certain defects in Toda CFT's, are constructed as domain walls.
Moreover we exhibit domain walls that realize the sl(2) affine Hecke algebra.
