/// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (HostPartner == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "HostPartner");
     }
     if (GuestPartner == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "GuestPartner");
     }
     if (HostIdentity == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "HostIdentity");
     }
     if (GuestIdentity == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "GuestIdentity");
     }
     if (Content == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Content");
     }
     if (HostIdentity != null)
     {
         HostIdentity.Validate();
     }
     if (GuestIdentity != null)
     {
         GuestIdentity.Validate();
     }
     if (Content != null)
     {
         Content.Validate();
     }
 }
Пример #2
0
 public static AssetsFound New(HostIdentity hostIdentity, params Asset[] assets)
 {
     return new AssetsFound(new [] { hostIdentity }, assets);
 }
Пример #3
0
 public AssetsFound(HostIdentity[] hostIdentities, Asset[] assets)
 {
     HostIdentities = hostIdentities;
     Assets = assets;
 }
Пример #4
0
 public HostCreated(Guid hostId, int version, HostIdentity[] hostIdentities)
 {
     HostId = hostId;
     Version = version;
     HostIdentities = hostIdentities;
 }
Пример #5
0
 public ResolveHost(HostIdentity[] hostIdentities)
 {
     HostIdentities = hostIdentities;
 }