コード例 #1
0
ファイル: ValueNode.cs プロジェクト: hnjm/mathnet-yttrium
 protected void SetPresentValue(IValueStructure value)
 {
     //bool different = !(value == null && _presentStructure == null)
     //   && !(_presentStructure != null && value != null && _presentStructure.Equals(value));
     _presentStructure = value;
     //_properties.ValidatePropertiesAfterEvent(this);
 }
コード例 #2
0
        public IValueStructure[] Evaluate(params IValueStructure[] inputs)
        {
            if (inputs == null)
            {
                throw new ArgumentNullException("inputs");
            }

            if (inputs.Length != _inputs.Count)
            {
                throw new System.ArgumentException("The count of inputs doesn't match the systems count of input signals.", "inputs");
            }

            for (int i = 0; i < inputs.Length; i++)
            {
                _inputs[i].PostNewValue(inputs[i]);
            }

            Service <ISimulationMediator> .Instance.SimulateInstant();

            IValueStructure[] outputs = new IValueStructure[_outputs.Count];
            for (int i = 0; i < outputs.Length; i++)
            {
                outputs[i] = _outputs[i].Value;
            }
            return(outputs);
        }
コード例 #3
0
        public static IValueStructure PolynomialDegree(Signal signal, Signal[] generalizedVariables)
        {
            if (signal == null)
            {
                throw new ArgumentNullException("signal");
            }

            if (signal.IsDrivenByPortEntity("Add", "Std"))
            {
                IntegerValue d      = IntegerValue.Zero;
                ISignalSet   inputs = signal.DrivenByPort.InputSignals;
                for (int i = 0; i < inputs.Count; i++)
                {
                    IValueStructure f = MonomialDegree(inputs[i], generalizedVariables);
                    if (f is UndefinedSymbol)
                    {
                        return(f);
                    }
                    else if (!(f is NegativeInfinitySymbol))
                    {
                        d = d.Max((IntegerValue)f);
                    }
                }
                return(d);
            }
            else
            {
                return(MonomialDegree(signal, generalizedVariables));
            }
        }
コード例 #4
0
        private static IAccumulator Escalate(MathIdentifier structure, IValueStructure value, bool requireField)
        {
            if (structure.Equals(IntegerValue.TypeIdentifier))
            {
                if (requireField)
                {
                    return(Escalate <RationalValue, RationalValue>(value));
                }
                else
                {
                    return(Escalate <IntegerValue, RationalValue>(value));
                }
            }
            if (structure.Equals(RationalValue.TypeIdentifier))
            {
                return(Escalate <RationalValue, RationalValue>(value));
            }
            if (structure.Equals(RealValue.TypeIdentifier))
            {
                return(Escalate <RealValue, RealValue>(value));
            }
            if (structure.Equals(ComplexValue.TypeIdentifier))
            {
                return(Escalate <ComplexValue, ComplexValue>(value));
            }

            throw new NotSupportedException();
        }
コード例 #5
0
        public override bool Equals(IValueStructure other)
        {
            IntegerValue integerValue = other as IntegerValue;

            if (integerValue != null)
            {
                return(Equals(integerValue));
            }

            RationalValue rationalValue = other as RationalValue;

            if (rationalValue != null)
            {
                return(rationalValue.Equals(this));
            }

            RealValue realValue = other as RealValue;

            if (realValue != null)
            {
                return(realValue.Equals(this));
            }

            return(other == this);
        }
コード例 #6
0
 protected void PublishToOutputs(IValueStructure value, TimeSpan delay)
 {
     for (int i = 0; i < outputs.Length; i++)
     {
         outputs[i].PostNewValue(value, delay);
     }
 }
コード例 #7
0
        public void UseCase_SystemAsCompoundArchitecture()
        {
            _p.KeepTrack = false;
            MathSystem s = _p.CurrentSystem;

            s.RemoveUnusedObjects();

            Signal x = Binder.CreateSignal();

            Std.ConstrainAlwaysReal(x);
            Signal x2    = StdBuilder.Square(x);
            Signal sinx2 = StdBuilder.Sine(x2);

            s.AddSignalTree(sinx2, true, true);
            s.RemoveUnusedObjects();

            s.PublishToLibrary("SineOfSquaredX", "sinx2");

            Signal y = Binder.CreateSignal();

            y.PostNewValue(RealValue.E);
            Signal z = Service <IBuilder> .Instance.Function("sinx2", y);

            _p.SimulateInstant();  //.SimulateFor(new TimeSpan(1));
            IValueStructure res     = z.Value;
            RealValue       resReal = RealValue.ConvertFrom(res);

            Assert.AreEqual(0.8939, Math.Round(resReal.Value, 4));
        }
