Mono.Tuner.InjectSecurityAttributes.HasSecurityAttribute C# (CSharp) Метод

HasSecurityAttribute() защищенный статический Метод

protected static HasSecurityAttribute ( ICustomAttributeProvider provider, AttributeType type ) : bool
provider ICustomAttributeProvider
type AttributeType
Результат bool
		protected static bool HasSecurityAttribute (ICustomAttributeProvider provider, AttributeType type)
		{
			if (!provider.HasCustomAttributes)
				return false;

			foreach (CustomAttribute attribute in provider.CustomAttributes) {
				switch (attribute.Constructor.DeclaringType.Name) {
				case _critical:
					if (type == AttributeType.Critical)
						return true;

					break;
				case _safe_critical:
					if (type == AttributeType.SafeCritical)
						return true;

					break;
				}
			}

			return false;
		}