Esempio n. 1
0
        private string GetNameForOwnLife(IHasOwnLife ownLife)
        {
            var peripheral = ownLife as IPeripheral;

            if (peripheral != null)
            {
                return(GetAnyNameOrTypeName(peripheral));
            }
            return(ownLife.ToString());
        }
Esempio n. 2
0
 public void UnregisterIHasOwnLife(IHasOwnLife own)
 {
     lock (externals)
     {
         registeredIHasOwnLifeObjects.RemoveAll(x => x.Target == own);
         if (alreadyStarted)
         {
             own.Pause();
         }
     }
 }
Esempio n. 3
0
 public void RegisterIHasOwnLife(IHasOwnLife own)
 {
     lock (externals)
     {
         registeredIHasOwnLifeObjects.Add(new SerializableWeakReference <IHasOwnLife>(own));
         if (!paused)
         {
             own.Start();
         }
     }
 }