protected override void EnsureRequired()
{
if (this.LinkName == null)
{
throw AmqpEncoding.GetEncodingException(AmqpResources.GetString(AmqpResources.AmqpRequiredFieldNotSet, "name", Name));
}
if (!this.Handle.HasValue)
{
throw AmqpEncoding.GetEncodingException(AmqpResources.GetString(AmqpResources.AmqpRequiredFieldNotSet, "handle", Name));
}
if (!this.Role.HasValue)
{
throw AmqpEncoding.GetEncodingException(AmqpResources.GetString(AmqpResources.AmqpRequiredFieldNotSet, "role", Name));
}
////if (!this.Role.Value && this.InitialDeliveryCount == null)
////{
//// throw AmqpEncoding.GetEncodingException("attach.initial-delivery-count");
////}
}