Inheritance: INodeTypeProxy
Exemple #1
0
        public static NodeTypeProxy GetNodeType(SoapNodeType soapNodeType)
        {
            lock (_padlock)
            {
                if (_nodeTypes == null)
                {
                    _nodeTypes = new Dictionary <Guid, NodeTypeProxy>();
                }

                NodeTypeProxy nodeType;

                if (_nodeTypes.ContainsKey(soapNodeType.Id))
                {
                    nodeType = _nodeTypes[soapNodeType.Id];
                }
                else
                {
                    nodeType = new NodeTypeProxy(soapNodeType);

                    _nodeTypes[soapNodeType.Id] = nodeType;
                }

                return(nodeType);
            }
        }
Exemple #2
0
        public static NodeTypeProxy GetNodeType(SoapNodeType soapNodeType)
        {
            lock (_padlock)
            {
                if (_nodeTypes == null)
                {
                    _nodeTypes = new Dictionary<Guid, NodeTypeProxy>();
                }

                NodeTypeProxy nodeType;

                if (_nodeTypes.ContainsKey(soapNodeType.Id))
                {
                    nodeType = _nodeTypes[soapNodeType.Id];
                }
                else
                {
                    nodeType = new NodeTypeProxy(soapNodeType);

                    _nodeTypes[soapNodeType.Id] = nodeType;
                }

                return nodeType;
            }
        }