public virtual void Remove(string cartId, global::haxe.lang.Function callback)
        {
                        #line 38 "/my-component/src/shoppingcart/CartRepository.hx"
            {
                                #line 38 "/my-component/src/shoppingcart/CartRepository.hx"
                int _g = 0;
                                #line 38 "/my-component/src/shoppingcart/CartRepository.hx"
                global::Array <object> _g1 = this.carts;
                                #line 38 "/my-component/src/shoppingcart/CartRepository.hx"
                while ((_g < _g1.length))
                {
                                        #line 38 "/my-component/src/shoppingcart/CartRepository.hx"
                    global::shoppingcart.CartModel cart = ((global::shoppingcart.CartModel)(_g1[_g]));
                                        #line 38 "/my-component/src/shoppingcart/CartRepository.hx"
                    ++_g;
                    if ((cart.id == cartId))
                    {
                                                #line 40 "/my-component/src/shoppingcart/CartRepository.hx"
                        this.carts.@remove(cart);
                        callback.__hx_invoke0_o();
                                                #line 42 "/my-component/src/shoppingcart/CartRepository.hx"
                        return;
                    }
                }
            }

                        #line 45 "/my-component/src/shoppingcart/CartRepository.hx"
            callback.__hx_invoke0_o();
        }
Esempio n. 2
0
        public virtual string __hx_toString()
        {
                        #line 229 "/opt/haxe/std/cs/internal/HxObject.hx"
            global::haxe.lang.Function ts = ((global::haxe.lang.Function)(global::haxe.lang.Runtime.getField(this, "toString", 946786476, false)));
            if ((ts != null))
            {
                                #line 231 "/opt/haxe/std/cs/internal/HxObject.hx"
                return(global::haxe.lang.Runtime.toString(ts.__hx_invoke0_o()));
            }

                        #line 232 "/opt/haxe/std/cs/internal/HxObject.hx"
            global::System.Text.StringBuilder ret_b = new global::System.Text.StringBuilder();
            ret_b.Append(((string)("{")));
                        #line 234 "/opt/haxe/std/cs/internal/HxObject.hx"
            bool first = true;
            {
                                #line 235 "/opt/haxe/std/cs/internal/HxObject.hx"
                int _g = 0;
                                #line 235 "/opt/haxe/std/cs/internal/HxObject.hx"
                global::Array <string> _g1 = global::Reflect.fields(this);
                                #line 235 "/opt/haxe/std/cs/internal/HxObject.hx"
                while ((_g < _g1.length))
                {
                                        #line 235 "/opt/haxe/std/cs/internal/HxObject.hx"
                    string f = _g1[_g];
                                        #line 235 "/opt/haxe/std/cs/internal/HxObject.hx"
                    ++_g;
                    if (first)
                    {
                                                #line 237 "/opt/haxe/std/cs/internal/HxObject.hx"
                        first = false;
                    }
                    else
                    {
                                                #line 239 "/opt/haxe/std/cs/internal/HxObject.hx"
                        ret_b.Append(((string)(",")));
                    }

                                        #line 240 "/opt/haxe/std/cs/internal/HxObject.hx"
                    ret_b.Append(((string)(" ")));
                    ret_b.Append(((string)(global::Std.@string(f))));
                                        #line 242 "/opt/haxe/std/cs/internal/HxObject.hx"
                    ret_b.Append(((string)(" : ")));
                    ret_b.Append(((string)(global::Std.@string(((object)(global::Reflect.field(this, f)))))));
                }
            }

                        #line 245 "/opt/haxe/std/cs/internal/HxObject.hx"
            if (!(first))
            {
                                #line 246 "/opt/haxe/std/cs/internal/HxObject.hx"
                ret_b.Append(((string)(" ")));
            }

                        #line 247 "/opt/haxe/std/cs/internal/HxObject.hx"
            ret_b.Append(((string)("}")));
            return(ret_b.ToString());
        }
