Mono.Cecil.WindowsRuntimeProjections.GetMethodDefinitionTreatmentFromCustomAttributes C# (CSharp) Method

GetMethodDefinitionTreatmentFromCustomAttributes() static private method

static private GetMethodDefinitionTreatmentFromCustomAttributes ( Mono.Cecil.MethodDefinition method ) : MethodDefinitionTreatment
method Mono.Cecil.MethodDefinition
return MethodDefinitionTreatment
        static MethodDefinitionTreatment GetMethodDefinitionTreatmentFromCustomAttributes(MethodDefinition method)
        {
            var treatment = MethodDefinitionTreatment.None;

            foreach (var attribute in method.CustomAttributes)
            {
                var type = attribute.AttributeType;
                if (type.Namespace != "Windows.UI.Xaml")
                    continue;
                if (type.Name == "TreatAsPublicMethodAttribute")
                    treatment |= MethodDefinitionTreatment.Public;
                else if (type.Name == "TreatAsAbstractMethodAttribute")
                    treatment |= MethodDefinitionTreatment.Abstract;
            }

            return treatment;
        }