Пример #1
0
        private void JavascriptColectionChanged(IJavascriptObject[] arguments)
        {
            var values           = arguments[1].GetArrayElements();
            var types            = arguments[2].GetArrayElements();
            var indexes          = arguments[3].GetArrayElements();
            var collectionChange = new JavascriptCollectionChanges(arguments[0], values.Zip(types, indexes, (v, t, i) => new IndividualJavascriptCollectionChange(t.GetStringValue() == "added" ? CollectionChangeType.Add : CollectionChangeType.Remove, i.GetIntValue(), v)));

            _Observer.OnJavaScriptCollectionChanges(collectionChange);
        }
Пример #2
0
        private void JavascriptColectionChanged(IJavascriptObject collectionArg, IJavascriptObject valuesArg, IJavascriptObject typesArg, IJavascriptObject indexesArg)
        {
            var values           = valuesArg.GetArrayElements();
            var types            = typesArg.GetArrayElements();
            var indexes          = indexesArg.GetArrayElements();
            var collectionChange = new JavascriptCollectionChanges(collectionArg, values.Zip(types, indexes, (v, t, i) => new IndividualJavascriptCollectionChange(t.GetStringValue() == "added" ? CollectionChangeType.Add : CollectionChangeType.Remove, i.GetIntValue(), v)));

            _Observer.OnJavaScriptCollectionChanges(collectionChange);
        }