コード例 #8
0
        internal Signal(IValueStructure value)
            : base(value)
        {
            _properties = new PropertyBag();
            _constraints = new PropertyBag();

            Service<IMediator>.Instance.NotifyNewSignalCreated(this);
        }
コード例 #9
0
        public override bool Equals(IValueStructure other)
        {
            ToggleValue toggleValue = other as ToggleValue;
            if(toggleValue != null)
                return Equals(toggleValue);

            return other == this;
        }
コード例 #10
0
        internal Signal(IValueStructure value)
            : base(value)
        {
            _properties  = new PropertyBag();
            _constraints = new PropertyBag();

            Service <IMediator> .Instance.NotifyNewSignalCreated(this);
        }
コード例 #11
0
        public static Signal DefineConstant(IValueStructure value)
        {
            Signal s = Binder.CreateSignal(value);

            s.Label = s.Value.ToString() + "_Constant";
            s.EnableFlag(StdAspect.ConstantFlag);
            return(s);
        }
コード例 #12
0
        public override bool Equals(object obj)
        {
            IValueStructure vs = obj as IValueStructure;

            if (vs != null)
            {
                return(Equals(vs));
            }
            return(false);
        }
コード例 #13
0
ファイル: ToggleValue.cs プロジェクト: hnjm/mathnet-yttrium
        public override bool Equals(IValueStructure other)
        {
            ToggleValue toggleValue = other as ToggleValue;

            if (toggleValue != null)
            {
                return(Equals(toggleValue));
            }

            return(other == this);
        }
コード例 #14
0
ファイル: LiteralValue.cs プロジェクト: hnjm/mathnet-yttrium
        public override bool Equals(IValueStructure other)
        {
            LiteralValue literalValue = other as LiteralValue;

            if (literalValue != null)
            {
                return(Equals(literalValue));
            }

            return(other == this);
        }
コード例 #15
0
        public override bool Equals(IValueStructure other)
        {
            VectorValue <TScalar> vectorValue = other as VectorValue <TScalar>;

            if (vectorValue != null)
            {
                return(Equals(vectorValue));
            }

            return(other == this);
        }
コード例 #16
0
        public override bool Equals(IValueStructure other)
        {
            TokenValue integerValue = other as TokenValue;

            if (integerValue != null)
            {
                return(Equals(integerValue));
            }

            return(false);
        }
コード例 #17
0
 public void ScheduleDelayedEvent(ISchedulable subject, IValueStructure value, TimeSpan delay)
 {
     if(delay < TimeSpan.Zero)
         return;
     if(delay == TimeSpan.Zero)
         ScheduleDeltaEvent(subject, value);
     else
     {
         _schedule.ScheduleDelayedEvent(subject, value, delay);
         _timeline.InsertTime(delay);
     }
 }
コード例 #18
0
        public Signal AddNamedSignal(string name, IValueStructure value)
        {
            if (_namedSignals == null)
            {
                _namedSignals = new Dictionary <string, Signal>();
            }
            Signal signal = Binder.CreateSignal(value);

            AddSignal(signal);
            signal.Label = name;
            _namedSignals.Add(name, signal);
            return(signal);
        }
コード例 #19
0
        public IAccumulator Subtract(IValueStructure operand)
        {
            object other;

            if (ValueConverter <T> .TryConvertLosslessFrom(operand, out other))
            {
                _value = _value.Subtract((T)other);
                return(this);
            }
            else
            {
                IAccumulator acc = Escalate(operand.TypeId, _value, false);
                return(acc.Subtract(operand));
            }
        }
コード例 #20
0
        private static IAccumulator Escalate <TStructure, TStructureDivision>(IValueStructure value)
            where TStructure : IAlgebraicIntegralDomain <TStructure, TStructureDivision>, IValueStructure
            where TStructureDivision : IAlgebraicIntegralDomain <TStructureDivision, TStructureDivision>, IValueStructure
        {
            object val;

            if (ValueConverter <TStructure> .TryConvertLosslessFrom(value, out val))
            {
                return(new Accumulator <TStructure, TStructureDivision>((TStructure)val));
            }
            else
            {
                throw new NotSupportedException();
            }
        }
