internal BroRecord(IntPtr sourceRecordPtr) #endif : this() { if (sourceRecordPtr.IsInvalid()) { return; } int length = BroApi.bro_record_get_length(sourceRecordPtr); for (int i = 0; i < length; i++) { BroType type = BroType.Unknown; IntPtr value = BroApi.bro_record_get_nth_val(sourceRecordPtr, i, ref type); string name = Marshal.PtrToStringAnsi(BroApi.bro_record_get_nth_name(sourceRecordPtr, i)); BroApi.bro_record_add_val(m_recordPtr, name, type, null, value); } }