• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IronRuby类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IronRuby的典型用法代码示例。如果您正苦于以下问题:C# IronRuby类的具体用法?C# IronRuby怎么用?C# IronRuby使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IronRuby类属于命名空间,在下文中一共展示了IronRuby类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: LoadAlert_Class

 private static void LoadAlert_Class(IronRuby.Builtins.RubyModule/*!*/ module) {
     DefineLibraryMethod(module, "hide_popup", 0x21, 
         0x00000000U, 
         new Action<IronRuby.Builtins.RubyModule>(rho.rubyext.RhoAlert.HidePopup)
     );
     
     DefineLibraryMethod(module, "play_file", 0x21, 
         0x00000006U, 
         new Action<IronRuby.Builtins.RubyModule, System.String, System.String>(rho.rubyext.RhoAlert.PlayFile)
     );
     
     DefineLibraryMethod(module, "show_popup", 0x21, 
         0x00000000U, 
         new Action<IronRuby.Builtins.RubyModule, IronRuby.Builtins.Hash>(rho.rubyext.RhoAlert.ShowPopup)
     );
     
     DefineLibraryMethod(module, "show_status", 0x21, 
         0x00000006U, 
         new Action<IronRuby.Builtins.RubyModule, System.String, System.String, System.String>(rho.rubyext.RhoAlert.ShowStatus)
     );
     
     DefineLibraryMethod(module, "vibrate", 0x21, 
         0x00000000U, 
         new Action<IronRuby.Builtins.RubyModule, System.Int32>(rho.rubyext.RhoAlert.Vibrate)
     );
     
 }
开发者ID:waldenw,项目名称:rhodes,代码行数:27,代码来源:Initializers.Generated.cs


示例2: LoadMyIronRubyModule_Instance

 private static void LoadMyIronRubyModule_Instance(IronRuby.Builtins.RubyModule/*!*/ module) {
     DefineLibraryMethod(module, "Foo", 0x11, 
         0x00000000U, 
         new Action<System.Object>(AppendixB.MyModule.Foo)
     );
     
 }
开发者ID:panesofglass,项目名称:ironrubyinaction,代码行数:7,代码来源:Initializer.generated.cs


示例3: LoadMyIronRubyModule__MyClass_Instance

 private static void LoadMyIronRubyModule__MyClass_Instance(IronRuby.Builtins.RubyModule/*!*/ module) {
     DefineLibraryMethod(module, "foo_bar?", 0x11, 
         0x00000000U, 
         new System.Func<IronRuby.Runtime.RubyContext, System.Object, System.Boolean>(AppendixB.MyModule.TheLandOfChocolate.IsFooBar)
     );
     
 }
开发者ID:panesofglass,项目名称:ironrubyinaction,代码行数:7,代码来源:Initializer.generated.cs


示例4: LoadIronRuby__Builtins__MutableString_Class

 private static void LoadIronRuby__Builtins__MutableString_Class(IronRuby.Builtins.RubyModule/*!*/ module) {
     DefineLibraryMethod(module, "json_create", 0x21, 
         0x00000000U, 
         new Func<IronRuby.Runtime.ConversionStorage<IronRuby.Runtime.IntegerValue>, IronRuby.Builtins.RubyClass, IronRuby.Builtins.Hash, IronRuby.Builtins.MutableString>(IronRuby.JsonExt.MutableStringOps.JsonCreate)
     );
     
 }
开发者ID:nrk,项目名称:ironruby-json,代码行数:7,代码来源:Initializers.Generated.cs


