I found that putting constraints on methods to be more flexible.
If you put it in the class, it means all operation on that type will have the dependencies.
It really depends of the case, I'm not saying your approach is wrong but it's something to keep in mind.
I often had to move such constraints, think well before putting them ;-)