Ejemplo n.º 1
0
        public TyonAddress RequestAddress(TyonDehydrater dehydrater)
        {
            if (GetTyonAddress() == null)
            {
                SetTyonAddress(dehydrater.GetNewInternalAddress());
            }

            return(GetTyonAddress());
        }
Ejemplo n.º 2
0
        public TyonObject(object obj, TyonDehydrater dehydrater) : this()
        {
            dehydrater.RegisterInternalObject(obj, this);

            SetTyonType(TyonType.CreateTyonType(obj.GetType()));
            SetTyonVariables(
                dehydrater.GetDesignatedVariables(obj.GetType())
                .Convert(v => new TyonVariable(v.CreateStrongInstance(obj), dehydrater))
                );
        }
Ejemplo n.º 3
0
        public override TyonValue Dehydrate(Type field_type, object value, TyonDehydrater dehydrater)
        {
            if (value.IsToStringOverridden())
            {
                if (field_type.CanHaveChildTypes())
                {
                    return(new TyonValue_Surrogate(value, dehydrater));
                }

                return(new TyonValue_String(value, dehydrater));
            }

            return(new TyonValue_Object(value, dehydrater));
        }
Ejemplo n.º 4
0
 public override TyonValue Dehydrate(Type field_type, object value, TyonDehydrater dehydrater)
 {
     return(new TyonValue_Array(field_type.GetIEnumerableType(), value, dehydrater));
 }
Ejemplo n.º 5
0
 public TyonValue_Boolean(object value, TyonDehydrater dehydrater) : this()
 {
     SetBool(value.ConvertEX <bool>());
 }
Ejemplo n.º 6
0
 public TyonValueList(Type element_type, IEnumerable <object> values, TyonDehydrater dehydrater) : this()
 {
     SetTyonValues(values.Convert(v => dehydrater.CreateTyonValue(element_type, v)));
 }
Ejemplo n.º 7
0
 public override TyonValue Dehydrate(Type field_type, object value, TyonDehydrater dehydrater)
 {
     return(new TyonValue_ExternalAddress(dehydrater.RegisterExternalObject(value), dehydrater));
 }
Ejemplo n.º 8
0
 public override TyonValue Dehydrate(Type field_type, object value, TyonDehydrater dehydrater)
 {
     return(new TyonValue_Type(value.ConvertEX <Type>(), dehydrater));
 }
Ejemplo n.º 9
0
 public TyonValue_Decimal(object value, TyonDehydrater dehydrater) : this()
 {
     SetDecimal(value.ConvertEX <decimal>());
 }
Ejemplo n.º 10
0
 public TyonValue_Type(Type type, TyonDehydrater dehydrater)
 {
     SetTyonType(TyonType.CreateTyonType(type));
 }
Ejemplo n.º 11
0
 public TyonValue_Surrogate(object value, TyonDehydrater dehydrater) : this()
 {
     SetTyonSurrogate(new TyonSurrogate(value, dehydrater));
 }
Ejemplo n.º 12
0
 public TyonValue_Float(object value, TyonDehydrater dehydrater) : this()
 {
     SetFloat(value.ConvertEX <float>());
 }
Ejemplo n.º 13
0
 public TyonValue_ExternalAddress(TyonAddress a, TyonDehydrater dehydrater) : this()
 {
     SetTyonAddress(a);
 }
Ejemplo n.º 14
0
 public TyonValue_String(object value, TyonDehydrater dehydrater) : this()
 {
     SetString(value.ToStringEX());
 }
Ejemplo n.º 15
0
 public TyonArray(Type element_type, object value, TyonDehydrater dehydrater) : this()
 {
     SetTyonType(TyonType.CreateTyonType(element_type));
     SetTyonValueList(new TyonValueList(element_type, value.ToEnumerable <object>(), dehydrater));
 }
Ejemplo n.º 16
0
 public TyonVariable(VariableInstance variable, TyonDehydrater dehydrater) : this()
 {
     SetId(variable.GetVariable().GetVariableName());
     SetTyonValue(dehydrater.CreateTyonValue(variable.GetVariableType(), variable.GetContents()));
 }
Ejemplo n.º 17
0
 public abstract TyonValue Dehydrate(Type field_type, object value, TyonDehydrater dehydrater);
Ejemplo n.º 18
0
 public TyonSurrogate(object value, TyonDehydrater dehydrater) : this()
 {
     SetTyonType(TyonType.CreateTyonType(value.GetTypeEX()));
     SetTyonValue(new TyonValue_String(value, dehydrater));
 }
Ejemplo n.º 19
0
 public TyonValue_Long(object value, TyonDehydrater dehydrater) : this()
 {
     SetLong(value.ConvertEX <long>());
 }
Ejemplo n.º 20
0
 public TyonValue_Array(Type element_type, object value, TyonDehydrater dehydrater) : this()
 {
     SetTyonArray(new TyonArray(element_type, value, dehydrater));
 }
Ejemplo n.º 21
0
        public override TyonValue Dehydrate(Type field_type, object value, TyonDehydrater dehydrater)
        {
            value = deconstruction_invokers.Fetch(value.GetType())(value);

            return(dehydrater.CreateTyonValue(value.GetTypeEX(), value));
        }
Ejemplo n.º 22
0
        public override TyonValue Dehydrate(Type field_type, object value, TyonDehydrater dehydrater)
        {
            value = Substitute(value);

            return(dehydrater.CreateTyonValue(value.GetTypeEX(), value));
        }
Ejemplo n.º 23
0
 public TyonValue_InternalAddress(TyonAddress address, TyonDehydrater dehydrater) : this()
 {
     SetTyonAddress(address);
 }
Ejemplo n.º 24
0
 public override TyonValue Dehydrate(Type field_type, object value, TyonDehydrater dehydrater)
 {
     return(new TyonValue_Decimal(value, dehydrater));
 }
Ejemplo n.º 25
0
 public TyonValue_Double(object value, TyonDehydrater dehydrater) : this()
 {
     SetDouble(value.ConvertEX <double>());
 }
Ejemplo n.º 26
0
 public TyonValue_Int(object value, TyonDehydrater dehydrater) : this()
 {
     SetInt(value.ConvertEX <int>());
 }
Ejemplo n.º 27
0
 public TyonValue_Object(object value, TyonDehydrater dehydrater) : this()
 {
     SetTyonObject(new TyonObject(value, dehydrater));
 }