public static bool TryGetIsTransactional(string formatName, out bool isTransactional) { using (QueueTransactionProperties properties = new QueueTransactionProperties()) { IntPtr nativePropertiesPointer = properties.Pin(); try { if (UnsafeNativeMethods.MQGetQueueProperties(formatName, nativePropertiesPointer) == 0) { isTransactional = properties.Transaction.Value != UnsafeNativeMethods.MQ_TRANSACTIONAL_NONE; return(true); } else { isTransactional = false; MsmqDiagnostics.QueueTransactionalStatusUnknown(formatName); return(false); } } finally { properties.Unpin(); } } }
public static bool TryGetIsTransactional(string formatName, out bool isTransactional) { bool flag; using (QueueTransactionProperties properties = new QueueTransactionProperties()) { IntPtr ptr = properties.Pin(); try { if (UnsafeNativeMethods.MQGetQueueProperties(formatName, ptr) == 0) { isTransactional = properties.Transaction.Value != 0; return(true); } isTransactional = false; MsmqDiagnostics.QueueTransactionalStatusUnknown(formatName); flag = false; } finally { properties.Unpin(); } } return(flag); }
public static bool TryGetIsTransactional(string formatName, out bool isTransactional) { using (QueueTransactionProperties properties = new QueueTransactionProperties()) { IntPtr nativePropertiesPointer = properties.Pin(); try { if (UnsafeNativeMethods.MQGetQueueProperties(formatName, nativePropertiesPointer) == 0) { isTransactional = properties.Transaction.Value != UnsafeNativeMethods.MQ_TRANSACTIONAL_NONE; return true; } else { isTransactional = false; MsmqDiagnostics.QueueTransactionalStatusUnknown(formatName); return false; } } finally { properties.Unpin(); } } }