Exemplo n.º 1
0
            public override object EnsureObject(Context ctx, object instance)
            {
                var runtime_fields = ContainingType.EnsureRuntimeFields(instance);

                // (instance)._runtime_fields[_name]
                return(runtime_fields.EnsureItemObject(_name));
            }
Exemplo n.º 2
0
            public override IPhpArray EnsureArray(Context ctx, object instance)
            {
                var runtime_fields = ContainingType.EnsureRuntimeFields(instance);

                if (runtime_fields == null)
                {
                    throw new NotSupportedException();
                }

                // (instance)._runtime_fields[_name]
                return(runtime_fields.EnsureItemArray(_name));
            }
Exemplo n.º 3
0
            public override void SetValue(Context ctx, object instance, PhpValue value)
            {
                var runtime_fields = ContainingType.EnsureRuntimeFields(instance);

                if (value.IsAlias)
                {
                    runtime_fields[_name] = value;
                }
                else
                {
                    runtime_fields.SetItemValue(_name, value);
                }
            }
Exemplo n.º 4
0
            public override void SetValue(Context ctx, object instance, PhpValue value)
            {
                var runtime_fields = ContainingType.EnsureRuntimeFields(instance);

                if (runtime_fields == null)
                {
                    throw new NotSupportedException();
                }

                if (value.IsAlias)
                {
                    runtime_fields[_name] = value;
                }
                else
                {
                    runtime_fields.SetItemValue(_name, value);
                }
            }