public LabObserver(LabTraceSource trace, bool showTimeOnNext) { Contract.Requires(trace != null); this.trace = trace; this.showTimeOnNext = showTimeOnNext; this.showValues = !(typeof(T) == typeof(Unit)); }
public static LabObserver <T> Completed(LabTraceSource trace) { Contract.Requires(trace != null); Contract.Ensures(Contract.Result <LabObserver <T> >() != null); return(new LabObserver <T>(trace) { hasValue = true // assumption }); }
public LabObserver(LabTraceSource trace, string name, bool showTimeOnNext) { Contract.Requires(trace != null); Contract.Requires(!string.IsNullOrEmpty(name)); this.trace = trace; this.namePrefix = name + ' '; this.showTimeOnNext = showTimeOnNext; this.showValues = !(typeof(T) == typeof(Unit)); }
public static LabObserver <T> Error(LabTraceSource trace, string name) { Contract.Requires(trace != null); Contract.Requires(!string.IsNullOrEmpty(name)); Contract.Ensures(Contract.Result <LabObserver <T> >() != null); return(new LabObserver <T>(trace, name) { hasValue = true // assumption }); }
internal LabObserver(LabTraceSource trace, string name, string valueFormat, bool showTimeOnNext) { Contract.Requires(trace != null); Contract.Requires(!string.IsNullOrEmpty(valueFormat)); this.trace = trace; this.namePrefix = string.IsNullOrEmpty(name) ? null : name + ' '; this.valueFormat = valueFormat; this.showTimeOnNext = showTimeOnNext; this.showValues = !(typeof(T) == typeof(Unit)); }
public LabObserver(LabTraceSource trace, string name) : this(trace, name, showTimeOnNext : true) { Contract.Requires(trace != null); Contract.Requires(!string.IsNullOrEmpty(name)); }
public LabObserver(LabTraceSource trace) : this(trace, showTimeOnNext : true) { Contract.Requires(trace != null); }