Creates encodeable objects based on the type id.

This factory is used to store and retrieve underlying OPC UA system types.

You can manually add types. You can also import all types from a specified assembly. Once the types exist within the factory, these types can be then easily queried.

Esempio n. 1
0
 /// <summary>
 /// Creates an empty factory.
 /// </summary>
 /// <param name="namespaceUris">The namespace uris.</param>
 /// <param name="factory">The factory.</param>
 public BindingFactory(NamespaceTable namespaceUris, EncodeableFactory factory)
 {
     m_bindings = new Dictionary <string, Type>();
     AddDefaultBindings(m_bindings);
     m_namespaceUris = namespaceUris;
     m_factory       = factory;
 }
 /// <summary>
 /// Creates an empty factory.
 /// </summary>
 /// <param name="namespaceUris">The namespace uris.</param>
 /// <param name="factory">The factory.</param>
 public BindingFactory(NamespaceTable namespaceUris, EncodeableFactory factory)
 {
     m_bindings = new Dictionary<string, Type>();
     AddDefaultBindings(m_bindings);
     m_namespaceUris = namespaceUris;
     m_factory = factory;
 }
Esempio n. 3
0
        /// <summary>
        /// Creates a factory by copying the table from another factory.
        /// </summary>
        public EncodeableFactory(EncodeableFactory factory) {
            m_encodeableTypes = new Dictionary<ExpandedNodeId, System.Type>();

#if DEBUG
            m_instanceId = Interlocked.Increment(ref m_globalInstanceCount);
#endif

            lock (factory.m_lock) {
                foreach (KeyValuePair<ExpandedNodeId, System.Type> current in factory.m_encodeableTypes) {
                    m_encodeableTypes.Add(current.Key, current.Value);
                }
            }
        }
		/// <summary>
		/// Creates a factory by copying the table from another factory.
		/// </summary>
		public EncodeableFactory(EncodeableFactory factory)
        {
            m_encodeableTypes = new Dictionary<ExpandedNodeId, System.Type>();

            #if DEBUG
            m_instanceId = Interlocked.Increment(ref m_globalInstanceCount);
            #endif

            lock (factory.m_lock)
            {
                foreach (KeyValuePair<ExpandedNodeId,System.Type> current in factory.m_encodeableTypes)
                {
                    m_encodeableTypes.Add(current.Key, current.Value);
                }
            }
		}
 /// <summary>
 /// Returns the system type for the datatype.
 /// </summary>
 public static Type GetSystemType(NodeId datatypeId, EncodeableFactory factory)
 {
     return TypeInfo.GetSystemType(datatypeId, factory);
 }
 /// <summary>
 /// Returns the system type for the datatype.
 /// </summary>
 public static Type GetSystemType(NodeId datatypeId, EncodeableFactory factory)
 {
     return(TypeInfo.GetSystemType(datatypeId, factory));
 }