Beispiel #1
0
            public OverrideInfo(MethodSymbol method, MethodSymbol methodoverride = null)
            {
                Debug.Assert(method != null);

                this.Method = method;

                //
                // store the override,
                // either as an override or just a candidate if the signatures are not matching.
                // In case of the candidate, a ghost stub will be generated later.
                //

                MethodSymbol overridecandidate = null;

                if (methodoverride != null)
                {
                    if (!method.SignaturesMatch(methodoverride))
                    {
                        overridecandidate = methodoverride;
                        methodoverride    = null;
                    }
                }

                this.Override            = methodoverride;
                this.OverrideCandidate   = overridecandidate;
                this.ImplementsInterface = false;
            }
Beispiel #2
0
            public OverrideInfo(MethodSymbol method, MethodSymbol methodoverride = null)
            {
                Debug.Assert(method != null);

                this.Method              = method;
                this.Override            = null;
                this.OverrideCandidate   = null;
                this.ImplementsInterface = false;

                //
                // store the override,
                // either as an override or just a candidate if the signatures are not matching.
                // In case of the candidate, a ghost stub will be generated later.
                //

                if (methodoverride != null)
                {
                    if (methodoverride.IsExplicitInterfaceImplementation(method) ||
                        (methodoverride.SignaturesMatch(method) && methodoverride.IsVirtual))
                    {
                        // overrides:
                        this.Override = methodoverride;
                    }
                    else
                    {
                        this.OverrideCandidate = methodoverride;
                    }
                }
            }