Exemplo n.º 1
0
        public LabObserver(LabTraceSource trace, bool showTimeOnNext)
        {
            Contract.Requires(trace != null);

            this.trace          = trace;
            this.showTimeOnNext = showTimeOnNext;
            this.showValues     = !(typeof(T) == typeof(Unit));
        }
Exemplo n.º 2
0
        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
            });
        }
Exemplo n.º 3
0
        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));
        }
Exemplo n.º 4
0
        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
            });
        }
Exemplo n.º 5
0
        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));
        }
Exemplo n.º 6
0
 public LabObserver(LabTraceSource trace, string name)
     : this(trace, name, showTimeOnNext : true)
 {
     Contract.Requires(trace != null);
     Contract.Requires(!string.IsNullOrEmpty(name));
 }
Exemplo n.º 7
0
 public LabObserver(LabTraceSource trace)
     : this(trace, showTimeOnNext : true)
 {
     Contract.Requires(trace != null);
 }