コード例 #1
0
        public BlockingAction(Action action, IEnumerable <IMessageMatcher> messageMatchers, IMessageBus bus, bool abortOnFailure, bool logToConsole)
        {
            this.action          = action;
            this.abortOnFailure  = abortOnFailure;
            this.messageMatchers = messageMatchers;
            this.logToConsole    = logToConsole;
            this.bus             = bus;

            waitHandles =
                InterestedIn
                .Select(type => new KeyValuePair <Type, ManualResetEvent>(type, new ManualResetEvent(false)))
                .ToDictionary(kv => kv.Key, kv => kv.Value);

            bus.Subscribe(this);
        }
コード例 #2
0
ファイル: FindUsersController.cs プロジェクト: pakoito/web
        private int ReverseYouAreByInterestName(int? interesetedinID)
        {
            if (interesetedinID == null) return 0;

            InterestedIn iiinets = new InterestedIn();

            iiinets.Get(Convert.ToInt32(interesetedinID));

            YouAres iins = new YouAres();

            iins.GetAll();

            foreach (YouAre inn1 in iins)
            {
                if (inn1.Name == iiinets.Name)
                {
                    return inn1.YouAreID; ;
                }
            }

            return 0;
        }
コード例 #3
0
ファイル: UserAccountDetail.cs プロジェクト: pakoito/web
        public static InterestedIns GetDistinctInterests()
        {
            InterestedIns iterests = null;

            // get a configured DbCommand object
            DbCommand comm = DbAct.CreateCommand();
            // set the stored procedure name
            comm.CommandText = "up_GetDistinctInterests";

            // execute the stored procedure
            DataTable dt = DbAct.ExecuteSelectCommand(comm);

            // was something returned?
            if (dt != null && dt.Rows.Count > 0)
            {
                iterests = new InterestedIns();

                InterestedIn iterest = null;

                foreach (DataRow dr in dt.Rows)
                {
                    iterest = new InterestedIn(FromObj.IntFromObj(dr["interestedInID"]));

                    if (iterest.InterestedInID == 0) continue;

                    iterests.Add(iterest);
                }
            }

            return iterests;
        }