コード例 #21
0
        public void ScheduleDelayedEvent(ISchedulable subject, IValueStructure value, TimeSpan delay)
        {
            LinkedList <SchedulerEventItem> timeline;

            if (!_delayedEvents.TryGetValue(subject.InstanceId, out timeline))
            {
                timeline = new LinkedList <SchedulerEventItem>();
                _delayedEvents.Add(subject.InstanceId, timeline);
            }

            if (timeline.Count == 0)
            {
                timeline.AddFirst(new SchedulerEventItem(subject, value, delay));
                return;
            }

            TimeSpan d = TimeSpan.Zero;
            LinkedListNode <SchedulerEventItem> node = timeline.First;

            while (true)
            {
                if (d + node.Value.TimeSpan == delay) //already there...
                {
                    TimeSpan relativeDelay = node.Value.TimeSpan;
                    RemoveAllAfterIncluding(timeline, node);
                    timeline.AddLast(new SchedulerEventItem(subject, value, relativeDelay));
                    return;
                }

                if (d + node.Value.TimeSpan > delay) //later events available
                {
                    TimeSpan relativeDelay = delay - d;
                    RemoveAllAfterIncluding(timeline, node);
                    timeline.AddLast(new SchedulerEventItem(subject, value, relativeDelay));
                    return;
                }

                if (node.Next == null) //last
                {
                    TimeSpan relativeDelay = delay - d - node.Value.TimeSpan;
                    timeline.AddLast(new SchedulerEventItem(subject, value, relativeDelay));
                    return;
                }

                d   += node.Value.TimeSpan;
                node = node.Next;
            }
        }
コード例 #22
0
 public void ScheduleDelayedEvent(ISchedulable subject, IValueStructure value, TimeSpan delay)
 {
     if (delay < TimeSpan.Zero)
     {
         return;
     }
     if (delay == TimeSpan.Zero)
     {
         ScheduleDeltaEvent(subject, value);
     }
     else
     {
         _schedule.ScheduleDelayedEvent(subject, value, delay);
         _timeline.InsertTime(delay);
     }
 }
コード例 #23
0
        public void ScheduleDelayedEvent(ISchedulable subject, IValueStructure value, TimeSpan delay)
        {
            LinkedList<SchedulerEventItem> timeline;
            if(!_delayedEvents.TryGetValue(subject.InstanceId, out timeline))
            {
                timeline = new LinkedList<SchedulerEventItem>();
                _delayedEvents.Add(subject.InstanceId, timeline);
            }

            if(timeline.Count == 0)
            {
                timeline.AddFirst(new SchedulerEventItem(subject, value, delay));
                return;
            }

            TimeSpan d = TimeSpan.Zero;
            LinkedListNode<SchedulerEventItem> node = timeline.First;

            while(true)
            {
                if(d + node.Value.TimeSpan == delay) //already there...
                {
                    TimeSpan relativeDelay = node.Value.TimeSpan;
                    RemoveAllAfterIncluding(timeline, node);
                    timeline.AddLast(new SchedulerEventItem(subject, value, relativeDelay));
                    return;
                }

                if(d + node.Value.TimeSpan > delay) //later events available
                {
                    TimeSpan relativeDelay = delay - d;
                    RemoveAllAfterIncluding(timeline, node);
                    timeline.AddLast(new SchedulerEventItem(subject, value, relativeDelay));
                    return;
                }

                if(node.Next == null) //last
                {
                    TimeSpan relativeDelay = delay - d - node.Value.TimeSpan;
                    timeline.AddLast(new SchedulerEventItem(subject, value, relativeDelay));
                    return;
                }

                d += node.Value.TimeSpan;
                node = node.Next;
            }
        }
コード例 #24
0
        public IAccumulator IntegerPower(IValueStructure operand)
        {
            object other;

            if (ValueConverter <IntegerValue> .TryConvertLosslessFrom(operand, out other))
            {
                return(IntegerPower((int)((IntegerValue)other).Value));
            }
            if (ValueConverter <RationalValue> .TryConvertLosslessFrom(operand, out other))
            {
                RationalValue rv = (RationalValue)other;
                if (rv.IsInteger)
                {
                    return(IntegerPower((int)rv.NumeratorValue));
                }
            }
            throw new NotSupportedException();
        }
