Setting Texture and TextureSampler

So I’m working on my rendering pipeline and I have a few questions about the different ways of sending Textures and TextureSamplers to my effects. I’d like the way I set both the Texture and the Sampler to be “the same” but it seems like that might not be supported.

  1. Currently I set my textures through EffectParameters. I’m now looking at having per-texture samplers. Is there a way to also set the sampler through parameters?
  2. If samplers can’t be set through parameters I’d like to switch to setting my Textures using GraphicsDevice.Textures (to match how I’ll have to set the Textures). Is there a way to get which “index value” in GraphicsDevice.Textures a certain EffectParameter correlates to? (From my understanding, getting the “registry” number of the Texture parameter).
  3. What’s the relation between texture EffectParameters and GraphicsDevice.Textures? Does setting the EffectParameter just populate the correct entry in GraphicsDevice.Textures? If so that probably means I’ll need to do manual setting of GraphicsDevice.Textures after the effect.Apply to make sure it doesn’t get overriden.
  4. Just out of curiosity, are there any gotchas when dealing with GraphicsDevice.Textures and GraphicsDevice.Samplers? When looking through the forums I saw some people having issues/concerns with setting those values to null or clearing them after use, and I wasn’t too sure why anything like that would be an issue.

Thanks!