C# Класс CodeSharp.EventSourcing.MsmqUtilities

MSMQ-related utility functions
Показать файл Открыть проект

Открытые методы

Метод Описание
AccountToBeAssignedQueuePermissions ( string account ) : void

Sets the account to be assigned queue permissions.

Convert ( System m ) : Message

Converts an MSMQ message to a Message.

Convert ( Message message ) : System.Messaging.Message

Converts a Message to an Msmq message. Doesn't set the ResponseQueue of the result.

CreateQueue ( string queueName, string account ) : void

Create named message queue

CreateQueueIfNecessary ( Address address, string account ) : void

Utility method for creating a queue if it does not exist.

GetFullPath ( Address value ) : string

Turns a '@' separated value into a full path. Format is 'queue@machine', or 'queue@ipaddress'

GetFullPathWithoutPrefix ( Address address ) : string

Returns the full path without Format or direct os from an address.

GetFullPathWithoutPrefix ( string value ) : string

Returns the full path without Format or direct os from a '@' separated path.

GetIndependentAddressForQueue ( System.Messaging.MessageQueue q ) : Address

Gets an independent address for the queue in the form: queue@machine.

GetNumberOfPendingMessages ( string queueName ) : int

Returns the number of messages in the queue.

GetReturnAddress ( Address value, Address target ) : string

Gets the name of the return address from the provided value. If the target includes a machine name, uses the local machine name in the returned value otherwise uses the local IP address in the returned value.

GetReturnAddress ( string value, string target ) : string

Gets the name of the return address from the provided value. If the target includes a machine name, uses the local machine name in the returned value otherwise uses the local IP address in the returned value.

QueueIsLocal ( string value ) : bool

Checks whether or not a queue is local by its path.

SetPermissionsForQueue ( string queue, string account ) : void

Sets default permissions for queue.

Приватные методы

Метод Описание
ExtractMsmqMessageLabelInformationForBackwardCompatibility ( System msmqMsg, Message result ) : void

For backward compatibility, extract the V2.6 MSMQ label content (IdForCorrelation and WindowsIdentityName) into the V3.X transport message.

FillLabelForBackwardsCompatabilityWhileSending ( Message transportMessage, System msmqMessage ) : void

Fill MSMQ message's label.

LocalIpAddress ( IPAddress targetIpAddress ) : string
getFullPath ( string value ) : string
getMachineNameFromLogicalName ( string logicalName ) : string
getQueueNameFromLogicalName ( string logicalName ) : string

Описание методов

AccountToBeAssignedQueuePermissions() публичный статический Метод

Sets the account to be assigned queue permissions.
public static AccountToBeAssignedQueuePermissions ( string account ) : void
account string Account to be used.
Результат void

Convert() публичный статический Метод

Converts an MSMQ message to a Message.
public static Convert ( System m ) : Message
m System
Результат Message

Convert() публичный статический Метод

Converts a Message to an Msmq message. Doesn't set the ResponseQueue of the result.
public static Convert ( Message message ) : System.Messaging.Message
message Message
Результат System.Messaging.Message

CreateQueue() публичный статический Метод

Create named message queue
public static CreateQueue ( string queueName, string account ) : void
queueName string
account string The account to be given permissions to the queue
Результат void

CreateQueueIfNecessary() публичный статический Метод

Utility method for creating a queue if it does not exist.
public static CreateQueueIfNecessary ( Address address, string account ) : void
address Address
account string The account to be given permissions to the queue
Результат void

GetFullPath() публичный статический Метод

Turns a '@' separated value into a full path. Format is 'queue@machine', or 'queue@ipaddress'
public static GetFullPath ( Address value ) : string
value Address
Результат string

GetFullPathWithoutPrefix() публичный статический Метод

Returns the full path without Format or direct os from an address.
public static GetFullPathWithoutPrefix ( Address address ) : string
address Address
Результат string

GetFullPathWithoutPrefix() публичный статический Метод

Returns the full path without Format or direct os from a '@' separated path.
public static GetFullPathWithoutPrefix ( string value ) : string
value string
Результат string

GetIndependentAddressForQueue() публичный статический Метод

Gets an independent address for the queue in the form: queue@machine.
public static GetIndependentAddressForQueue ( System.Messaging.MessageQueue q ) : Address
q System.Messaging.MessageQueue
Результат Address

GetNumberOfPendingMessages() публичный статический Метод

Returns the number of messages in the queue.
public static GetNumberOfPendingMessages ( string queueName ) : int
queueName string
Результат int

GetReturnAddress() публичный статический Метод

Gets the name of the return address from the provided value. If the target includes a machine name, uses the local machine name in the returned value otherwise uses the local IP address in the returned value.
public static GetReturnAddress ( Address value, Address target ) : string
value Address
target Address
Результат string

GetReturnAddress() публичный статический Метод

Gets the name of the return address from the provided value. If the target includes a machine name, uses the local machine name in the returned value otherwise uses the local IP address in the returned value.
public static GetReturnAddress ( string value, string target ) : string
value string
target string
Результат string

QueueIsLocal() публичный статический Метод

Checks whether or not a queue is local by its path.
public static QueueIsLocal ( string value ) : bool
value string The path to the queue to check.
Результат bool

SetPermissionsForQueue() публичный статический Метод

Sets default permissions for queue.
public static SetPermissionsForQueue ( string queue, string account ) : void
queue string
account string
Результат void