Details
-
Bug
-
Resolution: Won't Fix
-
Minor - P4
-
None
-
1.6
-
None
-
None
-
PowerShell 3.0
Description
This will allow the following PowerShell script to work. Powershell does not handle generic methods of classes lacking a a generic signature, or having a different generic signature than the method.
Add-Type -Path 'MongoDB.Bson.dll'
Add-Type -Path 'MongoDB.Driver.dll'
$cn = [MongoDB.Driver.MongoServer]::Create("mongodb://localhost/MyDb");
$db = $cn['EventLog'];
[MongoDB.Driver.MongoCollection[System.Diagnostics.EventLogEntry]]$events = $db['Events.Simple'];