コード例 #1
0
        public Prosumer([JetBrains.Annotations.NotNull] string houseGuid,
                        [JetBrains.Annotations.NotNull] string name,
                        HouseComponentType houseComponentType,
                        [CanBeNull] string sourceGuid,
                        long isn,
                        [JetBrains.Annotations.NotNull] string hausanschlussGuid,
                        [JetBrains.Annotations.NotNull] string hausanschlussKey,
                        GenerationOrLoad generationOrLoad,
                        [JetBrains.Annotations.NotNull] string trafoKreis,
                        [JetBrains.Annotations.NotNull] string providerName,
                        [JetBrains.Annotations.NotNull] string profileSourceName)
        {
            HouseGuid          = houseGuid;
            Name               = name;
            HouseComponentType = houseComponentType;
            SourceGuid         = sourceGuid;
            Isn = isn;
            HausanschlussGuid = hausanschlussGuid;
            HausanschlussKey  = hausanschlussKey;
            GenerationOrLoad  = generationOrLoad;

            TrafoKreis        = trafoKreis;
            ProviderName      = providerName;
            ProfileSourceName = profileSourceName;
        }
コード例 #2
0
        private static Column GetColumn(HouseComponentType hct)
        {
            // ReSharper disable once SwitchStatementHandlesSomeKnownEnumValuesWithDefault
            switch (hct)
            {
            case HouseComponentType.Household:
                return(Column.BFH_HouseholdEnergyUse);

            case HouseComponentType.Infrastructure:
                return(Column.BFH_Infrastructure);

            case HouseComponentType.Photovoltaik:
                return(Column.BFH_Photovoltaik);

            case HouseComponentType.BusinessNoLastgangLowVoltage:
                return(Column.BFH_BusinessNoLastgangLowVoltage);

            case HouseComponentType.Kwkw:
                return(Column.BFH_Kwkw);

            case HouseComponentType.BusinessWithLastgangLowVoltage:
                return(Column.BFH_BusinessWithLastgangLowVoltage);

            case HouseComponentType.HouseLoad:
                return(Column.BFH_HouseLoad);

            case HouseComponentType.HouseGeneration:
                return(Column.BFH_HouseGeneration);

            case HouseComponentType.LastgangGeneration:
                return(Column.BFH_LastgangGeneration);

            case HouseComponentType.StreetLight:
                return(Column.BFH_StreetLight);

            case HouseComponentType.BusinessNoLastgangHighVoltage:
                return(Column.BFH_BusinessNoLastgangHighVoltage);

            case HouseComponentType.BusinessWithLastgangHighVoltage:
                return(Column.BFH_BusinessWithLastgangHighVoltage);

            case HouseComponentType.OutboundElectricCommuter:
                return(Column.BFH_OutboundElectricCommuter);

            case HouseComponentType.Heating:
                return(Column.BFH_Heating);

            case HouseComponentType.Cooling:
                return(Column.BFH_Cooling);

            case HouseComponentType.Dhw:
                return(Column.BFH_Dhw);

            default: throw new FlaException("No match");
            }
        }
コード例 #3
0
 public override int GetHashCode()
 {
     unchecked {
         var hashCode = (Trafokreis != null ? Trafokreis.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ProviderType != null ? ProviderType.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (int)SumType;
         hashCode = (hashCode * 397) ^ (int)GenerationOrLoad;
         hashCode = (hashCode * 397) ^ (HouseName != null ? HouseName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ProfileSource != null ? ProfileSource.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (HouseComponentType != null ? HouseComponentType.GetHashCode() : 0);
         return(hashCode);
     }
 }
        private Prosumer ProvideLPGProfile([NotNull] ProviderParameterDto parameters, [NotNull] Hausanschluss ha, [NotNull] Household household)
        {
            string prosumerName = household.Name;
            const HouseComponentType houseComponentType = HouseComponentType.Household;
            string sourceGuid   = household.SourceGuid;
            string householdKey = household.HouseholdKey;
            long   isn          = household.FinalIsn;

            return(_lpgloader.LoadProsumer(parameters,
                                           ha,
                                           prosumerName,
                                           houseComponentType,
                                           LoadtypetoSearchFor,
                                           _saveableEntry,
                                           sourceGuid,
                                           householdKey,
                                           household.HouseGuid,
                                           isn,
                                           Services.RunningConfig));
        }