src/sys/dotnet/fanx/emit/Emitter.cs
/// <summary>
/// Define a new field to emit for the current class.
/// </summary>
Define a new field to emit for the current class.
Define a new field to emit for the current class .
public void emitField(string name, string type, FieldAttr attr)
    {
      string key = className + "/F" + name;
      FieldDef fieldDef = (FieldDef)fields[key];
      if (fieldDef == null)
      {
        fields[key] = classDef.AddField(attr, name, findType(type));
      }
      else
      {
        fieldDef.SetFieldAttr(attr);
      }
    }
public void emitField ( string name , string type , FieldAttr attr ) { string key = className + " " + name ; FieldDef fieldDef = ( FieldDef ) fields [ key ] ; if ( fieldDef == null ) { fields [ key ] = classDef . AddField ( attr , name , findType ( type ) ) ; } else { fieldDef . SetFieldAttr ( attr ) ; } }
Define a new field to emit for the current class.
Define a new field to emit for the current class .
// only add if not already stubbed out // is stubbed out, make sure we define field correctly
name
string
type
string
attr
FieldAttr