Page 1 of 1

How to define virtual properties in Class Model definition

Posted: 02 Oct 2017, 10:47
by prebecchi
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