/// <inheritdoc />
        protected override IList <StaticParameterWrapper> GetFunctionParameters(StaticFunctionWrapper function)
        {
            CodeFunction2 functionHandle = (CodeFunction2)function.Handle;

            return(ConvertCodeElementsToArray <CodeParameter2, StaticParameterWrapper>(functionHandle.Parameters, delegate(CodeParameter2 parameter)
            {
                return new StaticParameterWrapper(this, parameter, function);
            }));
        }
        /// <inheritdoc />
        protected override CallingConventions GetFunctionCallingConvention(StaticFunctionWrapper function)
        {
            CodeFunction2 functionHandle = (CodeFunction2)function.Handle;

            // FIXME: No way to determine VarArgs convention.
            CallingConventions flags = CallingConventions.Standard;

            ReflectorFlagsUtils.AddFlagIfTrue(ref flags, CallingConventions.HasThis, !functionHandle.IsShared);
            return(flags);
        }
        /// <inheritdoc />
        protected override MethodAttributes GetFunctionAttributes(StaticFunctionWrapper function)
        {
            CodeFunction2 functionHandle = (CodeFunction2)function.Handle;

            // FIXME: Don't know how to handle vsCMAccessWithEvents
            MethodAttributes flags = 0;

            switch (functionHandle.Access)
            {
            case vsCMAccess.vsCMAccessPublic:
                flags |= MethodAttributes.Public;
                break;

            case vsCMAccess.vsCMAccessPrivate:
                flags |= MethodAttributes.Private;
                break;

            case vsCMAccess.vsCMAccessDefault:
            case vsCMAccess.vsCMAccessProject:
                flags |= MethodAttributes.Assembly;
                break;

            case vsCMAccess.vsCMAccessProtected:
                flags |= MethodAttributes.Family;
                break;

            case vsCMAccess.vsCMAccessAssemblyOrFamily:
            case vsCMAccess.vsCMAccessProjectOrProtected:
                flags |= MethodAttributes.FamORAssem;
                break;
            }

            ReflectorFlagsUtils.AddFlagIfTrue(ref flags, MethodAttributes.Static, functionHandle.IsShared);
            ReflectorFlagsUtils.AddFlagIfTrue(ref flags, MethodAttributes.Abstract, (functionHandle.OverrideKind & vsCMOverrideKind.vsCMOverrideKindAbstract) != 0);
            ReflectorFlagsUtils.AddFlagIfTrue(ref flags, MethodAttributes.Final, (functionHandle.OverrideKind & vsCMOverrideKind.vsCMOverrideKindSealed) != 0);
            ReflectorFlagsUtils.AddFlagIfTrue(ref flags, MethodAttributes.Virtual, (functionHandle.OverrideKind & vsCMOverrideKind.vsCMOverrideKindVirtual) != 0);
            ReflectorFlagsUtils.AddFlagIfTrue(ref flags, MethodAttributes.NewSlot, (functionHandle.OverrideKind & vsCMOverrideKind.vsCMOverrideKindOverride) == 0);
            ReflectorFlagsUtils.AddFlagIfTrue(ref flags, MethodAttributes.HideBySig, true); // FIXME
            return(flags);
        }