/// <summary>Determines if the specified SOAPAction is acceptable for a given <see cref="T:System.Reflection.MethodBase" />.</summary>
/// <returns>true if the specified SOAPAction is acceptable for a given <see cref="T:System.Reflection.MethodBase" />; otherwise, false.</returns>
/// <param name="soapAction">The SOAPAction to check against the given <see cref="T:System.Reflection.MethodBase" />. </param>
/// <param name="mb">The <see cref="T:System.Reflection.MethodBase" /> the specified SOAPAction is checked against. </param>
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
/// </PermissionSet>
public static bool IsSoapActionValidForMethodBase(string soapAction, MethodBase mb)
{
string a;
string a2;
SoapServices.GetTypeAndMethodNameFromSoapAction(soapAction, out a, out a2);
if (a2 != mb.Name)
{
return(false);
}
string assemblyQualifiedName = mb.DeclaringType.AssemblyQualifiedName;
return(a == assemblyQualifiedName);
}