Exemple #1
0
        public IDManager()
        {
            VertexTypeID = new UniqueID();
            EdgeTypeID = new UniqueID();

            _vertexIDs = new Dictionary<long, UniqueID>();
            _edgeIDs = new Dictionary<long, UniqueID>();
        }
Exemple #2
0
        public UniqueID GetEdgeTypeUniqeID(long myEdgeTypeID)
        {
            if (!_edgeIDs.ContainsKey(myEdgeTypeID))

                lock (_edgeIDs)
                {
                    if (!_edgeIDs.ContainsKey(myEdgeTypeID))
                    {
                        _edgeIDs[myEdgeTypeID] = new UniqueID();
                    }
                }

            return _edgeIDs[myEdgeTypeID];
        }
Exemple #3
0
        public UniqueID GetVertexTypeUniqeID(long myVertexTypeID)
        {
            if (!_vertexIDs.ContainsKey(myVertexTypeID))

                lock (_vertexIDs)
                {
                    if (!_vertexIDs.ContainsKey(myVertexTypeID))
                    {
                        _vertexIDs[myVertexTypeID] = new UniqueID();
                    }
                }

            return _vertexIDs[myVertexTypeID];
        }
Exemple #4
0
        public UniqueID this[long myVertexTypeID]
        {
            get
            {

                if (!_vertexIDs.ContainsKey(myVertexTypeID))
                    lock (_vertexIDs)
                    {
                        if (!_vertexIDs.ContainsKey(myVertexTypeID))
                        {
                            _vertexIDs[myVertexTypeID] = new UniqueID();
                        }
                    }
                return _vertexIDs[myVertexTypeID];
            }
        }