Inheritance: Microsoft.Scripting.Actions.Calls.OverloadInfo
Ejemplo n.º 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;
 }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 3
0
 // 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);
 }
Ejemplo n.º 4
0
 public RubyLibraryMethodInfo(LibraryOverload/*!*/[]/*!*/ overloads, RubyMethodVisibility visibility, RubyModule/*!*/ declaringModule) 
     : this(overloads, (RubyMemberFlags)visibility & RubyMemberFlags.VisibilityMask, declaringModule) {
     ContractUtils.RequiresNotNull(declaringModule, "declaringModule");
     ContractUtils.RequiresNotNullItems(overloads, "overloads");
 }