public virtual SSAFieldsLine CreateFieldsLine(string name, string[] fields) { if (name == null) { throw new ArgumentNullException(nameof(name)); } if (fields == null) { throw new ArgumentNullException(nameof(fields)); } switch (name) { case "Format": SSAFormatLine formatLine = new SSAFormatLine(fields); if (this.FormatLine == null) { this.FormatLine = formatLine; } else { throw new InvalidOperationException(); } return(formatLine); default: return(new SSAFieldsLine(name, fields)); } }
public SSAFieldsLine(string name, string text, SSAFormatLine formatLine) : this(name, text) { if (formatLine == null) { throw new ArgumentNullException(nameof(formatLine)); } #if true int fieldCount = formatLine.fields.Length; #else int fieldCount = formatLine.Fields.Count(_field => !_field.DefaultValue.HasValue); #endif this.fields = this.fields.Take(fieldCount - 1).Concat(new[] { string.Join(",", this.fields.Skip(fieldCount - 1)) }).ToArray(); }
protected internal override ISSALine CreateNamedLine(string name, string text) { switch (name) { case "Format": SSAFormatLine formatLine = new SSAFormatLine(text); if (this.FormatLine == null && this.lines.Count == 0) { this.FormatLine = formatLine; } else { throw new InvalidOperationException(); } return(formatLine); default: return(base.CreateNamedLine(name, text)); } }
public SSAStyleLine(string text, SSAFormatLine formatLine) : base("Style", text, formatLine) { }
public SSADialogLine(string text, SSAFormatLine formatLine) : base("Dialogue", text, formatLine) { }