Esempio n. 3
0
        public virtual string __hx_toString()
        {
                        #line 229 "C:\\HaxeToolkit\\haxe\\std\\cs\\internal\\HxObject.hx"
            global::haxe.lang.Function ts = ((global::haxe.lang.Function)(global::haxe.lang.Runtime.getField(this, "toString", 946786476, false)));
            if ((ts != null))
            {
                                #line 231 "C:\\HaxeToolkit\\haxe\\std\\cs\\internal\\HxObject.hx"
                return(global::haxe.lang.Runtime.toString(ts.__hx_invoke0_o()));
            }

                        #line 232 "C:\\HaxeToolkit\\haxe\\std\\cs\\internal\\HxObject.hx"
            global::System.Text.StringBuilder ret_b = new global::System.Text.StringBuilder();
            ret_b.Append(((string)("{")));
                        #line 234 "C:\\HaxeToolkit\\haxe\\std\\cs\\internal\\HxObject.hx"
            bool first = true;
            {
                                #line 235 "C:\\HaxeToolkit\\haxe\\std\\cs\\internal\\HxObject.hx"
                int _g = 0;
                                #line 235 "C:\\HaxeToolkit\\haxe\\std\\cs\\internal\\HxObject.hx"
                global::haxe.root.Array _g1 = global::haxe.root.Reflect.fields(this);
                                #line 235 "C:\\HaxeToolkit\\haxe\\std\\cs\\internal\\HxObject.hx"
                while ((_g < _g1.length))
                {
                                        #line 235 "C:\\HaxeToolkit\\haxe\\std\\cs\\internal\\HxObject.hx"
                    string f = global::haxe.lang.Runtime.toString(_g1.__get(_g));
                                        #line 235 "C:\\HaxeToolkit\\haxe\\std\\cs\\internal\\HxObject.hx"
                    ++_g;
                    if (first)
                    {
                                                #line 237 "C:\\HaxeToolkit\\haxe\\std\\cs\\internal\\HxObject.hx"
                        first = false;
                    }
                    else
                    {
                                                #line 239 "C:\\HaxeToolkit\\haxe\\std\\cs\\internal\\HxObject.hx"
                        ret_b.Append(((string)(",")));
                    }

                                        #line 240 "C:\\HaxeToolkit\\haxe\\std\\cs\\internal\\HxObject.hx"
                    ret_b.Append(((string)(" ")));
                    ret_b.Append(((string)(global::haxe.root.Std.@string(f))));
                                        #line 242 "C:\\HaxeToolkit\\haxe\\std\\cs\\internal\\HxObject.hx"
                    ret_b.Append(((string)(" : ")));
                    ret_b.Append(((string)(global::haxe.root.Std.@string(((object)(global::haxe.root.Reflect.field(this, f)))))));
                }
            }

                        #line 245 "C:\\HaxeToolkit\\haxe\\std\\cs\\internal\\HxObject.hx"
            if (!(first))
            {
                                #line 246 "C:\\HaxeToolkit\\haxe\\std\\cs\\internal\\HxObject.hx"
                ret_b.Append(((string)(" ")));
            }

                        #line 247 "C:\\HaxeToolkit\\haxe\\std\\cs\\internal\\HxObject.hx"
            ret_b.Append(((string)("}")));
            return(ret_b.ToString());
        }
Esempio n. 4
0
 public static object measure(global::haxe.lang.Function f, object pos)
 {
                 #line 160 "C:\\HaxeToolkit\\haxe\\std\\haxe\\Timer.hx"
     double t0 = global::haxe.root.Sys.time();
     object r  = ((object)(f.__hx_invoke0_o()));
                 #line 162 "C:\\HaxeToolkit\\haxe\\std\\haxe\\Timer.hx"
     global::haxe.Log.trace.__hx_invoke2_o(default(double), global::haxe.lang.Runtime.concat(global::haxe.lang.Runtime.toString((global::haxe.root.Sys.time() - t0)), "s"), default(double), pos);
     return(r);
 }
