public static void ValidateAttributes(IProjection projection) { if (projection.Attributes.Any(a => !a.Metadata.Identity.Schema.Equals(projection.Metadata.Identity.Schema))) { throw ProjectionException.FromProjection(projection, "All attributes must belong to the same projection schema."); } }
public static void ValidateMetadata(IProjection projection) { if (!projection.Identity.Schema.Equals(projection.Metadata.Identity.Schema)) { throw ProjectionException.FromProjection(projection, "Metadata and identity must belong to the same schema."); } }
public static void ValidateField(IProjection projection) { if (projection.Source != null && !projection.Identity.Schema.Equals(projection.Source.Identity.Schema)) { throw ProjectionException.FromProjection(projection, "Field and identity must belong to the same schema."); } }