Beispiel #1
0
 public static global::haxe.root.Date date(global::haxe.root.Date earliest, global::haxe.root.Date latest)
 {
                 #line 47 "C:\\HaxeToolkit\\haxe\\lib\\random\\1,4,1\\src\\Random.hx"
     double @from = (((double)(((long)((((long)(global::System.TimeZone.CurrentTimeZone.ToUniversalTime(((global::System.DateTime)(earliest.date))).Ticks)) - ((long)(global::haxe.root.Date.epochTicks))))))) / ((double)(global::System.TimeSpan.TicksPerMillisecond)));
                 #line 47 "C:\\HaxeToolkit\\haxe\\lib\\random\\1,4,1\\src\\Random.hx"
     double t = (@from + ((((((double)(((long)((((long)(global::System.TimeZone.CurrentTimeZone.ToUniversalTime(((global::System.DateTime)(latest.date))).Ticks)) - ((long)(global::haxe.root.Date.epochTicks))))))) / ((double)(global::System.TimeSpan.TicksPerMillisecond))) - @from)) * global::haxe.root.Math.rand.NextDouble()));
                 #line 47 "C:\\HaxeToolkit\\haxe\\lib\\random\\1,4,1\\src\\Random.hx"
     return(new global::haxe.root.Date(((global::System.DateTime)(global::System.TimeZone.CurrentTimeZone.ToLocalTime(((global::System.DateTime)(new global::System.DateTime(((long)((((long)((t * ((double)(global::System.TimeSpan.TicksPerMillisecond))))) + ((long)(global::haxe.root.Date.epochTicks)))))))))))));
 }
Beispiel #2
0
 protected static void __hx_ctor__Date(global::haxe.root.Date __hx_this, global::System.DateTime native)
 {
                 #line 47 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Date.hx"
     if ((native.Kind == global::System.DateTimeKind.Utc))
     {
                         #line 48 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Date.hx"
         __hx_this.dateUTC = native;
         __hx_this.date    = __hx_this.dateUTC.ToLocalTime();
     }
     else
     {
                         #line 51 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Date.hx"
         __hx_this.date    = native;
         __hx_this.dateUTC = __hx_this.date.ToUniversalTime();
     }
 }
