The base class for all variable type nodes.
Inheritance: BaseTypeState
Ejemplo n.º 1
0
        /// <summary>
        /// Initializes the instance from another instance.
        /// </summary>
        protected override void Initialize(ISystemContext context, NodeState source)
        {
            BaseVariableTypeState type = source as BaseVariableTypeState;

            if (type != null)
            {
                m_value           = Utils.Clone(type.m_value);
                m_dataType        = type.m_dataType;
                m_valueRank       = type.m_valueRank;
                m_arrayDimensions = null;

                if (type.m_arrayDimensions != null)
                {
                    m_arrayDimensions = new ReadOnlyList <uint>(type.m_arrayDimensions, true);
                }
            }

            m_value = ExtractValueFromVariant(context, m_value, false);

            base.Initialize(context, source);
        }