-
Type:
Bug
-
Resolution: Won't Fix
-
Priority:
Minor - P4
-
None
-
Affects Version/s: 1.6
-
Component/s: None
-
None
-
Environment:PowerShell 3.0
-
None
-
None
-
None
-
None
-
None
-
None
-
None
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'];