protected void WriteCodeForSetter(StreamWriter writer, int numTabs, StringBuilder builder, AccessModifier defaultScope, int versionArrayIndex) { builder.Length = 0; // Start set if (SetterScope != defaultScope) { AppendScopeToStringBuilder(builder, SetterScope); } builder.Append("set"); numTabs = GameSettingsGenerator.WriteStartEncapsulation(writer, numTabs, builder.ToString()); // Write value GameSettingsGenerator.WriteTabs(writer, numTabs); if (CanWriteCodeToInstance == true) { // Write return WriteCodeToInstance(writer, versionArrayIndex, true); writer.Write('.'); writer.Write(SetterCode); writer.WriteLine(';'); } else { // Otherwise, plop the getter code directly writer.WriteLine(SetterCode); } // End the property GameSettingsGenerator.WriteEndEncapsulation(writer, numTabs); }
public void WriteTabs() { // Write tabs GameSettingsGenerator.WriteTabs(writer, numTabs); }