コード例 #25
0
        public void UseCase_ComplexDerivedSystemAsFunction()
        {
            // TODO: Replace with new (easier to use) MathFunction class instead of MathSystem

            _p.KeepTrack = false;
            MathSystem s = _p.CurrentSystem;

            Signal x     = Binder.CreateSignal(); x.Label = "x";
            Signal x2    = StdBuilder.Square(x); x2.Label = "x2";
            Signal secx2 = StdBuilder.Secant(x2); secx2.Label = "secx2";
            Signal diff  = Std.Derive(secx2, x); diff.Label = "diff1";

            s.AddSignalTree(diff, true, true);
            s.RemoveUnusedObjects();

            Assert.AreEqual("2*sec(sqr(x))*tan(sqr(x))*x", _f.Format(diff, FormattingOptions.Compact), "Formatted Diff A");
            Assert.AreEqual(1, s.InputCount, "Input Signal Count A");
            Assert.AreEqual(1, s.OutputCount, "Output Signal Count A");
            Assert.AreEqual(0, s.BusCount, "Bus Count A");
            Assert.AreEqual(6, s.SignalCount, "Signal Count A");
            Assert.AreEqual(4, s.PortCount, "Port Count A");

            Signal diff2 = Std.AutoSimplify(diff);

            s.UnpromoteAsOutput(diff);
            s.AddSignalTree(diff2, true, true);
            s.RemoveUnusedObjects();

            Assert.AreEqual("2*sec(sqr(x))*tan(sqr(x))*x", _f.Format(diff2, FormattingOptions.Compact), "Formatted Diff B");
            Assert.AreEqual(1, s.InputCount, "Input Signal Count B");
            Assert.AreEqual(1, s.OutputCount, "Output Signal Count B");
            Assert.AreEqual(0, s.BusCount, "Bus Count B");
            Assert.AreEqual(6, s.SignalCount, "Signal Count B");
            Assert.AreEqual(4, s.PortCount, "Port Count B");

            IValueStructure vs = s.Evaluate(ComplexValue.I)[0];

            Assert.IsInstanceOfType(typeof(ComplexValue), vs, "Result is complex.");
            ComplexValue cv = (ComplexValue)vs;

            Assert.AreEqual(0, Math.Round(cv.RealValue, 4), "Real Result");
            Assert.AreEqual(-5.7649, Math.Round(cv.ImaginaryValue, 4), "Imag Result");
        }
コード例 #26
0
ファイル: Polynomial.cs プロジェクト: hnjm/mathnet-yttrium
        /// <summary>
        /// Returns the coefficient factor in the monomial <see cref="signal"/>
        /// </summary>
        /// <returns>
        /// Constant UndefinedSymbol if <see cref="signal"/> is not a single-variable monomial.
        /// Otherwise the coefficient factor of the term.
        /// </returns>
        /// </returns>
        /// <remarks><see cref="signal"/> is assumed to be automatic simplified.</remarks>
        public static Signal MonomialCoefficient(Signal signal, Signal variable, out IValueStructure degree)
        {
            if (signal == null)
            {
                throw new ArgumentNullException("signal");
            }

            if (Std.IsConstantAdditiveIdentity(signal))
            {
                degree = NegativeInfinitySymbol.Instance;
                return(signal);
            }
            if (Std.IsAlwaysRational(signal))
            {
                degree = IntegerValue.Zero;
                return(signal);
            }
            Signal coeff = IntegerValue.ConstantOne;

            if (signal.IsDrivenByPortEntity("Multiply", "Std") && signal.DrivenByPort.InputSignalCount == 2 && Std.IsAlwaysRational(signal.DrivenByPort.InputSignals[0]))
            {
                coeff  = signal.DrivenByPort.InputSignals[0];
                signal = signal.DrivenByPort.InputSignals[1];
            }
            if (signal.Equals(variable))
            {
                degree = IntegerValue.One;
                return(coeff);
            }
            if (signal.IsDrivenByPortEntity("Power", "Std"))
            {
                Signal b = signal.DrivenByPort.InputSignals[0];
                Signal e = signal.DrivenByPort.InputSignals[1];
                if (b.Equals(variable) && Std.IsAlwaysPositiveInteger(e))
                {
                    degree = e.Value;
                    return(coeff);
                }
            }
            degree = UndefinedSymbol.Instance;
            return(UndefinedSymbol.Constant);
        }
