Exemplo n.º 1
0
 static XQueryFunctionTable()
 {
     if (shared == null)
     {
         shared = new XQueryFunctionTable();
         Register(typeof(XQueryFuncs));
     }
 }
Exemplo n.º 2
0
 public static XQueryFunctionTable CreateInstance()
 {
     XQueryFunctionTable res = new XQueryFunctionTable();
     foreach (KeyValuePair<object, FunctionSocket> kvp in shared.m_table)
         res.m_table.Add(kvp.Key, kvp.Value);
     return res;
 }
Exemplo n.º 3
0
 public void CopyFrom(XQueryFunctionTable src, XQueryContext module)
 {
     foreach (KeyValuePair<object, FunctionSocket> kvp in src.m_table)
     {
         FunctionSocket curr = kvp.Value;
         while (curr != null)
         {
             if (curr.rec.module == module)
             {
                 FunctionSocket sock = new FunctionSocket(curr.rec);
                 FunctionSocket next;
                 if (m_table.TryGetValue(curr.rec.id, out next))
                     sock.next = next;
                 m_table[curr.rec.id] = sock;
             }
             curr = curr.next;
         }
     }
 }