Support runtime defined c# objects of known type in editor.

SyntaxEditor for WPF Forum

Posted 6 months ago by Academia CSharpCoder
Version: 19.1.0685
Avatar

Let's say we have .Net library which include a User() Class Type. so the syntax editor is able to to parse the library for User intellisense;

now  i want to insert some pre created objects of Type User like LoginUser and RequestUser which are known only at runtime and are defined outside of the editor. Does Actipro SyntaxEditor WPF control support this situation? or any workarount? and is there any sample?

[Modified 6 months ago]

Comments (1)

Posted 6 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Yes you can do that kind of thing with the .NET Languages Add-on.  It sounds like your User class is defined within a class library .dll.  That is easy since you simply add a reference to that library with your CSharpProjectAssembly.

Now if you have LoginUser needing to be defined outside of a class library and still be accessible for IntelliPrompt, then you would add an entry to the CSharpProjectAssembly.SourceFiles collection.  Please see the "SyntaxEditor / .NET Languages Add-on / Assemblies" topic in the documentation that comes with the product, and the look at the "Source Files" section within that topic.  That walks through ways to add code so that it's part of the IntelliPrompt, which is the same concept as adding code files to the current project in Visual Studio.  That should get you what you need.


Actipro Software Support

The latest build of this product (v2020.1.1) was released 15 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.