Clone() public method

public Clone ( ) : Object
return Object
 static public int Clone(IntPtr l)
 {
     try {
         System.Collections.Queue self = (System.Collections.Queue)checkSelf(l);
         var ret = self.Clone();
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
示例#2
0
 static int Clone(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         System.Collections.Queue obj = (System.Collections.Queue)ToLua.CheckObject(L, 1, typeof(System.Collections.Queue));
         object o = obj.Clone();
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
示例#3
0
        public void corrigeLinksComCaracteresEspeciais(Url u, Queue q)
        {
            if (q.Count > 0)
            {
                Queue temp = new Queue();
                Url turl = new Url();
                StringCollection sc = new StringCollection();
                temp = (Queue)(q.Clone());
                int i = 0;

                while (i < temp.Count)
                {
                    turl = (Url)(temp.Dequeue());
                    if (turl.getNome().IndexOf('?') != -1)
                        sc.Add(turl.getNome());
                    i++;
                }

                i = sc.Count - 1;
                int j;
                string codigo;
                foreach (object obj in sc)
                {
                    j = u.getCode().IndexOf(sc[i]);
                    string ts;
                    ts = sc[i].Replace('?', '-');
                    if (j != -1)
                    {
                        codigo = u.getCode();
                        codigo = codigo.Remove(j, ts.Length);
                        u.setCode(codigo.Insert(j, ts));
                    }
                    i--;
                }
            }
        }
示例#4
0
 public override object Clone()
 {
     lock (queue) {
         return(new SyncQueue((Queue)queue.Clone()));
     }
 }
示例#5
0
 public override Object Clone()
 {
     lock (root) {
         return(new SynchronizedQueue((Queue)_q.Clone()));
     }
 }
示例#6
0
 // Implement the ICloneable interface.
 public override Object Clone()
 {
     return(new SynchronizedQueue((Queue)(queue.Clone())));
 }
示例#7
0
 private bool existeEmQurls(Queue subUrls, Url u)
 {
     int i;
     Queue temp = new Queue();
     temp = (Queue)(subUrls.Clone());
     Url t = new Url();
     for (i = 0; i < subUrls.Count; i++)
     {
         t = (Url)(temp.Dequeue());
         if (t.getNome() == u.getNome())
             return true;
     }
     return false;
 }