示例5: Compile

        public override void Compile(Compiler compiler, IronRuby.Compiler.Ast.Node node, NodeParent parent)
        {
            var sae = (SimpleAssignmentExpression)node;

            // substitute a method call of []= rather than the crap that ironruby's parser produces:
            switch (sae.Left.NodeType)
            {
                case NodeTypes.ArrayItemAccess:
                    var aia = (ArrayItemAccess)sae.Left;
                    compiler.CompileNode(new MethodCall(aia.Array, "[]=", new Arguments(aia.Arguments.Expressions.Concat(new[] { sae.Right }).ToArray()), sae.Location), parent.CreateChild(node));
                    return;
                case NodeTypes.AttributeAccess:
                    var aa = (AttributeAccess)sae.Left;
                    compiler.CompileNode(new MethodCall(aa.Qualifier, aa.Name, new Arguments(sae.Right), aa.Location), parent.CreateChild(node));
                    return;
            }

            compiler.CompileNode(sae.Right, parent.CreateChild(node));
            if (sae.Operation != null)
            {
                compiler.AppendLine("$_stack[] = {0};", assignmentVar(sae.Left, parent));
                compiler.AppendLine("$_stack[] = array_pop($_stack)->{0}(NULL, array_pop($_stack));", Mangling.RubyMethodToPHP(sae.Operation));
            }
            compiler.AppendLine("{0} = $_stack[count($_stack)-1];", assignmentVar(sae.Left, parent));
        }
开发者ID:rzhw,项目名称:Fructose,代码行数:25,代码来源:Assignment.cs


示例6: LoadIronRuby__Builtins__Hash_Instance

 private static void LoadIronRuby__Builtins__Hash_Instance(IronRuby.Builtins.RubyModule/*!*/ module) {
     DefineLibraryMethod(module, "to_json", 0x11, 
         0x00000000U, 
         new Func<IronRuby.Runtime.ConversionStorage<IronRuby.Builtins.MutableString>, IronRuby.Builtins.Hash, IronRuby.JsonExt.GeneratorState, System.Int32, IronRuby.Builtins.MutableString>(IronRuby.JsonExt.HashOps.ToJson)
     );
     
 }
开发者ID:nrk,项目名称:ironruby-json,代码行数:7,代码来源:Initializers.Generated.cs


示例7: LoadIronRuby__Builtins__FalseClass_Instance

 private static void LoadIronRuby__Builtins__FalseClass_Instance(IronRuby.Builtins.RubyModule/*!*/ module) {
     DefineLibraryMethod(module, "to_json", 0x11, 
         0x00000000U, 
         new Func<System.Boolean, IronRuby.JsonExt.GeneratorState, System.Int32, IronRuby.Builtins.MutableString>(IronRuby.JsonExt.FalseOps.ToJson)
     );
     
 }
开发者ID:nrk,项目名称:ironruby-json,代码行数:7,代码来源:Initializers.Generated.cs


示例8: OompaLoompa_Instance

 private static void OompaLoompa_Instance(IronRuby.Builtins.RubyModule/*!*/ module) {
     DefineLibraryMethod(module, "make_chocolate", 0x11, 
         new Func<IronRuby.Builtins.RubyClass, System.String, System.String, Chapter12.TheLandOfChocolate.Chocolate>(Chapter12.TheLandOfChocolate.OompaLoompa.MakeChocolate)
     );
     
     DefineLibraryMethod(module, "make_peppermint_chocolate", 0x11, 
         new Func<IronRuby.Builtins.RubyClass, System.String, Chapter12.TheLandOfChocolate.Chocolate>(Chapter12.TheLandOfChocolate.OompaLoompa.MakePepermintChocolate)
     );
     
 }
开发者ID:casualjim,项目名称:ironruby-in-action-manuscript,代码行数:10,代码来源:Initializer.generated.cs


示例9: LoadIronRuby__Builtins__FalseClass_Instance

 private static void LoadIronRuby__Builtins__FalseClass_Instance(IronRuby.Builtins.RubyModule/*!*/ module) {
     module.DefineLibraryMethod("taguri", 0x11, 
         new System.Func<System.Object, IronRuby.Builtins.MutableString>(IronRuby.StandardLibrary.Yaml.YamlFalseOps.TagUri)
     );
     
     module.DefineLibraryMethod("to_yaml_node", 0x11, 
         new System.Func<System.Object, IronRuby.StandardLibrary.Yaml.RubyRepresenter, IronRuby.StandardLibrary.Yaml.Node>(IronRuby.StandardLibrary.Yaml.YamlFalseOps.ToYaml)
     );
     
 }
