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);
}