コード例 #27
0
        public IAccumulator Divide(IValueStructure operand)
        {
            object other;

            if (ValueConverter <T> .TryConvertLosslessFrom(operand, out other))
            {
                TDivision res = _value.Divide((T)other);
                if (_value is IAlgebraicDivisionExtension <T, T> )
                {
                    _value = (T)(object)res;
                    return(this);
                }
                return(Escalate <TDivision, TDivision>(res));
            }
            else
            {
                IAccumulator acc = Escalate(operand.TypeId, _value, true);
                return(acc.Divide(operand));
            }
        }
コード例 #28
0
ファイル: Polynomial.cs プロジェクト: hnjm/mathnet-yttrium
        public static Signal PolynomialLeadingCoefficient(Signal signal, Signal variable)
        {
            if (signal == null)
            {
                throw new ArgumentNullException("signal");
            }

            IValueStructure degree = PolynomialDegree(signal, variable);
            IntegerValue    iv     = degree as IntegerValue;

            if (iv != null)
            {
                return(PolynomialCoefficient(signal, variable, (int)iv.Value));
            }
            if (degree is NegativeInfinitySymbol)
            {
                return(IntegerValue.ConstantZero);
            }
            return(UndefinedSymbol.Constant);
        }
コード例 #29
0
 public abstract void PostNewValue(IValueStructure newValue);
コード例 #30
0
 protected ValueNode(IValueStructure initialValue)
 {
     _presentStructure = initialValue;
 }
コード例 #31
0
 public bool EqualsById(IValueStructure other)
 {
     return other != null && TypeId.Equals(other.TypeId);
 }
コード例 #32
0
 public StructureNotSupportedException(IValueStructure structure)
     : base()
 {
     this.structure = structure;
 }
コード例 #33
0
 public void ScheduleDelayedEvent(ISchedulable subject, IValueStructure value, TimeSpan delay)
 {
     GetCurrentScheduler().ScheduleDelayedEvent(subject, value, delay);
 }
コード例 #34
0
 public void ScheduleDelayedEvent(ISchedulable subject, IValueStructure value, TimeSpan delay)
 {
     GetCurrentScheduler().ScheduleDelayedEvent(subject, value, delay);
 }
コード例 #35
0
 public static Signal CreateSignal(IValueStructure value)
 {
     return(_cacheSignal2.GetInstance(value));
 }
コード例 #36
0
ファイル: Bus.cs プロジェクト: JackWangCUMT/mathnet-yttrium
 /// <summary>
 /// Request the scheduler to set a new value to this signal in the next delta-timestep.
 /// </summary>
 /// <remarks>The value is not set immediately. To propagate it to the <see cref="Value"/> property
 /// you need to simulate the model for at least one cycle or a time instant, by calling
 /// <see cref="Scheduler.SimulateInstant"/> or <see cref="Scheduler.SimulateFor"/>.</remarks>
 public override void PostNewValue(IValueStructure newValue)
 {
     throw new NotImplementedException();
 }
コード例 #37
0
 /// <summary>
 /// Request the scheduler to set a new value to this signal with a specified simulation-time delay.
 /// </summary>
 /// <remarks>The value is not set immediately, To propagate it to the <see cref="Value"/> property
 /// you need to simulate the model for at least at least the specified delay, by calling
 /// <see cref="Scheduler.SimulateFor"/>.</remarks>
 /// <param name="delay">The simulation-time delay.</param>
 public override void PostNewValue(IValueStructure newValue, TimeSpan delay)
 {
     Service<ISimulationMediator>.Instance.ScheduleDelayedEvent(this, newValue, delay);
 }
コード例 #38
0
 /// <summary>
 /// Request the scheduler to set a new value to this signal in the next delta-timestep.
 /// </summary>
 /// <remarks>The value is not set immediately. To propagate it to the <see cref="Value"/> property
 /// you need to simulate the model for at least one cycle or a time instant, by calling
 /// <see cref="Scheduler.SimulateInstant"/> or <see cref="Scheduler.SimulateFor"/>.</remarks>
 public override void PostNewValue(IValueStructure newValue)
 {
     Service<ISimulationMediator>.Instance.ScheduleDeltaEvent(this, newValue);
 }
コード例 #39
0
 void ISignal_BuilderAdapter.BuilderSetValue(IValueStructure structure)
 {
     SetPresentValue(structure);
 }
