Inheritance: Microsoft.Scripting.Actions.Calls.OverloadInfo
示例#1
1
 /// <summary>
 /// Creates a Ruby method implemented by a method group of CLR methods.
 /// </summary>
 internal RubyLibraryMethodInfo(LibraryOverload/*!*/[]/*!*/ overloads, RubyMemberFlags flags, RubyModule/*!*/ declaringModule)
     : base(null, flags, declaringModule)
 {
     Assert.NotNullItems(overloads);
     Assert.NotEmpty(overloads);
     _overloads = overloads;
 }
示例#2
0
 public static void DefineLibraryMethod(RubyModule/*!*/ module, string/*!*/ name, int attributes, 
     uint[]/*!*/ overloadAttributes, params Delegate[]/*!*/ overloads)
 {
     if (!SkipDefinition(module, attributes)) {
         var infos = new LibraryOverload[overloads.Length];
         for (int i = 0; i < overloads.Length; i++) {
             infos[i] = LibraryOverload.Create(overloads[i], overloadAttributes[i]);
         }
         DefineLibraryMethod(module, name, attributes, infos);
     }
 }
 // thread-safe:
 internal static void DefineLibraryMethod(RubyModule/*!*/ module, string/*!*/ name, int attributes, LibraryOverload/*!*/[]/*!*/ overloads) {
     var flags = (RubyMemberFlags)(attributes & (int)RubyMethodAttributes.MemberFlagsMask);
     bool skipEvent = ((RubyMethodAttributes)attributes & RubyMethodAttributes.NoEvent) != 0;
     SetLibraryMethod(module, name, new RubyLibraryMethodInfo(overloads, flags, module), skipEvent);
 }
 public RubyLibraryMethodInfo(LibraryOverload/*!*/[]/*!*/ overloads, RubyMethodVisibility visibility, RubyModule/*!*/ declaringModule) 
     : this(overloads, (RubyMemberFlags)visibility & RubyMemberFlags.VisibilityMask, declaringModule) {
     ContractUtils.RequiresNotNull(declaringModule, "declaringModule");
     ContractUtils.RequiresNotNullItems(overloads, "overloads");
 }