Vibrant discussion about CSLA .NET and using the framework to build great business applications.

Forum has moved

New location: CSLA .NET forum

CSLA .NET Resources:
  • CSLA .NET forum
  • CSLA .NET home page
  • Problem with MethodInfo

    rated by 0 users
    Answered (Not Verified) This post has 0 verified answers | 1 Reply | 1 Follower

    Not Ranked
    8 Posts
    Uwe Hein posted on Wed, Nov 9 2011 9:00 AM

    Hi everybody,

    in a SL4 Project using CSLA 4.1 I have a BusinessBase class containing 2 Methods:

    public void doWork(EventHandler<DataPortalResult<doWorkCommand>> callback)       

    public static void doWork(int Id, EventHandler<DataPortalResult<doWorkCommand>> callback)

    I would like to create a AuthorizationActions.ExecuteMethod rule like

    BusinessRules.AddRule(new Csla.Rules.CommonRules.IsInRole(Csla.Rules.AuthorizationActions.ExecuteMethod, doWorkMethod    , new List<string> {"MayDoWork"    } ));       


    public static MethodInfo doWorkMethod  = RegisterMethod(typeof(MyBusinessBase), "doWork");

    fails because of the different method signatures of doWork.

    Is there any way for creating this rule in this class without renaming one of the doWork Methods.








    All Replies

    Top 10 Contributor
    9,475 Posts

    No, this is a limitation of the way methods are registered. You will need to rename one of the methods.


    Page 1 of 1 (2 items) | RSS

    Copyright (c) 2006-2014 Marimer LLC. All rights reserved.
    Email admin@lhotka.net for support.
    Powered by Community Server (Non-Commercial Edition), by Telligent Systems