Opc.Ua.Com.Server.ComNamespaceMapper.StringTableMapping.InitializeLocalToRemoteMapping C# (CSharp) Method

InitializeLocalToRemoteMapping() private method

Initializes the local to remote mapping for a pair of string tables.
private InitializeLocalToRemoteMapping ( List localTable, StringTable remoteTable ) : int[]
localTable List The local table.
remoteTable StringTable The remote table.
return int[]
            private int[] InitializeLocalToRemoteMapping(List<string> localTable, StringTable remoteTable)
            {
                List<int> indexes = new List<int>();
                indexes.Add(0);

                if (remoteTable is NamespaceTable)
                {
                    indexes.Add(1);
                }

                for (int ii = 0; ii < localTable.Count; ii++)
                {
                    int index = remoteTable.GetIndex(localTable[ii]);
                    indexes.Add(index);
                }

                return indexes.ToArray();
            }