How can one create an object that when its operators, such as:
operator > (Object obj1, Object obj2)
operator < (Object obj1, Object obj2)
, are overridden PowerShell utilizes these operators?
Such that:
where-object { $CustomObject -gt 12 }
would call:
public static bool operator > (Object object1, Object object2)
Is it possible?
To clarify:
- The object exists within a .NET assembly
- The object has overridden comparision operators
- PowerShell does not seem to honor these operators