public PyEventClassBuilder(string baseClass, Type classType = null) { this._itw = new IndentedTextWriter(this._sw); this.BaseClassName = baseClass; this.ClassName = PyVariableManager.GetFreeVariableName() + baseClass.Replace(".", string.Empty);; if (classType != null) { this.EventDest = classType.FullName; } }
public PyFunctionBuilder(string functionName) { if (functionName == null) { functionName = "_f" + PyVariableManager.GetFreeVariableName(); } this.Name = functionName; this.Writer = new IndentedTextWriter(this._sw); // TODO: arguments (when and if they will be needed) Writer.WriteLine(string.Format("def {0}():", this.Name)); Writer.Indent++; }