System.ServiceModel.PeerResolvers.RefreshInfo.HasBody C# (CSharp) Method

HasBody() public method

public HasBody ( ) : bool
return bool
		public bool HasBody ()
		{
			return true; // FIXME: I have no idea when it returns false
		}
	}

Usage Example

        public virtual RefreshResponseInfo Refresh(RefreshInfo refreshInfo)
        {
            if (refreshInfo == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument("refreshInfo", SR.GetString(SR.PeerNullRefreshInfo));
            }

            ThrowIfClosed("Refresh");

            if (!refreshInfo.HasBody() || String.IsNullOrEmpty(refreshInfo.MeshId) || refreshInfo.RegistrationId == Guid.Empty)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument("refreshInfo", SR.GetString(SR.PeerInvalidMessageBody, refreshInfo));
            }
            RefreshResult     result    = RefreshResult.RegistrationNotFound;
            RegistrationEntry entry     = null;
            MeshEntry         meshEntry = GetMeshEntry(refreshInfo.MeshId, false);
            LiteLock          ll        = null;

            if (meshEntry != null)
            {
                try
                {
                    LiteLock.Acquire(out ll, meshEntry.Gate);
                    if (!meshEntry.EntryTable.TryGetValue(refreshInfo.RegistrationId, out entry))
                    {
                        return(new RefreshResponseInfo(RefreshInterval, result));
                    }
                    lock (entry)
                    {
                        if (entry.State == RegistrationState.OK)
                        {
                            entry.Expires = DateTime.UtcNow + RefreshInterval;
                            result        = RefreshResult.Success;
                        }
                    }
                }
                finally
                {
                    LiteLock.Release(ll);
                }
            }
            return(new RefreshResponseInfo(RefreshInterval, result));
        }
All Usage Examples Of System.ServiceModel.PeerResolvers.RefreshInfo::HasBody