开发者ID:octavioh,项目名称:ironruby,代码行数:10,代码来源:Initializer.Generated.cs


示例10: LoadIronRuby__Builtins__Integer_Instance

 private static void LoadIronRuby__Builtins__Integer_Instance(IronRuby.Builtins.RubyModule/*!*/ module) {
     module.DefineLibraryMethod("taguri", 0x11, 
         new System.Func<System.Object, IronRuby.Builtins.MutableString>(IronRuby.StandardLibrary.Yaml.YamlIntegerOps.TagUri)
     );
     
     module.DefineLibraryMethod("to_yaml_node", 0x12, 
         new System.Func<IronRuby.Runtime.ConversionStorage<IronRuby.Builtins.MutableString>, System.Object, IronRuby.StandardLibrary.Yaml.RubyRepresenter, IronRuby.StandardLibrary.Yaml.Node>(IronRuby.StandardLibrary.Yaml.YamlIntegerOps.ToYaml)
     );
     
 }
开发者ID:techarch,项目名称:ironruby,代码行数:10,代码来源:Initializer.Generated.cs


示例11: LoadIronRuby__Builtins__Hash_Instance

 private static void LoadIronRuby__Builtins__Hash_Instance(IronRuby.Builtins.RubyModule/*!*/ module) {
     module.DefineLibraryMethod("taguri", 0x11, 
         new System.Func<IronRuby.Runtime.RubyContext, System.Object, IronRuby.Builtins.MutableString>(IronRuby.StandardLibrary.Yaml.YamlHashOps.TagUri)
     );
     
     module.DefineLibraryMethod("to_yaml_node", 0x12, 
         new System.Func<IronRuby.Builtins.Hash, IronRuby.StandardLibrary.Yaml.RubyRepresenter, IronRuby.StandardLibrary.Yaml.Node>(IronRuby.StandardLibrary.Yaml.YamlHashOps.ToYamlNode)
     );
     
 }
开发者ID:techarch,项目名称:ironruby,代码行数:10,代码来源:Initializer.Generated.cs


示例12: LoadIronRuby__Builtins__Integer_Instance

 private void LoadIronRuby__Builtins__Integer_Instance(IronRuby.Builtins.RubyModule/*!*/ module) {
     
     module.DefineLibraryMethod("taguri", 0x11, new System.Delegate[] {
         new System.Func<System.Object, IronRuby.Builtins.MutableString>(IronRuby.StandardLibrary.Yaml.YamlIntegerOps.TagUri),
     });
     
     module.DefineLibraryMethod("to_yaml_node", 0x11, new System.Delegate[] {
         new System.Func<System.Object, IronRuby.StandardLibrary.Yaml.RubyRepresenter, IronRuby.StandardLibrary.Yaml.Node>(IronRuby.StandardLibrary.Yaml.YamlIntegerOps.ToYaml),
     });
     
 }
开发者ID:mscottford,项目名称:ironruby,代码行数:11,代码来源:Initializer.Generated.cs


示例13: LoadCamera_Class

 private static void LoadCamera_Class(IronRuby.Builtins.RubyModule/*!*/ module) {
     DefineLibraryMethod(module, "choose_picture", 0x21, 
         0x00000002U, 
         new Action<IronRuby.Builtins.RubyModule, System.String>(rho.rubyext.RhoCamera.choosePicture)
     );
     
     DefineLibraryMethod(module, "take_picture", 0x21, 
         0x00000002U, 
         new Action<IronRuby.Builtins.RubyModule, System.String>(rho.rubyext.RhoCamera.takePicture)
     );
     
 }
