Traditionally you would use StructureMap's ObjectFactory.GetInstance<T>
to resolve your static method's dependencies. However, this has since been deprecated as it's typically frowned on because using it tightly couples your code to the IoC container (see this post on the Service Locator anti-pattern).
The next best approach is to create your own static equivalent of the ObjectFactory that returns an IContainer instance, similar to this:
public static class ObjectFactory
{
private static readonly Lazy<Container> _containerBuilder = new Lazy<Container>(defaultContainer, LazyThreadSafetyMode.ExecutionAndPublication);
public static IContainer Container
{
get { return _containerBuilder.Value; }
}
private static Container defaultContainer()
{
return new Container(x => {
x.AddRegistry(new YourRegistry()) };
});
}
}
See this post for a more in-depth implementation.