コード例 #1
0
        public virtual __Type[] GetTypes()
        {
            var t = this.__Value.Types;
            var x = new __Type[t.Length];

            for (int i = 0; i < t.Length; i++)
            {
                var constructor = global::ScriptCoreLibAppJet.JavaScript.Runtime.Expando.Of(t[i]);

                var p = new __RuntimeTypeHandle
                {
                    Value = (IntPtr)(object)constructor.prototype
                };

                x[i] = new __Type
                {
                    TypeHandle = p
                };
            }

            return x;
        }
コード例 #2
0
		// Edit And Continue, while on pause, can add a new type to the assembly.
		public virtual __Type[] GetTypes()
		{
			// how would it help if we were to add a new type during debug?
			// the server would need to notify the client of a new type!

			// X:\jsc.svn\examples\javascript\test\TestEditAndContinueWithColor\TestEditAndContinueWithColor\Application.cs

			// would a sub application, running in an iframe
			// be able to merge with the host applicationa and switch to it?
			// only if the corelib is the same?
			// its like downloading a secondary app from the server
			// like chrome extension tab injection?

			var t = this.__Value.Types;
			var x = new __Type[t.Length];

			for (int i = 0; i < t.Length; i++)
			{
				var constructor = global::ScriptCoreLib.JavaScript.Runtime.Expando.Of(t[i]);

				var p = new __RuntimeTypeHandle
				{
					Value = (IntPtr)(object)constructor.prototype
				};

				x[i] = new __Type
				{
					TypeHandle = p
				};
			}

			return x;
		}