Esempio n. 1
0
        /// <summary>
        /// Sets the sense option.
        /// </summary>
        /// <param name='flag'>
        /// Flag.
        /// </param>
        public void SetSenseOption(SenseOption.SenseOptionID flag)
        {
            var option = _senseOptions.Find(i => i.ID == flag);

            if (option == null)
            {
                option = new SenseOption(flag);
                _senseOptions.Add(option);
            }
            option.RefCounter++;
        }
Esempio n. 2
0
        /// <summary>
        /// Determines whether the flag is already set (and has at least one reference) or if it is initialized
        /// </summary>
        public bool IsSenseOptionSet(SenseOption.SenseOptionID flag, bool orInitialized)
        {
            var option = _senseOptions.Find(i => i.ID == flag);

            if (option == null)
            {
                return(false);
            }
            if (!orInitialized)
            {
                return(option.RefCounter > 0);
            }
            else
            {
                return(option.Initialized || option.RefCounter > 0);
            }
        }
Esempio n. 3
0
 /// <summary>
 /// Determines whether the flag is already set (and has at least one reference).
 /// </summary>
 public bool IsSenseOptionSet(SenseOption.SenseOptionID flag)
 {
     return(IsSenseOptionSet(flag, false));
 }