/// <summary> /// Converts a PSDK Host object to its CTI equivalent. /// </summary> /// <param name="host">The Host object to convert.</param> /// <returns>A <see cref="Host"/> object equivalent to the provided PSDK object.</returns> public static Host ToHost(this CfgHost host) => new Host { Dbid = host.DBID, Enabled = host.State.IsEnabled(), IpAddress = host.IPaddress, Name = host.Name, TenantDbid = WellKnownDbids.EnvironmentDbid };
void modifyShapeText(Visio.Shape shape, CfgHost host) { shape.Name = host.Name; Visio.Characters chars = shape.Characters; chars.set_ParaProps(6, 0); // Left alignment if (Settings.WriteHost) { modifyTextHost(chars, host); } if (Settings.WriteApplicationList) { foreach (CfgServer server in host.Servers) { CfgApplication app = server.Application; chars.Begin = chars.End; modifyTextApplication(chars, app); } } }
void modifyTextHost(Visio.Characters chars, CfgHost host) { new Parser.Parser().parseText(Settings.HostText, new Parser.HostTextVisitor(host, chars)); }
public HostTextVisitor(CfgHost host, Visio.Characters chars) : base(chars) { this.host = host; }