protected override bool MustHandleNew(IObjectBase obj)
        {
            if (obj == null || PkModel == null)
            {
                return(false);
            }

            return(obj.IsAnImplementationOf <IReactionBuilder>() && PkModel.Contains(obj.DowncastTo <IReactionBuilder>()));
        }
Beispiel #2
0
        protected override bool MustHandleNew(IObjectBase obj)
        {
            if (obj == null || PkModel == null)
            {
                return(false);
            }

            if (obj.IsAnImplementationOf <INeighborhoodBuilder>() && PkModel.Contains(((IEntity)obj).RootContainer))
            {
                return(true);
            }

            if (obj.GetType() == typeof(Container) && PkModel.Contains(((IEntity)obj).RootContainer))
            {
                return(true);
            }

            return(false);
        }