Beispiel #1
0
        public PostalInformationWasImportedFromCrab(
            PostalCode postalCode,
            CrabSubCantonId subCantonId,
            CrabSubCantonCode subCantonCode,
            NisCode nisCode,
            CrabMunicipalityName municipalityName,
            CrabLifetime lifetime,
            CrabTimestamp timestamp,
            CrabOperator @operator,
            CrabModification?modification,
            CrabOrganisation?organisation)
        {
            PostalCode    = postalCode;
            SubCantonId   = subCantonId;
            SubCantonCode = subCantonCode;
            NisCode       = nisCode;

            BeginDate = lifetime.BeginDateTime;

            MunicipalityName         = municipalityName.Name;
            MunicipalityNameLanguage = municipalityName.Language;

            Timestamp    = timestamp;
            Operator     = @operator;
            Modification = modification;
            Organisation = organisation;
        }
Beispiel #2
0
        public void ImportPostalInformationFromCrab(
            PostalCode postalCode,
            CrabSubCantonId subCantonId,
            CrabSubCantonCode subCantonCode,
            NisCode nisCode,
            CrabMunicipalityName municipalityName,
            CrabLifetime lifetime,
            CrabTimestamp timestamp,
            CrabOperator @operator,
            CrabModification?modification,
            CrabOrganisation?organisation)
        {
            ApplyChange(
                new MunicipalityWasAttached(
                    new PostalCode(subCantonCode),
                    nisCode));

            ApplyChange(
                new PostalInformationWasImportedFromCrab(
                    postalCode,
                    subCantonId,
                    subCantonCode,
                    nisCode,
                    municipalityName,
                    lifetime,
                    timestamp,
                    @operator,
                    modification,
                    organisation));
        }