Пример #1
0
 /// <summary>
 /// Gets if all output pins in a mutex group(s) is(are) connected
 /// </summary>
 /// <param name="groups">Mutex group(s) to check for connections</param>
 /// <returns>true if all pins are connected</returns>
 internal bool IsOutputMutexGroupsConnected(PinMutexGroups groups)
 {
     foreach (DaggerOutputPin pin in OutputPins)
     {
         if ((pin.MutexGroup & groups) != PinMutexGroups.None && !pin.IsConnected)
         {
             //there is a pin in one of the mutex groups that is not connected
             return(false);
         }
     }
     return(true);
 }
Пример #2
0
        protected DaggerBasePin(SerializationInfo info, StreamingContext ctxt)
        {
            if (info == null)
            {
                throw new System.ArgumentNullException("info");
            }

            _instanceGuid     = (Guid)info.GetValue("InstanceGuid", typeof(Guid));
            DataType          = (Type)info.GetValue("DataType", typeof(Type));
            Name              = (string)info.GetValue("Name", typeof(string));
            _mutexGroup       = (PinMutexGroups)info.GetInt32("Mutex");
            _reflectedTargets = (List <FieldInfo>)info.GetValue("ReflectedTargets", typeof(List <FieldInfo>));
            _pinInterfacePin  = info.GetBoolean("IsPinInterface");
        }