public IEnumerable <IControlInterface> GetOwnAndPartnersControlInterfaces(IStarWindServer server) { var pars = new Parameters(); pars.AppendParam("sendTo", DeviceId); pars.AppendParam("GetOwnAndPartnersControlInterfaces", ""); server.ExecuteCommandEx(STARWIND_COMMAND_TYPE.STARWIND_CONTROL_REQUEST, "", pars, out var result); return(Enumerable.Range(0, ParnerNodesCount).Select(i => new ControlInterface(result, i))); }
public StarWindServerExt(IStarWindServer server) { Server = server; foreach (var prop in GetType().GetProperties()) { if (!prop.PropertyType.GetInterfaces().Contains(typeof(IAbstractValue))) { continue; } if (!prop.CanRead) { continue; } if (prop.GetValue(this) is IAbstractValue value) { value.Server = this; } } }