Exemplo n.º 1
0
        /// <summary>
        /// Lazy fetch for restriction table associated with COS - this needs to be implemented as a method instead of a
        /// property so that if a grid is bound to the generic list of objects it doesn't "lazy fetch" it for display purposes resulting
        /// in needless data fetching
        /// </summary>
        /// <param name="pForceRefetchOfData">
        /// Pass as true to force the restriction table to be refetched even if its already be populated earlier.
        /// </param>
        /// <returns>
        /// Instance of the RestrictionTable class
        /// </returns>
        public RestrictionTable OutcallRestrictionTable(bool pForceRefetchOfData = false)
        {
            if (pForceRefetchOfData)
            {
                _restrictionTableOutcall = null;
            }

            if (string.IsNullOrEmpty(this.OutcallRestrictionObjectId))
            {
                return(null);
            }

            if (_restrictionTableOutcall == null)
            {
                try
                {
                    _restrictionTableOutcall = new RestrictionTable(HomeServer, this.OutcallRestrictionObjectId);
                }
                catch (Exception ex)
                {
                    HomeServer.RaiseErrorEvent("Failed fetching OutcallRestrictionTable:" + ex);
                    _restrictionTableOutcall = null;
                }
            }

            return(_restrictionTableOutcall);
        }
Exemplo n.º 2
0
        public List <PrivateListMember> PrivateListMembers(bool pForceRefetchOfData = false)
        {
            if (pForceRefetchOfData)
            {
                _privateListMembers = null;
            }

            if (_privateListMembers == null)
            {
                WebCallResult res = PrivateListMember.GetPrivateListMembers(HomeServer, this.ObjectId, _userOwnerObjectId,
                                                                            out _privateListMembers);
                if (res.Success == false)
                {
                    HomeServer.RaiseErrorEvent("Error getting private list members:" + res);
                }
            }

            return(_privateListMembers);
        }