Пример #1
0
        public static IEnumerable <T> Select <T>(this ScriptCoreLib.JavaScript.DOM.HTML.IHTMLElement.HTMLElementEnum className, Func <ScriptCoreLib.JavaScript.DOM.HTML.IHTMLElement, T> selector)
        {
            // X:\jsc.svn\examples\javascript\Test\RemoveByQuerySelectorAll\RemoveByQuerySelectorAll\Application.cs



            return(System.Linq.Enumerable.Select(className.AsEnumerable(), selector));
        }
Пример #2
0
        // script: error JSC1000: No implementation found for this native method, please implement [static ScriptCoreLib.JavaScript.DOM.HTML.HTMLElementEnumExtensions.AsEnumerable(ScriptCoreLib.JavaScript.DOM.HTML.IHTMLElement+HTMLElementEnum)]

        //public static IHTMLElement[] querySelectorAll(this ScriptCoreLib.JavaScript.DOM.HTML.IHTMLElement.HTMLElementEnum selectors)
        // jsc eXperience naming
        public static IEnumerable <IHTMLElement> AsEnumerable(this ScriptCoreLib.JavaScript.DOM.HTML.IHTMLElement.HTMLElementEnum selectors)
        {
            var s = selectors;

            // X:\jsc.svn\examples\javascript\Test\RemoveByQuerySelectorAll\RemoveByQuerySelectorAll\Application.cs
            #region fixup
            if ((int)selectors == (int)ScriptCoreLib.JavaScript.DOM.HTML.IHTMLElement.HTMLElementEnum.button)
            {
                s = ScriptCoreLib.JavaScript.DOM.HTML.IHTMLElement.HTMLElementEnum.button;
            }

            if ((int)selectors == (int)ScriptCoreLib.JavaScript.DOM.HTML.IHTMLElement.HTMLElementEnum.p)
            {
                s = ScriptCoreLib.JavaScript.DOM.HTML.IHTMLElement.HTMLElementEnum.p;
            }
            #endregion

            var a = System.Linq.Enumerable.AsEnumerable(
                Native.document.documentElement.querySelectorAll(s)
                );

            return(a);
        }
Пример #3
0
        public static IEnumerable <ScriptCoreLib.JavaScript.DOM.HTML.IHTMLElement> Where(this ScriptCoreLib.JavaScript.DOM.HTML.IHTMLElement.HTMLElementEnum className, Func <ScriptCoreLib.JavaScript.DOM.HTML.IHTMLElement, bool> f)
        {
            // Error	2	The type of the expression in the where clause is incorrect.  Type inference failed in the call to 'Where'.	X:\jsc.svn\examples\javascript\Test\RemoveByQuerySelectorAll\RemoveByQuerySelectorAll\Application.cs	51	25	RemoveByQuerySelectorAll
            // X:\jsc.svn\examples\javascript\Test\RemoveByQuerySelectorAll\RemoveByQuerySelectorAll\Application.cs



            //            ---------------------------
            //Asset Compiler
            //---------------------------
            //The Asset Compiler has found a few issues while preparing the assets!

            //Method 'InternalAsNode' in type 'ScriptCoreLib.Ultra.Components.HTML.Images.FromAssets.JSCSolutionsNETImageOnWhite' from assembly 'ScriptCoreLib.Ultra.Components, Version=4.5.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.

            //Please fix the issues and try again!
            //You may need to reconnect your external drive.

            //X:\jsc.svn\examples\javascript\Test\RemoveByQuerySelectorAll\RemoveByQuerySelectorAll\RemoveByQuerySelectorAll.csproj
            //---------------------------
            //OK
            //---------------------------



            return(System.Linq.Enumerable.Where(className.AsEnumerable(), f));
        }