开发者ID:waldenw,项目名称:rhodes,代码行数:12,代码来源:Initializers.Generated.cs


示例14: LoadIronRuby__Builtins__FalseClass_Instance

 private static void LoadIronRuby__Builtins__FalseClass_Instance(IronRuby.Builtins.RubyModule/*!*/ module) {
     DefineLibraryMethod(module, "taguri", 0x11, 
         0x00000000U, 
         new Func<System.Boolean, IronRuby.Builtins.MutableString>(IronRuby.StandardLibrary.Yaml.YamlFalseOps.TagUri)
     );
     
     DefineLibraryMethod(module, "to_yaml_node", 0x12, 
         0x00000004U, 
         new Func<IronRuby.Runtime.ConversionStorage<IronRuby.Builtins.MutableString>, System.Boolean, IronRuby.StandardLibrary.Yaml.RubyRepresenter, IronRuby.StandardLibrary.Yaml.Node>(IronRuby.StandardLibrary.Yaml.YamlFalseOps.ToYaml)
     );
     
 }
开发者ID:jschementi,项目名称:iron,代码行数:12,代码来源:Initializer.Generated.cs


示例15: LoadIronRuby__Builtins__MutableString_Instance

 private static void LoadIronRuby__Builtins__MutableString_Instance(IronRuby.Builtins.RubyModule/*!*/ module) {
     DefineLibraryMethod(module, "to_json", 0x11, 
         0x00000000U, 
         new Func<IronRuby.Builtins.MutableString, IronRuby.JsonExt.GeneratorState, System.Int32, IronRuby.Builtins.MutableString>(IronRuby.JsonExt.MutableStringOps.ToJson)
     );
     
     DefineLibraryMethod(module, "to_json_raw", 0x11, 
         0x00000000U, 
         new Func<IronRuby.Runtime.RubyScope, IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString>(IronRuby.JsonExt.MutableStringOps.ToJsonRaw)
     );
     
     DefineLibraryMethod(module, "to_json_raw_object", 0x11, 
         0x00000000U, 
         new Func<IronRuby.Runtime.RubyScope, IronRuby.Builtins.MutableString, IronRuby.Builtins.Hash>(IronRuby.JsonExt.MutableStringOps.ToJsonRawObject)
     );
     
 }
开发者ID:nrk,项目名称:ironruby-json,代码行数:17,代码来源:Initializers.Generated.cs


示例16: LoadIronRuby__Builtins__MutableString_Instance

 private static void LoadIronRuby__Builtins__MutableString_Instance(IronRuby.Builtins.RubyModule/*!*/ module) {
     module.DefineLibraryMethod("is_binary_data?", 0x11, 
         new System.Func<IronRuby.Runtime.RubyContext, IronRuby.Builtins.MutableString, System.Object>(IronRuby.StandardLibrary.Yaml.YamlStringOps.IsBinaryData)
     );
     
     module.DefineLibraryMethod("is_complex_yaml?", 0x11, 
         new System.Func<IronRuby.Runtime.RubyContext, IronRuby.Builtins.MutableString, System.Boolean>(IronRuby.StandardLibrary.Yaml.YamlStringOps.IsComplexYaml)
     );
     
     module.DefineLibraryMethod("taguri", 0x11, 
         new System.Func<System.Object, IronRuby.Builtins.MutableString>(IronRuby.StandardLibrary.Yaml.YamlStringOps.TagUri)
     );
     
     module.DefineLibraryMethod("to_yaml_node", 0x11, 
         new System.Func<IronRuby.Builtins.MutableString, IronRuby.StandardLibrary.Yaml.RubyRepresenter, IronRuby.StandardLibrary.Yaml.Node>(IronRuby.StandardLibrary.Yaml.YamlStringOps.ToYamlNode)
     );
     
 }
开发者ID:octavioh,项目名称:ironruby,代码行数:18,代码来源:Initializer.Generated.cs


