IronRuby.Builtins.RubyModule.AddMethod C# (CSharp) Метод

AddMethod() публичный Метод

public AddMethod ( RubyContext callerContext, string name, IronRuby.Runtime.Calls.RubyMemberInfo method ) : void
callerContext RubyContext
name string
method IronRuby.Runtime.Calls.RubyMemberInfo
Результат void
        public void AddMethod(RubyContext/*!*/ callerContext, string/*!*/ name, RubyMemberInfo/*!*/ method) {
            Assert.NotNull(name, method);
            Mutate();
            SetMethodNoEvent(callerContext, name, method);
            MethodAdded(name);
        }

Usage Example

Пример #1
0
        public static Proc /*!*/ DefineMethod(RubyScope /*!*/ scope, RubyModule /*!*/ self,
                                              [DefaultProtocol, NotNull] string /*!*/ methodName, [NotNull] Proc /*!*/ block)
        {
            var visibility = GetDefinedMethodVisibility(scope, self, methodName);
            var info       = Proc.ToLambdaMethodInfo(block, methodName, visibility, self);

            self.AddMethod(scope.RubyContext, methodName, info);
            return(info.Lambda);
        }
All Usage Examples Of IronRuby.Builtins.RubyModule::AddMethod
RubyModule