Login  •  Register


How to define virtual properties in Class Model definition

Questions regarding the use of UaModeler

How to define virtual properties in Class Model definition

Postby prebecchi » 02 Oct 2017, 10:47

Hi everyone,
when i compile my project in UAModeler I need to create .NET classes which have virtual properties defined, in order to be able to inherit these classes and override properties with custom methods.
Example:

Code: Select all
    [UaTypeDefinition(NodeId=ObjectTypes.StorageInputType, NamespaceUri=MyServerOpcUaServer.Namespaces.MyNamespace)]
    public partial class MyClassModel : BaseObjectModel
    {
        public MyClassModel () : this((MyClassModel )null) {       }
        public MyClassModel (MyClassModel template) : base(template) {        }

        #region Public Properties

        [UaInstanceDeclaration(NamespaceUri = Namespaces.MyNamespace)]
        public virtual Command Command { get; set; }

        ....



I've tried to flag every single ObjectType I've defined as "IsAbstract" = TRUE, but nothing changed.
Could someone tell me how to achieve it?

Thanks in advance
Paolo
prebecchi
Newbie
Newbie
 
Posts: 1
Joined: 02 Oct 2017, 10:34

Return to UaModeler

Who is online

Users browsing this forum: No registered users and 0 guests