コード例 #40
0
        public IValueStructure[] Evaluate(params IValueStructure[] inputs)
        {
            if(inputs == null)
                throw new ArgumentNullException("inputs");

            if(inputs.Length != _inputs.Count)
                throw new System.ArgumentException("The count of inputs doesn't match the systems count of input signals.", "inputs");

            for(int i = 0; i < inputs.Length; i++)
                _inputs[i].PostNewValue(inputs[i]);

            Service<ISimulationMediator>.Instance.SimulateInstant();

            IValueStructure[] outputs = new IValueStructure[_outputs.Count];
            for(int i = 0; i < outputs.Length; i++)
                outputs[i] = _outputs[i].Value;
            return outputs;
        }
コード例 #41
0
 public abstract void PostNewValue(IValueStructure newValue, TimeSpan delay);
コード例 #42
0
 public void ScheduleDeltaEvent(ISchedulable subject, IValueStructure value)
 {
     GetCurrentScheduler().ScheduleDeltaEvent(subject, value);
 }
コード例 #43
0
ファイル: Curve.cs プロジェクト: JackWangCUMT/mathnet-yttrium
 public CurveSegment(Curve segment, TimeSpan begin, IValueStructure offset)
 {
     this.Segment = segment;
     this.Begin = begin;
     this.Offset = offset;
 }
コード例 #44
0
 public static Bus CreateBus(IValueStructure value)
 {
     return(_cacheBus2.GetInstance(value));
 }
コード例 #45
0
 public void PushInputValue(int inputIndex, IValueStructure value)
 {
     _inputs[inputIndex].PostNewValue(value);
 }
コード例 #46
0
 public void ScheduleDeltaEvent(ISchedulable subject, IValueStructure value)
 {
     GetCurrentScheduler().ScheduleDeltaEvent(subject, value);
 }
コード例 #47
0
 public void PushInputValue(int inputIndex, IValueStructure value, TimeSpan delay)
 {
     _inputs[inputIndex].PostNewValue(value, delay);
 }
コード例 #48
0
 protected StructureNotSupportedException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     structure = (IValueStructure)info.GetValue("structure", typeof(IValueStructure));
 }
コード例 #49
0
ファイル: Bus.cs プロジェクト: JackWangCUMT/mathnet-yttrium
 internal Bus(IValueStructure value)
     : base(value)
 {
     Service<IMediator>.Instance.NotifyNewBusCreated(this);
 }
コード例 #50
0
 public SchedulerEventItem(ISchedulable subject, IValueStructure value, TimeSpan timeSpan)
 {
     _subject  = subject;
     _value    = value;
     _timeSpan = timeSpan;
 }
コード例 #51
0
 protected void PublishToOutputs(IValueStructure value, TimeSpan delay)
 {
     for(int i = 0; i < outputs.Length; i++)
         outputs[i].PostNewValue(value,delay);
 }
コード例 #52
0
 protected void SetPresentValue(IValueStructure value)
 {
     //bool different = !(value == null && _presentStructure == null)
     //   && !(_presentStructure != null && value != null && _presentStructure.Equals(value));
     _presentStructure = value;
     //_properties.ValidatePropertiesAfterEvent(this);
 }
コード例 #53
0
ファイル: Std.cs プロジェクト: JackWangCUMT/mathnet-yttrium
 public static Signal DefineConstant(IValueStructure value)
 {
     Signal s = Binder.CreateSignal(value);
     s.Label = s.Value.ToString() + "_Constant";
     s.EnableFlag(StdAspect.ConstantFlag);
     return s;
 }
コード例 #54
0
 public abstract bool Equals(IValueStructure other);
コード例 #55
0
 public void ScheduleDeltaEvent(ISchedulable subject, IValueStructure value)
 {
     _deltaEvents.Push(new SchedulerEventItem(subject, value, TimeSpan.Zero));
 }
コード例 #56
0
 public SchedulerEventItem(ISchedulable subject, IValueStructure value, TimeSpan timeSpan)
 {
     _subject = subject;
     _value = value;
     _timeSpan = timeSpan;
 }
コード例 #57
0
 public Signal AddNamedSignal(string name, IValueStructure value)
 {
     if(_namedSignals == null)
         _namedSignals = new Dictionary<string, Signal>();
     Signal signal = Binder.CreateSignal(value);
     AddSignal(signal);
     signal.Label = name;
     _namedSignals.Add(name, signal);
     return signal;
 }