Mono.CSharp.TypeContainer.Emit C# (CSharp) Method

Emit() public method

public Emit ( ) : void
return void
		public override void Emit ()
		{
			if (!IsTopLevel) {
				MemberSpec candidate;
				var conflict_symbol = MemberCache.FindBaseMember (this, out candidate);
				if (conflict_symbol == null && candidate == null) {
					if ((ModFlags & Modifiers.NEW) != 0)
						Report.Warning (109, 4, Location, "The member `{0}' does not hide an inherited member. The new keyword is not required",
							GetSignatureForError ());
				} else {
					if ((ModFlags & Modifiers.NEW) == 0) {
						if (candidate == null)
							candidate = conflict_symbol;

						Report.SymbolRelatedToPreviousError (candidate);
						Report.Warning (108, 2, Location, "`{0}' hides inherited member `{1}'. Use the new keyword if hiding was intended",
							GetSignatureForError (), candidate.GetSignatureForError ());
					}
				}
			}

			if (all_tp_builders != null) {
				int current_starts_index = CurrentTypeParametersStartIndex;
				for (int i = 0; i < all_tp_builders.Length; i++) {
					if (i < current_starts_index) {
						TypeParameters[i].EmitConstraints (all_tp_builders [i]);
					} else {
						CurrentTypeParameters [i - current_starts_index].Emit ();
					}
				}
			}

			if ((ModFlags & Modifiers.COMPILER_GENERATED) != 0 && !Parent.IsCompilerGenerated)
				Module.PredefinedAttributes.CompilerGenerated.EmitAttribute (TypeBuilder);

#if STATIC
			if ((TypeBuilder.Attributes & TypeAttributes.StringFormatMask) == 0 && Module.HasDefaultCharSet)
				TypeBuilder.__SetAttributes (TypeBuilder.Attributes | Module.DefaultCharSetType);
#endif

			base.Emit ();
		}