示例17: LoadTheLandOfChocolate__Chocolate_Instance

 private static void LoadTheLandOfChocolate__Chocolate_Instance(IronRuby.Builtins.RubyModule/*!*/ module) {
     DefineLibraryMethod(module, "dark?", 0x11, 
         new Func<Chapter12.TheLandOfChocolate.Chocolate, System.Boolean>(Chapter12.TheLandOfChocolate.Chocolate.IsDark)
     );
     
     DefineLibraryMethod(module, "eat!", 0x11, 
         new Action<Chapter12.TheLandOfChocolate.Chocolate>(Chapter12.TheLandOfChocolate.Chocolate.Eat)
     );
     
     DefineLibraryMethod(module, "milk?", 0x11, 
         new Func<Chapter12.TheLandOfChocolate.Chocolate, System.Boolean>(Chapter12.TheLandOfChocolate.Chocolate.IsMilk)
     );
     
     DefineLibraryMethod(module, "white?", 0x11, 
         new Func<Chapter12.TheLandOfChocolate.Chocolate, System.Boolean>(Chapter12.TheLandOfChocolate.Chocolate.IsWhite)
     );
     
 }
开发者ID:casualjim,项目名称:ironruby-in-action-manuscript,代码行数:18,代码来源:Initializer.generated.cs


示例18: LoadHpricot_Class

 private static void LoadHpricot_Class(IronRuby.Builtins.RubyModule/*!*/ module) {
     DefineLibraryMethod(module, "buffer_size", 0x21, 
         0x00000000U, 
         new Func<IronRuby.Builtins.RubyModule, System.Nullable<System.Int32>>(IronRuby.Hpricot.Hpricot.GetBufferSize)
     );
     
     DefineLibraryMethod(module, "buffer_size=", 0x21, 
         0x00000000U, 
         new Action<IronRuby.Builtins.RubyModule, System.Int32>(IronRuby.Hpricot.Hpricot.SetBufferSize)
     );
     
     DefineLibraryMethod(module, "css", 0x21, 
         0x00000000U, 
         new Func<IronRuby.Runtime.RubyContext, IronRuby.Runtime.BlockParam, IronRuby.Builtins.RubyModule, System.Object>(IronRuby.Hpricot.Hpricot.Css)
     );
     
     DefineLibraryMethod(module, "scan", 0x21, 
         0x00000000U, 
         new Func<IronRuby.Runtime.ConversionStorage<IronRuby.Builtins.MutableString>, IronRuby.Runtime.RespondToStorage, IronRuby.Runtime.BinaryOpStorage, IronRuby.Runtime.BlockParam, IronRuby.Builtins.RubyModule, System.Object, IronRuby.Builtins.Hash, System.Object>(IronRuby.Hpricot.Hpricot.Scan)
     );
     
 }
开发者ID:nrk,项目名称:ironruby-hpricot,代码行数:22,代码来源:Initializers.Generated.cs


