Suppose I have some relatively complex generic object that could be simplified as
class A<T>
{
static void foo(T x) { }
}
To use foo, one must repeatedly use the class name with the generic.
A<MyLongTypeNameIsNotFunToType>.foo(x);
It would be very nice if it was possible to simplify this:
alias AA = A<MyLongTypeNameIsNotFunToType>;
AA.foo(x);
Only thing I can think of is to create a wrapper class
class B : A<MyLongTypeNameIsNotFunToType> { }
which allows me to access A's static members through B. One problem is that this requires a public constructor, which, in my case, is not possible. Obviously I could wrap A's static members in B but that seems highly redundant.
[I tried using, but note that I need to access the static members so I need the static type. Using doesn't seem to work with static types. error: ___ is a type which isn't valid in the given context]
Any elegant solution?