I have the C# class
class ConfigurationPropertyBag : IPropertyBag
{
internal HybridDictionary properties;
internal ConfigurationPropertyBag()
{
properties = new HybridDictionary();
}
public void Read(string propName, out object ptrVar, int errLog)
{
ptrVar = properties[propName];
}
public void Write(string propName, ref object ptrVar)
{
properties.Add(propName, ptrVar);
}
}
which implements the interface IPropertyBag. I want to write this class in PowerShell but I don't know how to define the out object ptrVar
in function Read.
class ConfigurationPropertyBag : Microsoft.BizTalk.SSOClient.Interop.IPropertyBag
{
[System.Collections.Specialized.HybridDictionary] $properties;
ConfigurationPropertyBag()
{
$this.properties = new-object System.Collections.Specialized.HybridDictionary
}
[void] Read([string]$propName, [out]$ptrVar, [int]$errLog)
{
$ptrVar = $this.properties[$propName];
}
[void] Write([string]$propName, [ref]$ptrVar)
{
$this.properties.Add($propName, $ptrVar);
}
}
the [out]$ptrVar
returns error. Any ideas?