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

NeedsWindowsRuntimePrefix() static private method

static private NeedsWindowsRuntimePrefix ( Mono.Cecil.TypeDefinition type ) : bool
type Mono.Cecil.TypeDefinition
return bool
        static bool NeedsWindowsRuntimePrefix(TypeDefinition type)
        {
            if ((type.Attributes & (TypeAttributes.VisibilityMask | TypeAttributes.Interface)) != TypeAttributes.Public)
                return false;

            var base_type = type.BaseType;
            if (base_type == null || base_type.MetadataToken.TokenType != TokenType.TypeRef)
                return false;

            if (base_type.Namespace == "System")
                switch (base_type.Name)
                {
                    case "Attribute":
                    case "MulticastDelegate":
                    case "ValueType":
                        return false;
                }

            return true;
        }