示例19: LoadNativeBar_Class

 private static void LoadNativeBar_Class(IronRuby.Builtins.RubyModule/*!*/ module) {
     DefineLibraryMethod(module, "create", 0x21, 
         0x00000000U, 
         new Action<IronRuby.Builtins.RubyModule, System.Int32, System.Object>(rho.rubyext.RhoNativeBar.Create)
     );
     
     DefineLibraryMethod(module, "create_native_tabbar", 0x21, 
         0x00000000U, 
         new Action<IronRuby.Builtins.RubyModule, System.Int32, System.Object>(rho.rubyext.RhoNativeBar.createNativeTabBar)
     );
     
     DefineLibraryMethod(module, "create_native_toolbar", 0x21, 
         0x00000000U, 
         new Action<IronRuby.Builtins.RubyModule, System.Int32, System.Object>(rho.rubyext.RhoNativeBar.createNativeToolBar)
     );
     
     DefineLibraryMethod(module, "native_tabbar_get_current_tab", 0x21, 
         0x00000000U, 
         new Func<IronRuby.Builtins.RubyModule, System.Int32>(rho.rubyext.RhoNativeBar.nativeTabBarGetCurrentTab)
     );
     
     DefineLibraryMethod(module, "native_tabbar_set_tab_badge", 0x21, 
         0x00000000U, 
         new Action<IronRuby.Builtins.RubyModule, System.Int32, IronRuby.Builtins.MutableString>(rho.rubyext.RhoNativeBar.nativeTabBarSetTabBadge)
     );
     
     DefineLibraryMethod(module, "native_tabbar_switch_tab", 0x21, 
         0x00000000U, 
         new Action<IronRuby.Builtins.RubyModule, System.Int32>(rho.rubyext.RhoNativeBar.nativeTabBarSwitchTab)
     );
     
     DefineLibraryMethod(module, "remove", 0x21, 
         0x00000000U, 
         new Action<IronRuby.Builtins.RubyModule>(rho.rubyext.RhoNativeBar.Remove)
     );
     
     DefineLibraryMethod(module, "remove_native_tabbar", 0x21, 
         0x00000000U, 
         new Action<IronRuby.Builtins.RubyModule>(rho.rubyext.RhoNativeBar.removeNativeTabBar)
     );
     
     DefineLibraryMethod(module, "remove_native_toolbar", 0x21, 
         0x00000000U, 
         new Action<IronRuby.Builtins.RubyModule>(rho.rubyext.RhoNativeBar.removeNativeToolBar)
     );
     
     DefineLibraryMethod(module, "set_tab_badge", 0x21, 
         0x00000000U, 
         new Action<IronRuby.Builtins.RubyModule, System.Int32, IronRuby.Builtins.MutableString>(rho.rubyext.RhoNativeBar.setTabBadge)
     );
     
     DefineLibraryMethod(module, "started", 0x21, 
         0x00000000U, 
         new Func<IronRuby.Builtins.RubyModule, System.Boolean>(rho.rubyext.RhoNativeBar.isStarted)
     );
     
     DefineLibraryMethod(module, "switch_tab", 0x21, 
         0x00000000U, 
         new Action<IronRuby.Builtins.RubyModule, System.Int32>(rho.rubyext.RhoNativeBar.switchTab)
     );
     
 }
开发者ID:raulvejar,项目名称:rhodes,代码行数:62,代码来源:Initializers.Generated.cs


示例20: LoadWebView_Class

 private static void LoadWebView_Class(IronRuby.Builtins.RubyModule/*!*/ module) {
     DefineLibraryMethod(module, "current_location", 0x21, 
         0x00000000U, 
         new Func<IronRuby.Builtins.RubyModule, System.String>(rho.rubyext.RhoWebView.currentLocation)
     );
     
     DefineLibraryMethod(module, "execute_js", 0x21, 
         0x00000002U, 
         new Action<IronRuby.Builtins.RubyModule, System.String, System.Int32>(rho.rubyext.RhoWebView.execute_js)
     );
     
     DefineLibraryMethod(module, "navigate", 0x21, 
         0x00000002U, 
         new Action<IronRuby.Builtins.RubyModule, System.String, System.Int32>(rho.rubyext.RhoWebView.Navigate)
     );
     
     DefineLibraryMethod(module, "refresh", 0x21, 
         0x00000000U, 
         new Action<IronRuby.Builtins.RubyModule, System.Int32>(rho.rubyext.RhoWebView.Refresh)
     );
     
     DefineLibraryMethod(module, "set_menu_items", 0x21, 
         0x00000000U, 
         new Action<IronRuby.Builtins.RubyModule, IronRuby.Builtins.Hash>(rho.rubyext.RhoWebView.setMenuItems)
     );
     
 }
开发者ID:raulvejar,项目名称:rhodes,代码行数:27,代码来源:Initializers.Generated.cs



注:本文中的IronRuby类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Irony类代码示例发布时间:2022-05-24
下一篇:
C# IronPython类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap