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

public AddMethodAlias ( string newName, string oldName ) : void
newName string
oldName string
Результат void
Пример #1
0
        public static Proc /*!*/ DefineMethod(RubyScope /*!*/ scope, RubyModule /*!*/ self,
                                              [NotNull] ClrName /*!*/ methodName, [NotNull] Proc /*!*/ block)
        {
            var result = DefineMethod(scope, self, methodName.MangledName, block);

            if (methodName.HasMangledName)
            {
                self.AddMethodAlias(methodName.ActualName, methodName.MangledName);
            }
            return(result);
        }
Пример #2
0
        public static RubyModule /*!*/ AliasMethod(RubyModule /*!*/ self,
                                                   [DefaultProtocol] string /*!*/ newName, [DefaultProtocol] string /*!*/ oldName)
        {
            RubyMemberInfo method = self.ResolveMethodFallbackToObject(oldName, true);

            if (method == null)
            {
                throw RubyExceptions.CreateUndefinedMethodError(self, oldName);
            }

            self.AddMethodAlias(newName, method);
            return(self);
        }
Пример #3
0
        public static RubyModule/*!*/ AliasMethod(RubyContext/*!*/ context, RubyModule/*!*/ self,
            [DefaultProtocol]string/*!*/ newName, [DefaultProtocol]string/*!*/ oldName) {

            RubyMemberInfo method = self.ResolveMethodFallbackToObject(oldName, true);
            if (method == null) {
                throw RubyExceptions.CreateUndefinedMethodError(self, oldName);
            }

            self.AddMethodAlias(context, newName, method);
            return self;
        }
Пример #4
0
 public static RubyModule /*!*/ AliasMethod(RubyContext /*!*/ context, RubyModule /*!*/ self,
                                            [DefaultProtocol, NotNull] string /*!*/ newName, [DefaultProtocol, NotNull] string /*!*/ oldName)
 {
     self.AddMethodAlias(newName, oldName);
     return(self);
 }
Пример #5
0
        public static RubyModule/*!*/ AliasMethod(RubyContext/*!*/ context, RubyModule/*!*/ self,
            [DefaultProtocol, NotNull]string/*!*/ newName, [DefaultProtocol, NotNull]string/*!*/ oldName) {

            self.AddMethodAlias(newName, oldName);
            return self;
        }
Пример #6
0
        public static Proc/*!*/ DefineMethod(RubyScope/*!*/ scope, RubyModule/*!*/ self,
            [NotNull]ClrName/*!*/ methodName, [NotNull]Proc/*!*/ block) {

            var result = DefineMethod(scope, self, methodName.MangledName, block);
            if (methodName.HasMangledName) {
                self.AddMethodAlias(methodName.ActualName, methodName.MangledName);
            }
            return result;
        }
Пример #7
0
        public static Proc/*!*/ DefineMethod(RubyScope/*!*/ scope, [NotNull]BlockParam/*!*/ block,
            RubyModule/*!*/ self, [NotNull]ClrName/*!*/ methodName) {

            var result = DefineMethod(scope, block, self, methodName.MangledName);
            self.AddMethodAlias(methodName.ActualName, methodName.MangledName);
            return result;
        }
Пример #8
0
 public static UnboundMethod/*!*/ DefineMethod(RubyScope/*!*/ scope, RubyModule/*!*/ self,
     [NotNull]ClrName/*!*/ methodName, [NotNull]UnboundMethod/*!*/ method) {
     var result = DefineMethod(scope, self, methodName.MangledName, method);
     self.AddMethodAlias(methodName.ActualName, methodName.MangledName);
     return result;
 }