Пример #1
0
        /// <summary> Constructs an LdapSearchConstraints object initialized with values
        /// from an existing constraints object (LdapConstraints
        /// or LdapSearchConstraints).
        /// </summary>
        public LdapSearchConstraints(LdapConstraints cons) : base(cons.TimeLimit, cons.ReferralFollowing, cons.getReferralHandler(), cons.HopLimit)
        {
            InitBlock();
            LdapControl[] lsc = cons.getControls();
            if (lsc != null)
            {
                LdapControl[] generated_var = new LdapControl[lsc.Length];
                lsc.CopyTo(generated_var, 0);
                setControls(generated_var);
            }
            System.Collections.Hashtable lp = cons.Properties;
            if (lp != null)
            {
                Properties = (System.Collections.Hashtable)lp.Clone();
            }

            if (cons is LdapSearchConstraints)
            {
                LdapSearchConstraints scons = (LdapSearchConstraints)cons;
                serverTimeLimit = scons.ServerTimeLimit;
                dereference     = scons.Dereference;
                maxResults      = scons.MaxResults;
                batchSize       = scons.BatchSize;
            }
            // Get a unique connection name for debug
        }
Пример #2
0
        void ThreadLoop()
        {
            while (!this.m_disposed)
            {
                System.Collections.Hashtable hash = null;
                lock (lockobject)
                    hash = (System.Collections.Hashtable)dataPoints.Clone();

                if (hash.Count > 0)
                {
                    DateTime last = new DateTime();
                    foreach (var value in hash.Values)
                    {
                        last = (DateTime)value;
                    }
                    if (DateTime.Now.Subtract(last).Seconds > 0)
                    {
                        lock (lockobject)
                            dataPoints.Clear();
                    }
                }
                hash.Clear();
                hash = null;
                Thread.Sleep(250);
            }
        }
Пример #3
0
        public virtual void  refreshListeners()
        {
            Hashtable clonedTable;

            lock (listeners.SyncRoot)
            {
                clonedTable = (Hashtable)listeners.Clone();
            }
            foreach (Listener l in clonedTable)
            {
                l.refresh();
            }
        }
Пример #4
0
        public virtual void  refreshListeners()
        {
            Hashtable clonedTable;

            lock (listeners.SyncRoot)
            {
                clonedTable = (Hashtable)listeners.Clone();
            }
            foreach (DictionaryEntry entry in clonedTable)
            {
                if (entry.Value != null)
                {
                    ((Listener)entry.Value).refresh();
                }
            }
        }
Пример #5
0
        static int _m_Clone(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                System.Collections.Hashtable gen_to_be_invoked = (System.Collections.Hashtable)translator.FastGetCSObj(L, 1);



                {
                    object gen_ret = gen_to_be_invoked.Clone(  );
                    translator.PushAny(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Пример #6
0
 /// <summary> Clones an LdapConstraints object.
 ///
 /// </summary>
 /// <returns> An LdapConstraints object.
 /// </returns>
 public System.Object Clone()
 {
     try
     {
         System.Object newObj = base.MemberwiseClone();
         if (controls != null)
         {
             ((LdapConstraints)newObj).controls = new LdapControl[controls.Length];
             controls.CopyTo(((LdapConstraints)newObj).controls, 0);
         }
         if (properties != null)
         {
             ((LdapConstraints)newObj).properties = (System.Collections.Hashtable)properties.Clone();
         }
         return(newObj);
     }
     catch (System.Exception ce)
     {
         throw new System.SystemException("Internal error, cannot create clone");
     }
 }
Пример #7
0
 /// <summary>
 /// Returns a copy of the hashtable that carries the
 /// entries for the current graphical context
 /// 获取存储当前图形上下文配置的哈希表副本
 /// </summary>
 /// <returns></returns>
 public System.Collections.Hashtable CopyGraphicSettings()
 {
     return((System.Collections.Hashtable)_GCSettings.Clone());
 }