Using Repository in Common User Code

Ask general questions here.
stapes
Posts: 206
Joined: Wed Sep 16, 2015 10:55 am

Using Repository in Common User Code

Post by stapes » Wed Feb 24, 2016 11:37 am

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?

stapes
Posts: 206
Joined: Wed Sep 16, 2015 10:55 am

Re: Using Repository in Common User Code

Post by stapes » Wed Feb 24, 2016 11:51 am

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)