Example #1
0
        //Must be PropertyInfo for PropertyInfo .Get[Get/Set]Method ()
        private void Init(object lockstepObject, PropertyInfo info, LockstepAttribute attribute)
        {
            this.Info           = info;
            this.LockstepObject = lockstepObject;

            //For the Value property... easier accessbility
            //_getValue = (Func<object>)Delegate.CreateDelegate(typeof(Func<object>), info.GetGetMethod().);

            if (DoReset = attribute.DoReset)
            {
                // _setValue = (Action<object>)Delegate.CreateDelegate(typeof(Action<object>), info.GetSetMethod());
                //Sets the base value for resetting
                this._baseValue = this.Value;
            }
        }
Example #2
0
 public LSVariable(object lockstepObject, PropertyInfo info, LockstepAttribute attribute)
 {
     Init(lockstepObject, info, attribute);
 }