(Only for info - this is not urgent) If the code is decorated with more than 3 "#region"s the RBS can not create an event

Hi @korchev,

If my code has more than 3 #region sections (I didn't try all # directives) RBS can not create an event. I shared two videos to tell this issue.

The first one shows the issue.
Radzen_Blazor_Studio_Clip1

If remove or put remarks for two section headers (so if the code has 3 region sections) RBS works as expected.

Radzen_Blazor_Studio_Clip2

This is not an emergency.

Because

#region
...
#endregion

And

//#region
...
//#endregion

Likewise, it can store and open codes. I started using the latter in my code.

For some reason I couldn't reproduce this issue. I tested with 3 and 4 regions but I was always able to add the event handler. Can you send us a sample app perhaps?

Hello @korchev,

Like you, I could not reproduce the problem on a new project. Since I could not share the project without my customer's approval, I prepared a copy of the page with the problem and added a few lines of patches to fix the errors.

The project I shared does not contain any meaningful code in itself ( Please forgive me for this code). But this code can reproduce the issue. I kept the structure and

I could not catch the real position of the problem in my first post. I thought the problem was related to the number of #regions because the problem was removed after I put the remark signs on two region headers. But if only the second region (Custom properties/variables) gets the remark signs the problem disappears.

The following picture shows a problemless configuration.
image
When you remove the remark signs you can not add a new event.

RadzenTest.zip (535.9 KB)

PS: I wrote about the lag problem in the other topic.

The problem is on line 78:

        #endregion"

There is a trailing " which confuses our current implementation. You can delete the " and things will work again. We will try to support this case though - it is valid C# which our tokenizer should handle.

1 Like