[CLOSED] Extension methods on ServerMapping

  1. #1

    [CLOSED] Extension methods on ServerMapping

    Hi,

    I read this section (Improvements to ServerMapping) on http://www.ext.net/2013/10/01/offici...now-available/.
    I tried to use an extension method on servermapping:

    public static int MyMethod(this MyEntity me)
    {
        return 1;
    }
    but when I load the store the method isn't called!

    Could anyone help me?
    Thanks!
    Last edited by Daniil; Nov 19, 2013 at 5:53 AM. Reason: [CLOSED]
  2. #2
    Hello!

    This method in the Model class. Please, take a look at this sample: https://examples2.ext.net/#/GridPane...erver_Mapping/
  3. #3
    Quote Originally Posted by Baidaly View Post
    Hello!

    This method in the Model class. Please, take a look at this sample: https://examples2.ext.net/#/GridPane...erver_Mapping/
    But I need this method in another project not in the model class.
    Does it work only into the model class?

    Thanks!
  4. #4
    Extension method should not belong to model class
    It must be static and first argument must have type of model field value type

    Please provide simple runable test case demonstrates that extension method is not called
  5. #5
    Sorry, I was wrong. So we need a sample to reproduce it.

Similar Threads

  1. Replies: 5
    Last Post: Feb 21, 2012, 3:17 PM
  2. ServerMapping with more attribute
    By Maia in forum 1.x Help
    Replies: 3
    Last Post: Aug 12, 2010, 4:48 PM
  3. [CLOSED] Coolite extension methods documentation?
    By daneel in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 06, 2010, 2:09 PM
  4. Coolite extension methods documentation?
    By daneel in forum 1.x Help
    Replies: 0
    Last Post: May 05, 2010, 10:32 AM
  5. [ADDED] [V0.8.2] ServerMapping
    By Timothy in forum Feature Requests
    Replies: 2
    Last Post: Sep 15, 2009, 12:09 PM

Tags for this Thread

Posting Permissions