Exemple #1
0
        public object AsObject()
        {
            switch (TypeCode)
            {
            case ElaTypeCode.Boolean: return(I4 == 1);

            case ElaTypeCode.Char: return((Char)I4);

            case ElaTypeCode.Double: return(Ref.AsDouble());

            case ElaTypeCode.Integer: return(I4);

            case ElaTypeCode.Long: return(Ref.AsLong());

            case ElaTypeCode.Single: return(DirectGetSingle());

            case ElaTypeCode.String: return(DirectGetString());

            case ElaTypeCode.Unit: return(null);

            case ElaTypeCode.Lazy:
                return(Ref.Force(this, ElaObject.DummyContext).Ref);

            default:
                return(Ref);
            }
        }