Beispiel #3
0
 public static object stat(string path)
 {
                 #line 42 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\sys\\FileSystem.hx"
     if (global::System.IO.File.Exists(((string)(path))))
     {
                         #line 43 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\sys\\FileSystem.hx"
         global::System.IO.FileInfo fi = new global::System.IO.FileInfo(path);
                         #line 47 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\sys\\FileSystem.hx"
         global::haxe.root.Date tmp  = new global::haxe.root.Date(((global::System.DateTime)((fi as global::System.IO.FileSystemInfo).LastAccessTime)));
         global::haxe.root.Date tmp1 = new global::haxe.root.Date(((global::System.DateTime)((fi as global::System.IO.FileSystemInfo).LastWriteTime)));
                         #line 49 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\sys\\FileSystem.hx"
         global::haxe.root.Date tmp2 = new global::haxe.root.Date(((global::System.DateTime)((fi as global::System.IO.FileSystemInfo).CreationTime)));
                         #line 44 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\sys\\FileSystem.hx"
         {
                                 #line 50 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\sys\\FileSystem.hx"
             int __temp_odecl1 = ((int)(fi.Length));
                                 #line 44 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\sys\\FileSystem.hx"
             return(new global::haxe.lang.DynamicObject(new int[] { 262801146, 651890926, 1302870512 }, new object[] { tmp1, tmp, tmp2 }, new int[] { 4995541, 5145602, 5246186, 5841808, 499574632, 1214305123, 1269206179, 1280549057 }, new double[] { ((double)(0)), ((double)(0)), ((double)(0)), ((double)(0)), ((double)(0)), ((double)(0)), ((double)(0)), ((double)(__temp_odecl1)) }));
         }
     }
     else if (global::System.IO.Directory.Exists(((string)(path))))
     {
                         #line 58 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\sys\\FileSystem.hx"
         global::System.IO.DirectoryInfo fi1 = new global::System.IO.DirectoryInfo(path);
                         #line 62 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\sys\\FileSystem.hx"
         global::haxe.root.Date tmp3 = new global::haxe.root.Date(((global::System.DateTime)((fi1 as global::System.IO.FileSystemInfo).LastAccessTime)));
         global::haxe.root.Date tmp4 = new global::haxe.root.Date(((global::System.DateTime)((fi1 as global::System.IO.FileSystemInfo).LastWriteTime)));
                         #line 59 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\sys\\FileSystem.hx"
         {
                                 #line 64 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\sys\\FileSystem.hx"
             global::haxe.root.Date __temp_odecl2 = new global::haxe.root.Date(((global::System.DateTime)((fi1 as global::System.IO.FileSystemInfo).CreationTime)));
                                 #line 59 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\sys\\FileSystem.hx"
             return(new global::haxe.lang.DynamicObject(new int[] { 262801146, 651890926, 1302870512 }, new object[] { tmp4, tmp3, __temp_odecl2 }, new int[] { 4995541, 5145602, 5246186, 5841808, 499574632, 1214305123, 1269206179, 1280549057 }, new double[] { ((double)(0)), ((double)(0)), ((double)(0)), ((double)(0)), ((double)(0)), ((double)(0)), ((double)(0)), ((double)(0)) }));
         }
     }
     else
     {
                         #line 73 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\sys\\FileSystem.hx"
         throw global::haxe.lang.HaxeException.wrap(global::haxe.lang.Runtime.concat(global::haxe.lang.Runtime.concat("Path \'", path), "\' doesn\'t exist"));
     }
 }
Beispiel #4
0
        public virtual void waitForRead()
        {
            unchecked {
                                #line 126 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\sys\\net\\Socket.hx"
                global::haxe.root.Date _this = new global::haxe.root.Date(((global::System.DateTime)(global::System.DateTime.Now)));
                                #line 126 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\sys\\net\\Socket.hx"
                double end = ((((double)(((long)((((long)(global::System.TimeZone.CurrentTimeZone.ToUniversalTime(((global::System.DateTime)(_this.date))).Ticks)) - ((long)(global::haxe.root.Date.epochTicks))))))) / ((double)(global::System.TimeSpan.TicksPerMillisecond))) + ((((this.sock.ReceiveTimeout <= 0)) ? (global::haxe.root.Math.POSITIVE_INFINITY) : (((double)(this.sock.ReceiveTimeout))))));
                while (true)
                {
                                        #line 127 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\sys\\net\\Socket.hx"
                    bool tmp = default(bool);
                                        #line 127 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\sys\\net\\Socket.hx"
                    if ((this.sock.Available == 0))
                    {
                                                #line 127 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\sys\\net\\Socket.hx"
                        global::haxe.root.Date _this1 = new global::haxe.root.Date(((global::System.DateTime)(global::System.DateTime.Now)));
                                                #line 127 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\sys\\net\\Socket.hx"
                        tmp = ((((double)(((long)((((long)(global::System.TimeZone.CurrentTimeZone.ToUniversalTime(((global::System.DateTime)(_this1.date))).Ticks)) - ((long)(global::haxe.root.Date.epochTicks))))))) / ((double)(global::System.TimeSpan.TicksPerMillisecond))) < end);
                    }
                    else
                    {
                                                #line 127 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\sys\\net\\Socket.hx"
                        tmp = false;
                    }

                                        #line 127 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\sys\\net\\Socket.hx"
                    if (!(tmp))
                    {
                                                #line 127 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\sys\\net\\Socket.hx"
                        break;
                    }

                                        #line 128 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\sys\\net\\Socket.hx"
                    global::System.Threading.Thread.Sleep(((int)(5)));
                }
            }
                        #line default
        }
