HasBody() public method

public HasBody ( ) : bool
return bool
 public virtual RegisterResponseInfo Register(RegisterInfo registerInfo)
 {
     if (registerInfo == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument("registerInfo", System.ServiceModel.SR.GetString("PeerNullRegistrationInfo"));
     }
     this.ThrowIfClosed("Register");
     if (!registerInfo.HasBody() || string.IsNullOrEmpty(registerInfo.MeshId))
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument("registerInfo", System.ServiceModel.SR.GetString("PeerInvalidMessageBody", new object[] { registerInfo }));
     }
     return(this.Register(registerInfo.ClientId, registerInfo.MeshId, registerInfo.NodeAddress));
 }
Ejemplo n.º 2
0
        public virtual RegisterResponseInfo Register(RegisterInfo registerInfo)
        {
            if (registerInfo == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument("registerInfo", SR.GetString(SR.PeerNullRegistrationInfo));
            }

            ThrowIfClosed("Register");

            if (!registerInfo.HasBody() || String.IsNullOrEmpty(registerInfo.MeshId))
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument("registerInfo", SR.GetString(SR.PeerInvalidMessageBody, registerInfo));
            }
            return(Register(registerInfo.ClientId, registerInfo.MeshId, registerInfo.NodeAddress));
        }
        public virtual RegisterResponseInfo Register(RegisterInfo registerInfo)
        {
            if (registerInfo == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument("registerInfo", SR.GetString(SR.PeerNullRegistrationInfo));
            }

            ThrowIfClosed("Register");

            if (!registerInfo.HasBody() || String.IsNullOrEmpty(registerInfo.MeshId))
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument("registerInfo", SR.GetString(SR.PeerInvalidMessageBody, registerInfo));
            }
            return Register(registerInfo.ClientId, registerInfo.MeshId, registerInfo.NodeAddress);
        }
 public virtual RegisterResponseInfo Register(RegisterInfo registerInfo)
 {
     if (registerInfo == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument("registerInfo", System.ServiceModel.SR.GetString("PeerNullRegistrationInfo"));
     }
     this.ThrowIfClosed("Register");
     if (!registerInfo.HasBody() || string.IsNullOrEmpty(registerInfo.MeshId))
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument("registerInfo", System.ServiceModel.SR.GetString("PeerInvalidMessageBody", new object[] { registerInfo }));
     }
     return this.Register(registerInfo.ClientId, registerInfo.MeshId, registerInfo.NodeAddress);
 }