コード例 #1
0
ファイル: Library.cs プロジェクト: SchwarzerLoewe/OpenIDE
        public void Apply(WindowsScriptEngine wse)
        {
            foreach (var item in Sources)
            {
                var src = new StreamReader(item.Value);

                if (item.Key.EndsWith(".js"))
                {
                    wse.Execute(src.ReadToEnd());
                }
            }
        }
コード例 #2
0
        public void Apply(WindowsScriptEngine wse)
        {
            foreach (var item in Sources)
            {
                var src = new StreamReader(item.Value);

                if (item.Key.EndsWith(".js"))
                {
                    wse.Execute(src.ReadToEnd());
                }
            }
        }
コード例 #3
0
        public void Dispose()
        {
            Events.Fire("OnDispose");

            Dependencies     = null;
            Filename         = null;
            Icons            = null;
            Info             = null;
            ItemTemplates    = null;
            ProjectTemplates = null;
            Properties       = null;
            _engine          = null;
        }
コード例 #4
0
ファイル: Plugin.cs プロジェクト: jwoff78/OpenIDE
 public void Dispose()
 {
     Dependencies     = null;
     Filename         = null;
     Highlightings    = null;
     Icons            = null;
     Info             = null;
     ItemTemplates    = null;
     Language         = null;
     ProjectTemplates = null;
     Properties       = null;
     _engine          = null;
 }
コード例 #5
0
        public static object Wrap(WindowsScriptEngine engine, object obj)
        {
            Debug.Assert(!(obj is IScriptMarshalWrapper));

            if (obj == null)
            {
                return(null);
            }

            var expando = obj as IExpando;

            if ((expando != null) && (obj.GetType().IsCOMObject))
            {
                return(new WindowsScriptItem(engine, expando));
            }

            return(obj);
        }
コード例 #6
0
 public static void Require(WindowsScriptEngine se, Assembly ass)
 {
     Type[] types = ass.GetTypes();
     foreach (Type type in types)
     {
         object[] ca = type.GetCustomAttributes(typeof(ModuleAttribute), false);
         if (ca != null)
         {
             foreach (MethodInfo method in type.GetMethods())
             {
                 se.AddHostObject(method.Name, Delegate.CreateDelegate(type, method));
             }
         }
         else
         {
             se.AddHostType(type.Name, type);
         }
     }
 }
コード例 #7
0
ファイル: Library.cs プロジェクト: MyvarHD/OpenIDE
        public void Apply(WindowsScriptEngine wse, string Language)
        {
            foreach (var item in Sources)
            {
                var src = new StreamReader(item.Value);

                if(Language == "JavaScript")
                {
                    if(item.Key.EndsWith(".js"))
                    {
                        wse.Execute(src.ReadToEnd());
                    }
                }
                else
                {
                    if (item.Key.EndsWith(".vbs"))
                    {
                        wse.Execute(src.ReadToEnd());
                    }
                }
            }
        }
コード例 #8
0
        public void Apply(WindowsScriptEngine wse, string Language)
        {
            foreach (var item in Sources)
            {
                var src = new StreamReader(item.Value);

                if (Language == "JavaScript")
                {
                    if (item.Key.EndsWith(".js"))
                    {
                        wse.Execute(src.ReadToEnd());
                    }
                }
                else
                {
                    if (item.Key.EndsWith(".vbs"))
                    {
                        wse.Execute(src.ReadToEnd());
                    }
                }
            }
        }
コード例 #9
0
 public ScriptSite(WindowsScriptEngine engine)
 {
     this.engine = engine;
 }
コード例 #10
0
 private WindowsScriptItem(WindowsScriptEngine engine, IExpando target)
 {
     this.engine = engine;
        this.target = target;
 }
コード例 #11
0
        public static object Wrap(WindowsScriptEngine engine, object obj)
        {
            Debug.Assert(!(obj is IScriptMarshalWrapper));

            if (obj == null)
            {
                return null;
            }

            var expando = obj as IExpando;
            if ((expando != null) && (obj.GetType().IsCOMObject))
            {
                return new WindowsScriptItem(engine, expando);
            }

            return obj;
        }
コード例 #12
0
 private WindowsScriptItem(WindowsScriptEngine engine, IExpando target)
 {
     this.engine = engine;
     this.target = target;
 }
コード例 #13
0
 public static void Require(WindowsScriptEngine se, string ass)
 {
     Require(se, Assembly.LoadFile(ass));
 }
コード例 #14
0
ファイル: Plugin.cs プロジェクト: SchwarzerLoewe/OpenIDE
        public void Dispose()
        {
            Events.Fire("OnDispose");

            Dependencies = null;
            Filename = null;
            Icons = null;
            Info = null;
            ItemTemplates = null;
            ProjectTemplates = null;
            Properties = null;
            _engine = null;
        }
コード例 #15
0
ファイル: Plugin.cs プロジェクト: MyvarHD/OpenIDE
 public void Dispose()
 {
     Dependencies = null;
     Filename = null;
     Highlightings = null;
     Icons = null;
     Info = null;
     ItemTemplates = null;
     Language = null;
     ProjectTemplates = null;
     Properties = null;
     _engine = null;
 }