public Property[] GetProperties()
{
UIntPtr numProperties = alljoyn_interfacedescription_getproperties(_interfaceDescription,
IntPtr.Zero, (UIntPtr)0);
_Property[] props = new _Property[(int)numProperties];
GCHandle gch = GCHandle.Alloc(props, GCHandleType.Pinned);
UIntPtr numFilledProperties = alljoyn_interfacedescription_getproperties(_interfaceDescription,
gch.AddrOfPinnedObject(), numProperties);
if(numProperties != numFilledProperties)
{
// Warn?
}
Property[] ret = new Property[(int)numFilledProperties];
for(int i = 0; i < ret.Length; i++)
{
ret[i] = new Property(props[i]);
}
return ret;
}