public void CreateInputs() { Sinks.Add("AngleSetpoint", new InputSignalViewModel("AngleSetpoint", FriendlyName)); Sinks.Add("JogForward", new InputSignalViewModel("JogForward", FriendlyName)); Sinks.Add("JogReverse", new InputSignalViewModel("JogReverse", FriendlyName)); Sinks.Add("JogSpeed", new InputSignalViewModel("JogSpeed", FriendlyName)); }
public bool RegisterMessageSink(IMessageSink sink) { if (Sinks.Contains(sink)) { return(true); } Sinks.Add(new MessageSink(sink, Messages)); FlushMessages(); return(true); }
public Log SinkTo <T>() where T : Sink, new() { EnsureNotClosed(); if (SinkExists <T>()) { throw new DuplicateSinkException(typeof(T)); } Sinks.Add(new T()); return(this); }
public Log SinkTo(Sink sink) { EnsureNotClosed(); var sinkType = sink.GetType(); if (SinkExists(sinkType)) { throw new DuplicateSinkException(sinkType); } Sinks.Add(sink); return(this); }
/// <summary> /// Sets write function that will be used for logging messages /// </summary> /// <param name="writeFunction">Function receiving <see cref="string"/> message parameter</param> public static void WriteTo(Action <string> writeFunction) { Sinks.Add(writeFunction); }
public void AddSink(SinkFunction sf) { Sinks.Add(sf); }