Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient.TopicNameMatcher C# (CSharp) Метод

TopicNameMatcher() приватный статический Метод

Verifies that the ARN for the topic matches the topic name
private static TopicNameMatcher ( string topicArn, string topicName ) : bool
topicArn string
topicName string
Результат bool
        private static bool TopicNameMatcher(string topicArn, string topicName)
        {
            if (String.IsNullOrEmpty(topicArn))
            {
                return false;
            }

            if (String.IsNullOrEmpty(topicName))
            {
                return false;
            }

            int indexOfLastColon = topicArn.LastIndexOf(":", StringComparison.OrdinalIgnoreCase);

            if (indexOfLastColon.Equals(-1))
            {
                return false;
            }

            return topicArn.Substring(indexOfLastColon + 1).Equals(topicName);
        }
AmazonSimpleNotificationServiceClient