C# 클래스 CodeSharp.EventSourcing.MsmqUtilities

MSMQ-related utility functions
파일 보기 프로젝트 열기: tangxuehua/eventsourcing

공개 메소드들

메소드 설명
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