Mono.CSharp.MemberCore.EnableOverloadChecks C# (CSharp) Method

EnableOverloadChecks() public method

Returns true when a member supports multiple overloads (methods, indexers, etc)
public EnableOverloadChecks ( MemberCore overload ) : bool
overload MemberCore
return bool
		public virtual bool EnableOverloadChecks (MemberCore overload)
		{
			return false;
		}

Usage Example

Example #1
0
		/// <summary>
		/// Adds the member to defined_names table. It tests for duplications and enclosing name conflicts
		/// </summary>
		protected virtual bool AddToContainer (MemberCore symbol, string name)
		{
			MemberCore mc;
			if (!defined_names.TryGetValue (name, out mc)) {
				defined_names.Add (name, symbol);
				return true;
			}

			if (((mc.ModFlags | symbol.ModFlags) & Modifiers.COMPILER_GENERATED) != 0)
				return true;

			if (symbol.EnableOverloadChecks (mc))
				return true;

			InterfaceMemberBase im = mc as InterfaceMemberBase;
			if (im != null && im.IsExplicitImpl)
				return true;

			Report.SymbolRelatedToPreviousError (mc);
			if ((mc.ModFlags & Modifiers.PARTIAL) != 0 && (symbol is ClassOrStruct || symbol is Interface)) {
				Error_MissingPartialModifier (symbol);
				return false;
			}

			if (this is ModuleContainer) {
				Report.Error (101, symbol.Location, 
					"The namespace `{0}' already contains a definition for `{1}'",
					((DeclSpace)symbol).NamespaceEntry.GetSignatureForError (), symbol.MemberName.Name);
			} else if (symbol is TypeParameter) {
				Report.Error (692, symbol.Location,
					"Duplicate type parameter `{0}'", symbol.GetSignatureForError ());
			} else {
				Report.Error (102, symbol.Location,
					      "The type `{0}' already contains a definition for `{1}'",
					      GetSignatureForError (), symbol.MemberName.Name);
			}

			return false;
		}
All Usage Examples Of Mono.CSharp.MemberCore::EnableOverloadChecks