Page 1 of 1

Using Repository in Common User Code

Posted: Wed Feb 24, 2016 11:37 am
by stapes
I have identified a few chunks of code that are used repetitively so I am trying to put them into a common class, i.e.:

Code: Select all

public static void Touch_Home()
        {
            Report.Log(ReportLevel.Info, "Touch", "Touch item 'IOS365Agile.Com365agileEnterprise365AgileTEST.UIView.Home' at Center", repo.IOS365Agile.Com365agileEnterprise365AgileTEST.UIView.Home_ButtonInfo);
            repo.IOS365Agile.Com365agileEnterprise365AgileTEST.UIView.Home_Button.Touch();
        }
At the moment I am getting compiler errors saying that repo does not exist.
I have tried adding it as a parameter to the function, but I can't find the Type definition for the Repository, i.e.:

Code: Select all

Touch_Home(<Type> repo)
Can anyone tell me what Type I should use here?

Re: Using Repository in Common User Code

Posted: Wed Feb 24, 2016 11:51 am
by stapes
I found my own answer. The Type is like the project name: Test_365AgilePortalRepository

i.e.:

Code: Select all

public static void Touch_Home(Test_365AgilePortalRepository repo)