Beispiel #5
0
        protected static void __hx_ctor__Date(global::haxe.root.Date __hx_this, int year, int month, int day, int hour, int min, int sec)
        {
            unchecked {
                                #line 38 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Date.hx"
                if ((day <= 0))
                {
                                        #line 39 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Date.hx"
                    day = 1;
                }

                                #line 40 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Date.hx"
                if ((year <= 0))
                {
                                        #line 41 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Date.hx"
                    year = 1;
                }

                                #line 42 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Date.hx"
                __hx_this.date    = new global::System.DateTime(((int)(year)), ((int)((month + 1))), ((int)(day)), ((int)(hour)), ((int)(min)), ((int)(sec)), ((global::System.DateTimeKind)(global::System.DateTimeKind.Local)));
                __hx_this.dateUTC = __hx_this.date.ToUniversalTime();
            }
                        #line default
        }
Beispiel #6
0
        public virtual void write(object k, object v)
        {
            unchecked {
                                #line 82 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                if ((this.replacer != null))
                {
                                        #line 83 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                    v = ((object)(this.replacer.__hx_invoke2_o(default(double), k, default(double), v)));
                }

                                #line 84 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                {
                                        #line 84 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                    global::haxe.root.ValueType _g = global::haxe.root.Type.@typeof(v);
                                        #line 84 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                    switch (_g._hx_index)
                    {
                    case 0:
                    {
                                                        #line 136 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                        this.buf.b.Append(((string)("null")));
                                                        #line 136 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                        break;
                    }


                    case 1:
                    {
                                                        #line 90 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                        this.buf.b.Append(((string)(global::haxe.root.Std.@string(global::haxe.lang.Runtime.toString(v)))));
                                                        #line 90 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                        break;
                    }


                    case 2:
                    {
                                                        #line 92 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                        double f = ((double)(global::haxe.lang.Runtime.toDouble(v)));
                                                        #line 92 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                        string v1 = (((!(global::System.Double.IsInfinity(((double)(f)))) && !(global::System.Double.IsNaN(((double)(f)))))) ? (global::haxe.root.Std.@string(v)) : ("null"));
                                                        #line 92 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                        this.buf.b.Append(((string)(global::haxe.root.Std.@string(v1))));
                                                        #line 92 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                        break;
                    }


                    case 3:
                    {
                                                        #line 134 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                        this.buf.b.Append(((string)(global::haxe.root.Std.@string(global::haxe.lang.Runtime.toString(v)))));
                                                        #line 134 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                        break;
                    }


                    case 4:
                    {
                                                        #line 88 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                        this.fieldsString(v, global::haxe.root.Reflect.fields(v));
                                                        #line 88 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                        break;
                    }


                    case 5:
                    {
                                                        #line 94 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                        this.buf.b.Append(((string)("\"<fun>\"")));
                                                        #line 94 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                        break;
                    }


                    case 6:
                    {
                                                        #line 95 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                        global::System.Type c = (_g as global::haxe.root.ValueType_TClass).c;
                        if (global::haxe.lang.Runtime.refEq(c, typeof(string)))
                        {
                                                                #line 97 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                            this.quote(global::haxe.lang.Runtime.toString(v));
                        }
                        else if (global::haxe.lang.Runtime.refEq(c, typeof(global::haxe.root.Array)))
                        {
                                                                #line 99 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                            global::haxe.root.Array v2 = ((global::haxe.root.Array)(v));
                            this.buf.addChar(91);
                                                                #line 102 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                            int len  = v2.length;
                            int last = (len - 1);
                                                                #line 104 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                            {
                                                                        #line 104 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                                int _g1 = 0;
                                                                        #line 104 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                                int _g11 = len;
                                                                        #line 104 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                                while ((_g1 < _g11))
                                {
                                                                                #line 104 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                                    int i = _g1++;
                                    if ((i > 0))
                                    {
                                                                                        #line 106 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                                        this.buf.addChar(44);
                                    }
                                    else
                                    {
                                                                                        #line 108 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                                        this.nind++;
                                    }

                                                                                #line 109 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                                    if (this.pretty)
                                    {
                                                                                        #line 109 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                                        this.buf.addChar(10);
                                    }

                                                                                #line 110 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                                    if (this.pretty)
                                    {
                                                                                        #line 110 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                                        string v3 = global::haxe.root.StringTools.lpad("", this.indent, (this.nind * this.indent.Length));
                                                                                        #line 110 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                                        this.buf.b.Append(((string)(global::haxe.root.Std.@string(v3))));
                                    }

                                                                                #line 111 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                                    this.write(i, v2.__get(i));
                                    if ((i == last))
                                    {
                                                                                        #line 113 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                                        this.nind--;
                                        if (this.pretty)
                                        {
                                                                                                #line 114 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                                            this.buf.addChar(10);
                                        }

                                                                                        #line 115 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                                        if (this.pretty)
                                        {
                                                                                                #line 115 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                                            string v4 = global::haxe.root.StringTools.lpad("", this.indent, (this.nind * this.indent.Length));
                                                                                                #line 115 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                                            this.buf.b.Append(((string)(global::haxe.root.Std.@string(v4))));
                                        }
                                    }
                                }
                            }

                                                                #line 118 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                            this.buf.addChar(93);
                        }
                        else if (global::haxe.lang.Runtime.refEq(c, typeof(global::haxe.ds.StringMap)))
                        {
                                                                #line 120 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                            global::haxe.ds.StringMap v5 = ((global::haxe.ds.StringMap)(v));
                            object o = new global::haxe.lang.DynamicObject(new int[] {}, new object[] {}, new int[] {}, new double[] {});
                                                                #line 122 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                            {
                                                                        #line 122 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                                object k1 = ((object)(new global::haxe.ds._StringMap.StringMapKeyIterator(((global::haxe.ds.StringMap)(v5)))));
                                                                        #line 122 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                                while (global::haxe.lang.Runtime.toBool(global::haxe.lang.Runtime.callField(k1, "hasNext", 407283053, null)))
                                {
                                                                                #line 122 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                                    string k2 = global::haxe.lang.Runtime.toString(global::haxe.lang.Runtime.callField(k1, "next", 1224901875, null));
                                    global::haxe.root.Reflect.setField(o, k2, v5.@get(((string)(k2))));
                                }
                            }

                                                                #line 124 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                            {
                                                                        #line 124 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                                object v6 = ((object)(o));
                                                                        #line 124 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                                this.fieldsString(v6, global::haxe.root.Reflect.fields(v6));
                            }
                        }
                        else if (global::haxe.lang.Runtime.refEq(c, typeof(global::haxe.root.Date)))
                        {
                                                                #line 126 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                            global::haxe.root.Date v7 = ((global::haxe.root.Date)(v));
                            this.quote(v7.toString());
                        }
                        else
                        {
                                                                #line 129 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                            this.classString(v);
                        }

                                                        #line 95 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                        break;
                    }


                    case 7:
                    {
                                                        #line 130 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                        global::System.Type _g12 = (_g as global::haxe.root.ValueType_TEnum).e;
                                                        #line 130 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                        {
                                                                #line 131 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                            object i1 = global::haxe.root.Type.enumIndex(v);
                            this.buf.b.Append(((string)(global::haxe.root.Std.@string(global::haxe.lang.Runtime.toString(i1)))));
                        }

                                                        #line 130 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                        break;
                    }


                    case 8:
                    {
                                                        #line 86 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                        this.buf.b.Append(((string)("\"???\"")));
                                                        #line 86 "C:\\HaxeToolkit\\haxe\\std\\haxe\\format\\JsonPrinter.hx"
                        break;
                    }
                    }
                }
            }
                        #line default
        }