protected override bool LocalComputeJavascriptValue(IJavascriptObjectFactory factory)
 {
     if (JSValue!=null)
         return false;
 
     JSValue = factory.CreateArray(Items.Count);
     return true;
 }
Exemple #2
0
        protected override bool LocalComputeJavascriptValue(IJavascriptObjectFactory factory)
        {
            if (JSValue != null)
            {
                return(false);
            }

            JSValue = factory.CreateArray(Items.Count);
            return(true);
        }
Exemple #3
0
        protected override bool LocalComputeJavascriptValue(IJavascriptObjectFactory factory, IJavascriptViewModelUpdater updater)
        {
            if (JSValue != null)
            {
                return(false);
            }

            _ViewModelUpdater = updater;
            JSValue           = factory.CreateArray(Items.Count);
            return(true);
        }
        void IJavascriptObjectBuilder.RequestArrayCreation(IList <IJSCSGlue> children)
        {
            var value = _Factory.CreateArray(children?.Count ?? 0);

            SetValue(value);

            if (children != null)
            {
                _AfterChildrenUpdates = () => children.ForEach((child, index) => value.SetValue(index, child.JSValue));
            }
        }
Exemple #5
0
        void IJavascriptObjectBuilder.RequestArrayCreation(IReadOnlyList <IJsCsGlue> children)
        {
            var value = _Factory.CreateArray(children?.Count ?? 0);

            SetJsValue(value);

            if (children == null)
            {
                return;
            }

            _AfterChildrenUpdates = () =>
            {
                for (var index = 0; index < children.Count; index++)
                {
                    value.SetValue(index, children[index].JsValue);
                }
            };
        }