header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
PowerShell and Overridden Object Operators
Last Post 08 Jan 2010 11:44 AM by Adam Driscoll. 0 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Not Resolved
Adam DriscollUser is Offline
New Member
New Member
Posts:3
Avatar

--
08 Jan 2010 11:44 AM
    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 comparison operators
    -I am returning the object through a cmdlet
    -PowerShell does not seem to honor these operators
    You are not authorized to post a reply.


    Active Forums 4.3
    right
    footer   footer
    footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
    footer   footer