Exemple #1
0
 public PostOfficeBox(String ident)
 {
     _ident            = IDENT_PREFIX + StringTools.toHex(SecurityTools.getSHA512(StringTools.ENCODING_SJIS.GetBytes(ident))).Substring(0, 32);
     _mutex            = new MutexObject(_ident + "_m");
     _messagePostEvent = new NamedEventObject(_ident + "_e");
     _messageDir       = Path.Combine(Environment.GetEnvironmentVariable("TMP"), _ident);
 }
Exemple #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="ident">名前付きイベント名に使うので注意!</param>
        public Nectar2(string ident)
        {
            _evs = new NamedEventObject[(int)E_INDEX.E_MAX];

            for (int index = 0; index < (int)E_INDEX.E_MAX; index++)
            {
                _evs[index] = new NamedEventObject("Nectar2_" + COMMON_ID + "_" + ident + "_" + index);
            }
        }
Exemple #3
0
 public void Dispose()
 {
     if (_evForSet != null)
     {
         _evForSet.Dispose();
         _evForSet = null;
         _evForWait.Dispose();
         _evForWait = null;
     }
 }
Exemple #4
0
            public void Dispose()
            {
                if (_mutex != null)
                {
                    _mutex.Dispose();
                    _mutex = null;

                    _messagePostEvent.Dispose();
                    _messagePostEvent = null;
                }
            }
Exemple #5
0
 public NamedEventPair(string name)
 {
     _evForSet  = new NamedEventObject(name);
     _evForWait = new NamedEventObject(name);
 }