public
static
PFPrincipal Setup(
this
PFPrincipal principal,
string
name =
"TEST"
,
long
userId = 1,
long
company = 1,
string
loginType =
"P"
, LoginOrigin loginOrigin = LoginOrigin.Unspecified,
long
? subscriptionId =
null
,
params
string
[] roles)<br>
In my code, I use this extension method by specifying some of the named parameters:
PFPrincipal.Current.Setup(loginOrigin: LoginOrigin.WebService, subscriptionId: 1);
JustCode marks this in the Errors window as:
C#: Unknown method 'Setup(loginOrigin:=MyApp.DataTypes.LoginOrigin, subscriptionId:=int)' of 'MyApp.Security.PFPrincipal'
The actual code compiles and runs fine, only JustCode does not like it.
11 Answers, 1 is accepted
Thanks for the feedback. We logged the issue for fixing and added a PITS item for you here. You also receive some Telerik Points.
Best wishes,Stefan Avramov
the Telerik team
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!
Public
ReadOnly
Property
_IsReportingToTr(dealerInfo
As
DealerInfo)
As
Boolean
Get
Dim
trService
As
New
TraceRegisterService()
If
DealerInfo.TraceRegisterID
Is
Nothing
Then
Return
False
Else
Return
trService.GetTraceRegisterAccountById(DealerInfo.TraceRegisterID).IsReportingToTr
End
If
End
Get
End
Property
'This is where I call it. _ActiveDealerInfo calls another property that gets the Active Dealer Info
_IsReportingToTr(_ActiveDealerInfo)
JustCode is giving me an error: Unknown Method '_IsReportingToTr'
Other properties in the module run fine and don't show errors as long as a parameter is not being passed through.
The project compiles and runs fine.
Sorry for the late reply. No - this is a different issue. Can you send us a compilable sample where this occurs. The code you provided generates a real build error - "Property access must assign to the property or use its value". JustCode shows no errors if we fix the error by adding a variable there like so:
Dim a = _IsReportingToTr(_ActiveDealerInfo)
Thanks in advance.
Stefan Avramov
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>
Winform
's Code Behind:
Sorry if the first code sample did not compile. This sample defiantly does and JustCode still gives
the Unknown method '_IsReportingToTr'
Private
Sub
frmSendData_Load(sender
As
System.
Object
, e
As
System.EventArgs)
Handles
MyBase
.Load
If
_IsReportingToTr(_ActiveDealerInfo)
Then
LoadLvBatches(
Nothing
,
Nothing
)
Else
HideTrControls()
End
If
End
Sub
Module
Properties:
Public
ReadOnly
Property
_IsReportingToTr(dealerInfo
As
DealerInfo)
As
Boolean
Get
Dim
trService
As
New
TraceRegisterService()
If
dealerInfo.TraceRegisterID
Is
Nothing
Then
Return
False
Else
Return
trService.GetTraceRegisterAccountById(dealerInfo.TraceRegisterID).IsReportingToTr
End
If
End
Get
End
Property
Public
Property
_ActiveDealerInfo()
As
DealerInfo
Get
DiService =
New
DealerInfosService()
Return
DiService.GetActiveDealerInfo()
End
Get
Set
(value
As
DealerInfo)
DiService.SaveDealerInfo(value)
End
Set
End
Property
Thanks a lot for taking the time to help us. We managed to reproduce the issue and logged it for fixing. I created a PITS item for you here. You also receive some Telerik Points to compensate you for the effort.
Kind Regards,Stefan Avramov
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>
I just installed JustCode and am having the exact same problem (none of my Extension methods are working)
Thanks for the feedback Dinis.
I reproduced your issue and it seems that JustCode does not look for dll references in the Bin folder and that is why it shows the errors. If you add a reference to the O2_FluentSharp_CoreLib.dll the errors will disappear. I will make an item for this issue and we will investigate it.
I would like to ask you what is the type of your TM_Website project?
Thank you.
Zdravko
the Telerik team
We have fixed the issue and the fix will be released in our next internal build.
Thank you for your help!
Regards,
Ivan
Telerik