public override void AppendTo(ref SpanWriter writer, OrderedHashSet <string> strings, ref int entries, ref int switches) { var textIndex = strings.GetOrAdd(InitialText ?? ""); writer.WriteAscii($"{{ textentry {X} {Y} {Width} {Height} {Hue} {EntryID} {textIndex} }}"); entries++; }
public override void AppendTo(ref SpanWriter writer, OrderedHashSet <string> strings, ref int entries, ref int switches) { var textIndex = strings.GetOrAdd(Text ?? ""); var background = Background ? "1" : "0"; var scrollbar = Scrollbar ? "1" : "0"; writer.WriteAscii($"{{ htmlgump {X} {Y} {Width} {Height} {textIndex} {background} {scrollbar} }}"); }
public int UsingOrderedHashSet() { var ordered = new OrderedHashSet <string>(); for (int i = 0; i < _iterations.Length / 2; i++) { ordered.GetOrAdd(_iterations[i]).ToString(); } for (int i = 0; i < _iterations.Length; i++) { ordered.GetOrAdd(_iterations[i]).ToString(); } foreach (var str in ordered) { str.ToString(); } return(ordered.Count); }
public override void AppendTo(ref SpanWriter writer, OrderedHashSet <string> strings, ref int entries, ref int switches) { writer.Write((ushort)0x7B20); // "{ " writer.Write(LayoutName); writer.WriteAscii(' '); writer.WriteAscii(X.ToString()); writer.WriteAscii(' '); writer.WriteAscii(Y.ToString()); writer.WriteAscii(' '); writer.WriteAscii(Hue.ToString()); writer.WriteAscii(' '); writer.WriteAscii(strings.GetOrAdd(Text).ToString()); writer.Write((ushort)0x207D); // " }" }
public int UsingOrderedHashSet() { for (int i = 0; i < iterations / 2; i++) { _ordered.GetOrAdd(i.ToString()); } for (int i = 0; i < iterations; i++) { _ordered.GetOrAdd(i.ToString()); } for (int i = 0; i < iterations * 2; i++) { _ordered.GetOrAdd(i.ToString()); } foreach (var str in _ordered) { str.ToString(); } return(_ordered.Count); }
public override void AppendTo(ref SpanWriter writer, OrderedHashSet <string> strings, ref int entries, ref int switches) { writer.Write((ushort)0x7B20); // "{ " writer.Write(LayoutName); writer.Write((byte)0x20); // ' ' writer.WriteAscii(X.ToString()); writer.Write((byte)0x20); // ' ' writer.WriteAscii(Y.ToString()); writer.Write((byte)0x20); // ' ' writer.WriteAscii(Width.ToString()); writer.Write((byte)0x20); // ' ' writer.WriteAscii(Height.ToString()); writer.Write((byte)0x20); // ' ' writer.WriteAscii(strings.GetOrAdd(Text).ToString()); writer.Write((byte)0x20); // ' ' writer.Write((byte)(Background ? 0x31 : 0x30)); // 1 or 0 writer.Write((byte)0x20); // ' ' writer.Write((byte)(Scrollbar ? 0x31 : 0x30)); // 1 or 0 writer.Write((ushort)0x207D); // " }" }
public override void AppendTo(ref SpanWriter writer, OrderedHashSet <string> strings, ref int entries, ref int switches) { writer.Write((ushort)0x7B20); // "{ " writer.Write(LayoutName); writer.Write((byte)0x20); // ' ' writer.WriteAscii(X.ToString()); writer.Write((byte)0x20); // ' ' writer.WriteAscii(Y.ToString()); writer.Write((byte)0x20); // ' ' writer.WriteAscii(Width.ToString()); writer.Write((byte)0x20); // ' ' writer.WriteAscii(Height.ToString()); writer.Write((byte)0x20); // ' ' writer.WriteAscii(Hue.ToString()); writer.Write((byte)0x20); // ' ' writer.WriteAscii(EntryID.ToString()); writer.Write((byte)0x20); // ' ' writer.WriteAscii(strings.GetOrAdd(InitialText).ToString()); writer.Write((ushort)0x207D); // " }" entries++; }
public override string Compile(OrderedHashSet <string> strings) => $"{{ textentry {X} {Y} {Width} {Height} {Hue} {EntryID} {strings.GetOrAdd(InitialText)} }}";
public override string Compile(OrderedHashSet <string> strings) => $"{{ htmlgump {X} {Y} {Width} {Height} {strings.GetOrAdd(Text)} {(Background ? 1 : 0)} {(Scrollbar ? 1 : 0)} }}";
public override string Compile(OrderedHashSet <string> strings) => $"{{ text {X} {Y} {Hue} {strings.GetOrAdd(Text)} }}";
public override void AppendTo(ref SpanWriter writer, OrderedHashSet <string> strings, ref int entries, ref int switches) { var textIndex = strings.GetOrAdd(Text ?? ""); writer.WriteAscii($"{{ text {X} {Y} {Hue} {textIndex} }}"); }
public override string Compile(OrderedHashSet <string> strings) => $"{{ croppedtext {X} {Y} {Width} {Height} {Hue} {strings.GetOrAdd(Text ?? "")} }}";