[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/r2d2m/ClearScript/master/ClearScript/ScriptObject.cs [Back]  [Original]

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.

using System.Collections.Generic;
using System.Dynamic;

namespace Microsoft.ClearScript
{
    /// 
    /// Provides the base implementation for all script objects.
    /// 
    public abstract class ScriptObject : DynamicObject, IScriptObject
    {
        internal ScriptObject()
        {
        }

        #region IScriptObject implementation

        /// 
        public abstract ScriptEngine Engine { get; }

        /// 
        public abstract object GetProperty(string name, params object[] args);

        /// 
        public abstract void SetProperty(string name, params object[] args);

        /// 
        public abstract bool DeleteProperty(string name);

        /// 
        public abstract IEnumerable PropertyNames { get; }

        /// 
        public abstract object this[string name, params object[] args] { get; set; }

        /// 
        public abstract object GetProperty(int index);

        /// 
        public abstract void SetProperty(int index, object value);

        /// 
        public abstract bool DeleteProperty(int index);

        /// 
        public abstract IEnumerable PropertyIndices { get; }

        /// 
        public abstract object this[int index] { get; set; }

        /// 
        public abstract object Invoke(bool asConstructor, params object[] args);

        /// 
        public abstract object InvokeMethod(string name, params object[] args);

        /// 
        public object InvokeAsFunction(params object[] args)
        {
            return Invoke(false, args);
        }

        #endregion

        #region IDisposable implementation

        /// 
        public abstract void Dispose();

        #endregion
    }
}

Web Proxy Viewer  |  New URL  |  Original Page