public static ImportNotificationOverview Load(ImportNotification notification, ImportNotificationAssessment assessment, Exporter exporter, Importer importer, Producer producer, FacilityCollection facilities, Shipment shipment, TransportRoute transportRoute, WasteOperation wasteOperation, WasteType wasteType) { return new ImportNotificationOverview { Notification = notification, Assessment = assessment, Exporter = exporter, Importer = importer, Producer = producer, Facilities = facilities, Shipment = shipment, TransportRoute = transportRoute, WasteOperation = wasteOperation, WasteType = wasteType }; }
public static ImportNotificationOverview Load(ImportNotification notification, ImportNotificationAssessment assessment, Exporter exporter, Importer importer, Producer producer, FacilityCollection facilities, Shipment shipment, TransportRoute transportRoute, WasteOperation wasteOperation, WasteType wasteType) { return(new ImportNotificationOverview { Notification = notification, Assessment = assessment, Exporter = exporter, Importer = importer, Producer = producer, Facilities = facilities, Shipment = shipment, TransportRoute = transportRoute, WasteOperation = wasteOperation, WasteType = wasteType }); }
public static OperationCodesList CreateForNotification(ImportNotification notification, IEnumerable <OperationCode> operationCodes) { var codes = operationCodes as OperationCode[] ?? operationCodes.ToArray(); if (!codes.Any()) { throw new ArgumentException("Operation codes can't be empty", "operationCodes"); } if (!codes.IsUnique()) { throw new ArgumentException("Operation codes must be unique", "operationCodes"); } if (codes.Any(p => !OperationCodeMetadata.IsCodeOfOperationType(p, notification.NotificationType))) { throw new ArgumentException( string.Format("This notification {0} can only have {1} operation codes.", notification.Id, notification.NotificationType), "operationCodes"); } return(new OperationCodesList(codes)); }
public ImportNotificationCreatedEvent(ImportNotification notification) { Notification = notification; }