public PropertyRoot(Type type, MasterInfo[] masters)
 {
     Type      = type;
     Structure = new StructureHolder(type, masters);
     OnError   = Structure.OnError;
     OnError.Subscribe(x => Debugger.Log(1, "Error", "Error from Root\n"));
 }
Beispiel #2
0
        public StructProperty(Type type, PropertyFactory modelFactory)
        {
            ValueType = type;
            if (!type.IsValueType)
            {
                throw new ArgumentException("type が構造体を表す Type クラスではありません。");
            }

            StructureValue = new StructureHolder(type, modelFactory);
            Value          = new ReactiveProperty <object>(StructureValue.Value.Value, ReactivePropertyMode.RaiseLatestValueOnSubscribe);
            StructureValue.ValueChanged.Subscribe(x => Value.Value = StructureValue.Value.Value);

            StructureValue.OnError.Subscribe(x => OnErrorSubject.OnNext(x));
        }