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

Emit() public method

public Emit ( ) : void
return void
		public override void Emit ()
		{
			if (member_type.BuiltinType == BuiltinTypeSpec.Type.Dynamic) {
				Module.PredefinedAttributes.Dynamic.EmitAttribute (FieldBuilder);
			} else if (!Parent.IsCompilerGenerated && member_type.HasDynamicElement) {
				Module.PredefinedAttributes.Dynamic.EmitAttribute (FieldBuilder, member_type, Location);
			}

			if ((ModFlags & Modifiers.COMPILER_GENERATED) != 0 && !Parent.IsCompilerGenerated)
				Module.PredefinedAttributes.CompilerGenerated.EmitAttribute (FieldBuilder);
			if ((ModFlags & Modifiers.DEBUGGER_HIDDEN) != 0)
				Module.PredefinedAttributes.DebuggerBrowsable.EmitAttribute (FieldBuilder, System.Diagnostics.DebuggerBrowsableState.Never);

			if (OptAttributes != null) {
				OptAttributes.Emit ();
			}

			if (((status & Status.HAS_OFFSET) == 0) && (ModFlags & (Modifiers.STATIC | Modifiers.BACKING_FIELD)) == 0 && Parent.PartialContainer.HasExplicitLayout) {
				Report.Error (625, Location, "`{0}': Instance field types marked with StructLayout(LayoutKind.Explicit) must have a FieldOffset attribute", GetSignatureForError ());
			}

			ConstraintChecker.Check (this, member_type, type_expr.Location);

			base.Emit ();
		}