public FtMetaSubstitution New() { FtMetaSubstitution result = SubstitutionFactory.CreateMetaSubstitution(); Add(result); return(result); }
public FtMetaSubstitution CreateCopy() { FtMetaSubstitution substitution = SubstitutionFactory.CreateMetaSubstitution(); substitution.Assign(this); return(substitution); }
public void Assign(FtMetaSubstitutionList source) { list.Clear(); list.Capacity = source.Count; for (int i = 0; i < source.Count; i++) { FtMetaSubstitution substitution = source[i].CreateCopy(); Add(substitution); } }
public void LoadMeta(FtMetaSubstitution metaSubstitution, FtEndOfLineAutoWriteType autoWriteType) { type = metaSubstitution.Type; token = metaSubstitution.Token; switch (type) { case FtSubstitutionType.String: value = metaSubstitution.Value; break; case FtSubstitutionType.AutoEndOfLine: switch (autoWriteType) { case FtEndOfLineAutoWriteType.CrLf: value = SerializationCore.CarriageReturnLineFeedString; break; case FtEndOfLineAutoWriteType.Cr: value = SerializationCore.CarriageReturnChar.ToString(); break; case FtEndOfLineAutoWriteType.Lf: value = SerializationCore.LineFeedChar.ToString(); break; case FtEndOfLineAutoWriteType.Local: value = System.Environment.NewLine; break; default: throw FtInternalException.Create(InternalError.FtSubstitution_LoadMeta_UnsupportedAutoWriteType, autoWriteType.ToString()); } value = metaSubstitution.Value; break; } }
public void Remove(FtMetaSubstitution substitution) { list.Remove(substitution); }
public void Add(FtMetaSubstitution substitution) { list.Add(substitution); }
public virtual void Assign(FtMetaSubstitution source) { Type = source.Type; Token = source.Token; Value = source.Value; }