public override bool Define ()
{
if (!base.Define ())
return false;
if (!CheckBase ())
return false;
MemberKind kind;
if (this is Operator)
kind = MemberKind.Operator;
else if (this is Destructor)
kind = MemberKind.Destructor;
else
kind = MemberKind.Method;
string explicit_name;
if (IsPartialDefinition) {
caching_flags &= ~Flags.Excluded_Undetected;
caching_flags |= Flags.Excluded;
// Add to member cache only when a partial method implementation has not been found yet
if ((caching_flags & Flags.PartialDefinitionExists) != 0)
return true;
if (IsExplicitImpl)
return true;
explicit_name = null;
} else {
MethodData = new MethodData (this, ModFlags, flags, this, base_method);
if (!MethodData.Define (Parent.PartialContainer, GetFullName (MemberName)))
return false;
explicit_name = MethodData.MetadataName;
}
spec = new MethodSpec (kind, Parent.Definition, this, ReturnType, parameters, ModFlags);
if (MemberName.Arity > 0)
spec.IsGeneric = true;
Parent.MemberCache.AddMember (this, explicit_name, spec);
return true;
}