本文整理汇总了C#中IronRuby.HideMethod方法的典型用法代码示例。如果您正苦于以下问题:C# IronRuby.HideMethod方法的具体用法?C# IronRuby.HideMethod怎么用?C# IronRuby.HideMethod使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IronRuby
的用法示例。
在下文中一共展示了IronRuby.HideMethod方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadSocketError_Instance
private static void LoadSocketError_Instance(IronRuby.Builtins.RubyModule/*!*/ module) {
module.HideMethod("message");
}
示例2: LoadBignum_Instance
private static void LoadBignum_Instance(IronRuby.Builtins.RubyModule/*!*/ module) {
LoadIronRuby__Clr__BigInteger_Instance(module);
module.HideMethod("<");
module.HideMethod("<=");
module.HideMethod(">");
module.HideMethod(">=");
module.DefineLibraryMethod("size", 0x51,
new System.Func<Microsoft.Scripting.Math.BigInteger, System.Int32>(IronRuby.Builtins.BignumOps.Size)
);
}
示例3: LoadSymbol_Instance
private static void LoadSymbol_Instance(IronRuby.Builtins.RubyModule/*!*/ module) {
module.HideMethod("==");
module.DefineLibraryMethod("id2name", 0x51,
new System.Func<Microsoft.Scripting.SymbolId, IronRuby.Builtins.MutableString>(IronRuby.Builtins.SymbolOps.ToString)
);
module.DefineLibraryMethod("inspect", 0x51,
new System.Func<IronRuby.Runtime.RubyContext, Microsoft.Scripting.SymbolId, IronRuby.Builtins.MutableString>(IronRuby.Builtins.SymbolOps.Inspect)
);
module.DefineLibraryMethod("to_clr_string", 0x51,
new System.Func<Microsoft.Scripting.SymbolId, System.String>(IronRuby.Builtins.SymbolOps.ToClrString)
);
module.DefineLibraryMethod("to_i", 0x51,
new System.Func<Microsoft.Scripting.SymbolId, System.Int32>(IronRuby.Builtins.SymbolOps.ToInteger)
);
module.DefineLibraryMethod("to_int", 0x51,
new System.Func<Microsoft.Scripting.SymbolId, System.Int32>(IronRuby.Builtins.SymbolOps.ToInteger)
);
module.DefineLibraryMethod("to_s", 0x51,
new System.Func<Microsoft.Scripting.SymbolId, IronRuby.Builtins.MutableString>(IronRuby.Builtins.SymbolOps.ToString)
);
module.DefineLibraryMethod("to_sym", 0x51,
new System.Func<Microsoft.Scripting.SymbolId, Microsoft.Scripting.SymbolId>(IronRuby.Builtins.SymbolOps.ToSymbol)
);
}
示例4: LoadSystem__String_Instance
private static void LoadSystem__String_Instance(IronRuby.Builtins.RubyModule/*!*/ module) {
module.HideMethod("[]");
module.HideMethod("==");
module.HideMethod("clone");
module.HideMethod("insert");
module.HideMethod("split");
}
示例5: LoadString_Instance
private static void LoadString_Instance(IronRuby.Builtins.RubyModule/*!*/ module) {
module.HideMethod("clone");
module.HideMethod("version");
module.DefineLibraryMethod("%", 0x51,
new System.Func<IronRuby.Builtins.StringFormatterSiteStorage, IronRuby.Builtins.MutableString, System.Object, IronRuby.Builtins.MutableString>(IronRuby.Builtins.MutableStringOps.Format)
);
module.DefineLibraryMethod("*", 0x51,
new System.Func<IronRuby.Builtins.MutableString, System.Int32, IronRuby.Builtins.MutableString>(IronRuby.Builtins.MutableStringOps.Repeat)
);
module.DefineLibraryMethod("[]", 0x51,
new System.Func<IronRuby.Builtins.MutableString, System.Int32, System.Object>(IronRuby.Builtins.MutableStringOps.GetChar),
new System.Func<IronRuby.Builtins.MutableString, System.Int32, System.Int32, IronRuby.Builtins.MutableString>(IronRuby.Builtins.MutableStringOps.GetSubstring),
new System.Func<IronRuby.Runtime.ConversionStorage<System.Int32>, IronRuby.Builtins.MutableString, IronRuby.Builtins.Range, IronRuby.Builtins.MutableString>(IronRuby.Builtins.MutableStringOps.GetSubstring),
new System.Func<IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString>(IronRuby.Builtins.MutableStringOps.GetSubstring),
new System.Func<IronRuby.Runtime.RubyScope, IronRuby.Builtins.MutableString, IronRuby.Builtins.RubyRegex, IronRuby.Builtins.MutableString>(IronRuby.Builtins.MutableStringOps.GetSubstring),
new System.Func<IronRuby.Runtime.RubyScope, IronRuby.Builtins.MutableString, IronRuby.Builtins.RubyRegex, System.Int32, IronRuby.Builtins.MutableString>(IronRuby.Builtins.MutableStringOps.GetSubstring)
);
module.DefineLibraryMethod("[]=", 0x51,
new System.Func<IronRuby.Builtins.MutableString, System.Int32, IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString>(IronRuby.Builtins.MutableStringOps.ReplaceCharacter),
new System.Func<IronRuby.Builtins.MutableString, System.Int32, System.Int32, System.Int32>(IronRuby.Builtins.MutableStringOps.SetCharacter),
new System.Func<IronRuby.Builtins.MutableString, System.Int32, System.Int32, IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString>(IronRuby.Builtins.MutableStringOps.ReplaceSubstring),
new System.Func<IronRuby.Runtime.ConversionStorage<System.Int32>, IronRuby.Builtins.MutableString, IronRuby.Builtins.Range, IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString>(IronRuby.Builtins.MutableStringOps.ReplaceSubstring),
new System.Func<IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString>(IronRuby.Builtins.MutableStringOps.ReplaceSubstring),
new System.Func<IronRuby.Builtins.MutableString, IronRuby.Builtins.RubyRegex, IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString>(IronRuby.Builtins.MutableStringOps.ReplaceSubstring)
);
module.DefineLibraryMethod("+", 0x51,
new System.Func<IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString>(IronRuby.Builtins.MutableStringOps.Concatenate)
);
module.DefineLibraryMethod("<<", 0x51,
new System.Func<IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString>(IronRuby.Builtins.MutableStringOps.Append),
new System.Func<IronRuby.Builtins.MutableString, System.Int32, IronRuby.Builtins.MutableString>(IronRuby.Builtins.MutableStringOps.Append)
);
module.DefineLibraryMethod("<=>", 0x51,
new System.Func<IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString, System.Int32>(IronRuby.Builtins.MutableStringOps.Compare),
new System.Func<IronRuby.Runtime.BinaryOpStorage, IronRuby.Runtime.RespondToStorage, System.Object, System.Object, System.Object>(IronRuby.Builtins.MutableStringOps.Compare)
);
module.DefineLibraryMethod("=~", 0x51,
new System.Func<IronRuby.Runtime.RubyScope, IronRuby.Builtins.MutableString, IronRuby.Builtins.RubyRegex, System.Object>(IronRuby.Builtins.MutableStringOps.Match),
new System.Func<IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString, System.Object>(IronRuby.Builtins.MutableStringOps.Match),
new System.Func<IronRuby.Runtime.CallSiteStorage<System.Func<System.Runtime.CompilerServices.CallSite, IronRuby.Runtime.RubyScope, System.Object, IronRuby.Builtins.MutableString, System.Object>>, IronRuby.Runtime.RubyScope, IronRuby.Builtins.MutableString, System.Object, System.Object>(IronRuby.Builtins.MutableStringOps.Match)
);
module.DefineLibraryMethod("==", 0x51,
new System.Func<IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString, System.Boolean>(IronRuby.Builtins.MutableStringOps.StringEquals),
new System.Func<IronRuby.Runtime.RespondToStorage, IronRuby.Runtime.BinaryOpStorage, System.Object, System.Object, System.Boolean>(IronRuby.Builtins.MutableStringOps.Equals)
);
module.DefineLibraryMethod("===", 0x51,
new System.Func<IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString, System.Boolean>(IronRuby.Builtins.MutableStringOps.StringEquals),
new System.Func<IronRuby.Runtime.RespondToStorage, IronRuby.Runtime.BinaryOpStorage, System.Object, System.Object, System.Boolean>(IronRuby.Builtins.MutableStringOps.Equals)
);
module.DefineLibraryMethod("capitalize", 0x51,
new System.Func<IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString>(IronRuby.Builtins.MutableStringOps.Capitalize)
);
module.DefineLibraryMethod("capitalize!", 0x51,
new System.Func<IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString>(IronRuby.Builtins.MutableStringOps.CapitalizeInPlace)
);
module.DefineLibraryMethod("casecmp", 0x51,
new System.Func<IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString, System.Int32>(IronRuby.Builtins.MutableStringOps.Casecmp)
);
module.DefineLibraryMethod("center", 0x51,
new System.Func<IronRuby.Builtins.MutableString, System.Int32, IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString>(IronRuby.Builtins.MutableStringOps.Center)
);
module.DefineLibraryMethod("chomp", 0x51,
new System.Func<IronRuby.Runtime.RubyContext, IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString>(IronRuby.Builtins.MutableStringOps.Chomp),
new System.Func<IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString>(IronRuby.Builtins.MutableStringOps.Chomp)
);
module.DefineLibraryMethod("chomp!", 0x51,
new System.Func<IronRuby.Runtime.RubyContext, IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString>(IronRuby.Builtins.MutableStringOps.ChompInPlace),
new System.Func<IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString>(IronRuby.Builtins.MutableStringOps.ChompInPlace)
);
module.DefineLibraryMethod("chop", 0x51,
new System.Func<IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString>(IronRuby.Builtins.MutableStringOps.Chop)
);
module.DefineLibraryMethod("chop!", 0x51,
new System.Func<IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString>(IronRuby.Builtins.MutableStringOps.ChopInPlace)
);
module.DefineLibraryMethod("concat", 0x51,
new System.Func<IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString>(IronRuby.Builtins.MutableStringOps.Append),
new System.Func<IronRuby.Builtins.MutableString, System.Int32, IronRuby.Builtins.MutableString>(IronRuby.Builtins.MutableStringOps.Append)
);
module.DefineLibraryMethod("count", 0x51,
new System.Func<IronRuby.Runtime.RubyContext, IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString[], System.Object>(IronRuby.Builtins.MutableStringOps.Count)
//.........这里部分代码省略.........
示例6: LoadProcess__Status_Class
private static void LoadProcess__Status_Class(IronRuby.Builtins.RubyModule/*!*/ module) {
module.HideMethod("new");
}
示例7: LoadSymbol_Instance
private static void LoadSymbol_Instance(IronRuby.Builtins.RubyModule/*!*/ module) {
module.HideMethod("==");
DefineLibraryMethod(module, "[]", 0x51,
new[] { 0x00010000U, 0x00030000U, 0x00000004U, 0x00000002U, 0x00000004U, 0x00040004U},
new Func<IronRuby.Builtins.RubySymbol, System.Int32, IronRuby.Builtins.MutableString>(IronRuby.Builtins.SymbolOps.GetChar),
new Func<IronRuby.Builtins.RubySymbol, System.Int32, System.Int32, IronRuby.Builtins.MutableString>(IronRuby.Builtins.SymbolOps.GetSubstring),
new Func<IronRuby.Runtime.ConversionStorage<System.Int32>, IronRuby.Builtins.RubySymbol, IronRuby.Builtins.Range, IronRuby.Builtins.MutableString>(IronRuby.Builtins.SymbolOps.GetSubstring),
new Func<IronRuby.Builtins.RubySymbol, IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString>(IronRuby.Builtins.SymbolOps.GetSubstring),
new Func<IronRuby.Runtime.RubyScope, IronRuby.Builtins.RubySymbol, IronRuby.Builtins.RubyRegex, IronRuby.Builtins.MutableString>(IronRuby.Builtins.SymbolOps.GetSubstring),
new Func<IronRuby.Runtime.RubyScope, IronRuby.Builtins.RubySymbol, IronRuby.Builtins.RubyRegex, System.Int32, IronRuby.Builtins.MutableString>(IronRuby.Builtins.SymbolOps.GetSubstring)
);
DefineLibraryMethod(module, "<=>", 0x51,
0x00000002U, 0x00000004U, 0x00000000U,
new Func<IronRuby.Builtins.RubySymbol, IronRuby.Builtins.RubySymbol, System.Int32>(IronRuby.Builtins.SymbolOps.Compare),
new Func<IronRuby.Runtime.RubyContext, IronRuby.Builtins.RubySymbol, IronRuby.Runtime.ClrName, System.Int32>(IronRuby.Builtins.SymbolOps.Compare),
new Func<IronRuby.Builtins.RubySymbol, System.Object, System.Object>(IronRuby.Builtins.SymbolOps.Compare)
);
DefineLibraryMethod(module, "=~", 0x51,
0x00000004U, 0x00000002U, 0x00000000U,
new Func<IronRuby.Runtime.RubyScope, IronRuby.Builtins.RubySymbol, IronRuby.Builtins.RubyRegex, System.Object>(IronRuby.Builtins.SymbolOps.Match),
new Func<IronRuby.Runtime.ClrName, IronRuby.Builtins.RubySymbol, System.Object>(IronRuby.Builtins.SymbolOps.Match),
new Func<IronRuby.Runtime.CallSiteStorage<Func<System.Runtime.CompilerServices.CallSite, IronRuby.Runtime.RubyScope, System.Object, System.Object, System.Object>>, IronRuby.Runtime.RubyScope, IronRuby.Builtins.RubySymbol, System.Object, System.Object>(IronRuby.Builtins.SymbolOps.Match)
);
DefineLibraryMethod(module, "==", 0x51,
0x00000002U, 0x00000004U, 0x00000000U,
new Func<IronRuby.Builtins.RubySymbol, IronRuby.Builtins.RubySymbol, System.Boolean>(IronRuby.Builtins.SymbolOps.Equals),
new Func<IronRuby.Runtime.RubyContext, IronRuby.Builtins.RubySymbol, IronRuby.Runtime.ClrName, System.Boolean>(IronRuby.Builtins.SymbolOps.Equals),
new Func<IronRuby.Builtins.RubySymbol, System.Object, System.Boolean>(IronRuby.Builtins.SymbolOps.Equals)
);
DefineLibraryMethod(module, "===", 0x51,
0x00000002U, 0x00000004U, 0x00000000U,
new Func<IronRuby.Builtins.RubySymbol, IronRuby.Builtins.RubySymbol, System.Boolean>(IronRuby.Builtins.SymbolOps.Equals),
new Func<IronRuby.Runtime.RubyContext, IronRuby.Builtins.RubySymbol, IronRuby.Runtime.ClrName, System.Boolean>(IronRuby.Builtins.SymbolOps.Equals),
new Func<IronRuby.Builtins.RubySymbol, System.Object, System.Boolean>(IronRuby.Builtins.SymbolOps.Equals)
);
DefineLibraryMethod(module, "capitalize", 0x51,
0x00000000U,
new Func<IronRuby.Runtime.RubyContext, IronRuby.Builtins.RubySymbol, IronRuby.Builtins.RubySymbol>(IronRuby.Builtins.SymbolOps.Capitalize)
);
DefineLibraryMethod(module, "casecmp", 0x51,
0x00000002U, 0x00010002U,
new Func<IronRuby.Builtins.RubySymbol, IronRuby.Builtins.RubySymbol, System.Int32>(IronRuby.Builtins.SymbolOps.Casecmp),
new Func<IronRuby.Builtins.RubySymbol, IronRuby.Builtins.MutableString, System.Int32>(IronRuby.Builtins.SymbolOps.Casecmp)
);
DefineLibraryMethod(module, "downcase", 0x51,
0x00000000U,
new Func<IronRuby.Runtime.RubyContext, IronRuby.Builtins.RubySymbol, IronRuby.Builtins.RubySymbol>(IronRuby.Builtins.SymbolOps.DownCase)
);
DefineLibraryMethod(module, "empty?", 0x51,
0x00000000U,
new Func<IronRuby.Builtins.RubySymbol, System.Boolean>(IronRuby.Builtins.SymbolOps.IsEmpty)
);
DefineLibraryMethod(module, "encoding", 0x51,
0x00000000U,
new Func<IronRuby.Builtins.RubySymbol, IronRuby.Builtins.RubyEncoding>(IronRuby.Builtins.SymbolOps.GetEncoding)
);
DefineLibraryMethod(module, "id2name", 0x51,
0x00000000U,
new Func<IronRuby.Builtins.RubySymbol, IronRuby.Builtins.MutableString>(IronRuby.Builtins.SymbolOps.ToString)
);
DefineLibraryMethod(module, "inspect", 0x51,
0x00000000U,
new Func<IronRuby.Runtime.RubyContext, IronRuby.Builtins.RubySymbol, IronRuby.Builtins.MutableString>(IronRuby.Builtins.SymbolOps.Inspect)
);
DefineLibraryMethod(module, "intern", 0x51,
0x00000000U,
new Func<IronRuby.Builtins.RubySymbol, IronRuby.Builtins.RubySymbol>(IronRuby.Builtins.SymbolOps.ToSymbol)
);
DefineLibraryMethod(module, "length", 0x51,
0x00000000U,
new Func<IronRuby.Builtins.RubySymbol, System.Int32>(IronRuby.Builtins.SymbolOps.GetLength)
);
DefineLibraryMethod(module, "match", 0x51,
0x00000008U, 0x00040008U,
new Func<IronRuby.Runtime.CallSiteStorage<Func<System.Runtime.CompilerServices.CallSite, IronRuby.Runtime.RubyScope, System.Object, System.Object, System.Object>>, IronRuby.Runtime.RubyScope, IronRuby.Builtins.RubySymbol, IronRuby.Builtins.RubyRegex, System.Object>(IronRuby.Builtins.SymbolOps.Match),
new Func<IronRuby.Runtime.CallSiteStorage<Func<System.Runtime.CompilerServices.CallSite, IronRuby.Runtime.RubyScope, System.Object, System.Object, System.Object>>, IronRuby.Runtime.RubyScope, IronRuby.Builtins.RubySymbol, IronRuby.Builtins.MutableString, System.Object>(IronRuby.Builtins.SymbolOps.Match)
);
DefineLibraryMethod(module, "next", 0x51,
0x00000000U,
new Func<IronRuby.Runtime.RubyContext, IronRuby.Builtins.RubySymbol, IronRuby.Builtins.RubySymbol>(IronRuby.Builtins.SymbolOps.Succ)
);
DefineLibraryMethod(module, "size", 0x51,
0x00000000U,
new Func<IronRuby.Builtins.RubySymbol, System.Int32>(IronRuby.Builtins.SymbolOps.GetLength)
//.........这里部分代码省略.........
示例8: LoadNoMethodError_Instance
private static void LoadNoMethodError_Instance(IronRuby.Builtins.RubyModule/*!*/ module) {
module.HideMethod("message");
DefineLibraryMethod(module, "args", 0x51,
0x00000000U,
new Func<System.MissingMethodException, System.Object>(IronRuby.Builtins.NoMethodErrorOps.GetArguments)
);
}
示例9: LoadRangeError_Instance
private void LoadRangeError_Instance(IronRuby.Builtins.RubyModule/*!*/ module) {
module.HideMethod("message");
}
示例10: LoadSymbol_Instance
private static void LoadSymbol_Instance(IronRuby.Builtins.RubyModule/*!*/ module) {
module.HideMethod("==");
DefineLibraryMethod(module, "=~", 0xbe0051,
0x00000004U, 0x00000002U, 0x00000000U,
new Func<IronRuby.Runtime.RubyScope, IronRuby.Builtins.RubySymbol, IronRuby.Builtins.RubyRegex, System.Object>(IronRuby.Builtins.SymbolOps.Match),
new Func<IronRuby.Runtime.ClrName, IronRuby.Builtins.RubySymbol, System.Object>(IronRuby.Builtins.SymbolOps.Match),
new Func<IronRuby.Runtime.CallSiteStorage<Func<System.Runtime.CompilerServices.CallSite, IronRuby.Runtime.RubyScope, System.Object, System.Object, System.Object>>, IronRuby.Runtime.RubyScope, IronRuby.Builtins.RubySymbol, System.Object, System.Object>(IronRuby.Builtins.SymbolOps.Match)
);
DefineLibraryMethod(module, "empty?", 0xbe0051,
0x00000000U,
new Func<IronRuby.Builtins.RubySymbol, System.Boolean>(IronRuby.Builtins.SymbolOps.IsEmpty)
);
DefineLibraryMethod(module, "encoding", 0xbe0051,
0x00000000U,
new Func<IronRuby.Builtins.RubySymbol, IronRuby.Builtins.RubyEncoding>(IronRuby.Builtins.SymbolOps.GetEncoding)
);
DefineLibraryMethod(module, "id2name", 0x51,
0x00000000U,
new Func<IronRuby.Builtins.RubySymbol, IronRuby.Builtins.MutableString>(IronRuby.Builtins.SymbolOps.ToString)
);
DefineLibraryMethod(module, "inspect", 0x51,
0x00000000U,
new Func<IronRuby.Runtime.RubyContext, IronRuby.Builtins.RubySymbol, IronRuby.Builtins.MutableString>(IronRuby.Builtins.SymbolOps.Inspect)
);
DefineLibraryMethod(module, "intern", 0xbe0051,
0x00000000U,
new Func<IronRuby.Builtins.RubySymbol, IronRuby.Builtins.RubySymbol>(IronRuby.Builtins.SymbolOps.ToSymbol)
);
DefineLibraryMethod(module, "length", 0xbe0051,
0x00000000U,
new Func<IronRuby.Builtins.RubySymbol, System.Int32>(IronRuby.Builtins.SymbolOps.GetLength)
);
DefineLibraryMethod(module, "match", 0xbe0051,
0x00000008U, 0x00040008U,
new Func<IronRuby.Runtime.CallSiteStorage<Func<System.Runtime.CompilerServices.CallSite, IronRuby.Runtime.RubyScope, System.Object, System.Object, System.Object>>, IronRuby.Runtime.RubyScope, IronRuby.Builtins.RubySymbol, IronRuby.Builtins.RubyRegex, System.Object>(IronRuby.Builtins.SymbolOps.Match),
new Func<IronRuby.Runtime.CallSiteStorage<Func<System.Runtime.CompilerServices.CallSite, IronRuby.Runtime.RubyScope, System.Object, System.Object, System.Object>>, IronRuby.Runtime.RubyScope, IronRuby.Builtins.RubySymbol, IronRuby.Builtins.MutableString, System.Object>(IronRuby.Builtins.SymbolOps.Match)
);
DefineLibraryMethod(module, "size", 0xbe0051,
0x00000000U,
new Func<IronRuby.Builtins.RubySymbol, System.Int32>(IronRuby.Builtins.SymbolOps.GetLength)
);
DefineLibraryMethod(module, "to_clr_string", 0x51,
0x00000000U,
new Func<IronRuby.Builtins.RubySymbol, System.String>(IronRuby.Builtins.SymbolOps.ToClrString)
);
DefineLibraryMethod(module, "to_i", 0x51,
0x00000000U,
new Func<IronRuby.Builtins.RubySymbol, System.Int32>(IronRuby.Builtins.SymbolOps.ToInteger)
);
DefineLibraryMethod(module, "to_int", 0x51,
0x00000000U,
new Func<IronRuby.Builtins.RubySymbol, System.Int32>(IronRuby.Builtins.SymbolOps.ToInteger)
);
DefineLibraryMethod(module, "to_proc", 0x51,
0x00000000U,
new Func<IronRuby.Runtime.RubyScope, IronRuby.Builtins.RubySymbol, IronRuby.Builtins.Proc>(IronRuby.Builtins.SymbolOps.ToProc)
);
DefineLibraryMethod(module, "to_s", 0x51,
0x00000000U,
new Func<IronRuby.Builtins.RubySymbol, IronRuby.Builtins.MutableString>(IronRuby.Builtins.SymbolOps.ToString)
);
DefineLibraryMethod(module, "to_sym", 0x51,
0x00000000U,
new Func<IronRuby.Builtins.RubySymbol, IronRuby.Builtins.RubySymbol>(IronRuby.Builtins.SymbolOps.ToSymbol)
);
}
示例11: LoadMyClass_Instance
private static void LoadMyClass_Instance(IronRuby.Builtins.RubyModule/*!*/ module) {
LoadMyIronRubyModule_Instance(module);
module.HideMethod("Foo");
}
示例12: LoadSymbol_Instance
private static void LoadSymbol_Instance(IronRuby.Builtins.RubyModule/*!*/ module) {
module.HideMethod("==");
DefineLibraryMethod(module, "=~", 0xbe0051,
new Func<IronRuby.Runtime.RubyScope, Microsoft.Scripting.SymbolId, IronRuby.Builtins.RubyRegex, System.Object>(IronRuby.Builtins.SymbolOps.Match),
new Func<IronRuby.Runtime.ClrName, Microsoft.Scripting.SymbolId, System.Object>(IronRuby.Builtins.SymbolOps.Match),
new Func<IronRuby.Runtime.CallSiteStorage<Func<System.Runtime.CompilerServices.CallSite, IronRuby.Runtime.RubyScope, System.Object, System.Object, System.Object>>, IronRuby.Runtime.RubyScope, Microsoft.Scripting.SymbolId, System.Object, System.Object>(IronRuby.Builtins.SymbolOps.Match)
);
DefineLibraryMethod(module, "id2name", 0x51,
new Func<Microsoft.Scripting.SymbolId, IronRuby.Builtins.MutableString>(IronRuby.Builtins.SymbolOps.ToString)
);
DefineLibraryMethod(module, "inspect", 0x51,
new Func<IronRuby.Runtime.RubyContext, Microsoft.Scripting.SymbolId, IronRuby.Builtins.MutableString>(IronRuby.Builtins.SymbolOps.Inspect)
);
DefineLibraryMethod(module, "match", 0xbe0051,
new Func<IronRuby.Runtime.CallSiteStorage<Func<System.Runtime.CompilerServices.CallSite, IronRuby.Runtime.RubyScope, System.Object, System.Object, System.Object>>, IronRuby.Runtime.RubyScope, Microsoft.Scripting.SymbolId, IronRuby.Builtins.RubyRegex, System.Object>(IronRuby.Builtins.SymbolOps.Match),
new Func<IronRuby.Runtime.CallSiteStorage<Func<System.Runtime.CompilerServices.CallSite, IronRuby.Runtime.RubyScope, System.Object, System.Object, System.Object>>, IronRuby.Runtime.RubyScope, Microsoft.Scripting.SymbolId, IronRuby.Builtins.MutableString, System.Object>(IronRuby.Builtins.SymbolOps.Match)
);
DefineLibraryMethod(module, "to_clr_string", 0x51,
new Func<Microsoft.Scripting.SymbolId, System.String>(IronRuby.Builtins.SymbolOps.ToClrString)
);
DefineLibraryMethod(module, "to_i", 0x51,
new Func<Microsoft.Scripting.SymbolId, System.Int32>(IronRuby.Builtins.SymbolOps.ToInteger)
);
DefineLibraryMethod(module, "to_int", 0x51,
new Func<Microsoft.Scripting.SymbolId, System.Int32>(IronRuby.Builtins.SymbolOps.ToInteger)
);
DefineLibraryMethod(module, "to_s", 0x51,
new Func<Microsoft.Scripting.SymbolId, IronRuby.Builtins.MutableString>(IronRuby.Builtins.SymbolOps.ToString)
);
DefineLibraryMethod(module, "to_sym", 0x51,
new Func<Microsoft.Scripting.SymbolId, Microsoft.Scripting.SymbolId>(IronRuby.Builtins.SymbolOps.ToSymbol)
);
}