Esempio n. 5
0
        public virtual string toString()
        {
            unchecked
            {
                global::haxe.lang.Function ts = ((global::haxe.lang.Function)(global::haxe.lang.Runtime.getField(this, "toString", 946786476, false)));
                if ((ts != default(global::haxe.lang.Function)))
                {
                    return(global::haxe.lang.Runtime.toString(ts.__hx_invoke0_o()));
                }

                global::haxe.root.StringBuf ret = new global::haxe.root.StringBuf();
                ret.b.Append(((object)("{")));
                bool first = true;
                {
                    int _g = 0;
                    global::haxe.root.Array <object> _g1 = global::haxe.root.Reflect.fields(this);
                    while ((_g < _g1.length))
                    {
                        string f = global::haxe.lang.Runtime.toString(_g1[_g]);
                        ++_g;
                        if (first)
                        {
                            first = false;
                        }
                        else
                        {
                            ret.b.Append(((object)(",")));
                        }

                        ret.b.Append(((object)(" ")));
                        ret.b.Append(((object)(global::Std.@string(f))));
                        ret.b.Append(((object)(" : ")));
                        {
                            object x = global::haxe.root.Reflect.field(this, f);
                            ret.b.Append(((object)(global::Std.@string(x))));
                        }
                    }
                }

                if (!(first))
                {
                    ret.b.Append(((object)(" ")));
                }

                ret.b.Append(((object)("}")));
                return(ret.toString());
            }
        }
Esempio n. 6
0
 public virtual void raiseRenderFinished()
 {
     unchecked
     {
         int _g = 0;
         global::haxe.root.Array <object> _g1 = this._renderFinishedListeners;
         while ((_g < _g1.length))
         {
             global::haxe.lang.Function l = ((global::haxe.lang.Function)(_g1[_g]));
             ++_g;
             if ((l != default(global::haxe.lang.Function)))
             {
                 l.__hx_invoke0_o();
             }
         }
     }
 }
Esempio n. 7
0
        public virtual string toString()
        {
            global::haxe.lang.Function ts = ((global::haxe.lang.Function)(global::haxe.lang.Runtime.getField(this, "toString", 946786476, false)));
            if ((ts != null))
            {
                return(global::haxe.lang.Runtime.toString(ts.__hx_invoke0_o()));
            }

            global::System.Text.StringBuilder ret_b = new global::System.Text.StringBuilder();
            ret_b.Append(((string)("{")));
            bool first = true;

            {
                int _g = 0;
                global::Array <object> _g1 = global::Reflect.fields(this);
                while ((_g < _g1.length))
                {
                    string f = global::haxe.lang.Runtime.toString(_g1[_g]);
                    ++_g;
                    if (first)
                    {
                        first = false;
                    }
                    else
                    {
                        ret_b.Append(((string)(",")));
                    }

                    ret_b.Append(((string)(" ")));
                    ret_b.Append(((string)(global::Std.@string(f))));
                    ret_b.Append(((string)(" : ")));
                    ret_b.Append(((string)(global::Std.@string(((object)(global::Reflect.field(this, f)))))));
                }
            }

            if (!(first))
            {
                ret_b.Append(((string)(" ")));
            }

            ret_b.Append(((string)("}")));
            return(ret_b.ToString());
        }
 public virtual void Remove(string cartId, int idx, global::haxe.lang.Function callback)
 {
                 #line 50 "/my-component/src/shoppingcart/ItemRepository.hx"
     ((global::Array <object>)(global::Array <object> .__hx_cast <object>(((global::Array)((((global::haxe.ds.StringMap <object>)(global::haxe.ds.StringMap <object> .__hx_cast <object>(((global::haxe.ds.StringMap)(((global::haxe.IMap <string, object>)(this.items))))))).@get(cartId)).@value)))))[idx] = null;
     callback.__hx_invoke0_o();
 }
 public virtual void Edit(global::shoppingcart.ItemModel item, global::haxe.lang.Function callback)
 {
                 #line 45 "/my-component/src/shoppingcart/ItemRepository.hx"
     ((global::Array <object>)(global::Array <object> .__hx_cast <object>(((global::Array)((((global::haxe.ds.StringMap <object>)(global::haxe.ds.StringMap <object> .__hx_cast <object>(((global::haxe.ds.StringMap)(((global::haxe.IMap <string, object>)(this.items))))))).@get(item.cartId)).@value)))))[item.idx] = item;
     callback.__hx_invoke0_o();
 }