Exemple #1
0
        /// <summary>
        /// Creates a new object that is a deep copy of the current instance.
        /// </summary>
        public object Clone()
        {
            FacilitySearchFilter clone = this.MemberwiseClone() as FacilitySearchFilter;

            clone.AreaFilter = this.AreaFilter != null?this.AreaFilter.Clone() as AreaFilter : null;

            clone.FacilityLocationFilter = this.FacilityLocationFilter != null?this.FacilityLocationFilter.Clone() as FacilityLocationFilter : null;

            clone.YearFilter = this.YearFilter != null?this.YearFilter.Clone() as YearFilter : null;

            clone.ActivityFilter = this.ActivityFilter != null?this.ActivityFilter.Clone() as ActivityFilter : null;

            clone.PollutantFilter = this.PollutantFilter != null?this.PollutantFilter.Clone() as PollutantFilter : null;

            clone.MediumFilter = this.MediumFilter != null?this.MediumFilter.Clone() as MediumFilter : null;

            clone.AccidentalFilter = this.AccidentalFilter != null?this.AccidentalFilter.Clone() as AccidentalFilter : null;

            clone.WasteTypeFilter = this.WasteTypeFilter != null?this.WasteTypeFilter.Clone() as WasteTypeFilter : null;

            clone.WasteTreatmentFilter = this.WasteTreatmentFilter != null?this.WasteTreatmentFilter.Clone() as WasteTreatmentFilter : null;

            clone.WasteReceiverFilter = this.WasteReceiverFilter != null?this.WasteReceiverFilter.Clone() as WasteReceiverFilter : null;

            return(clone);
        }
Exemple #2
0
        public static FacilitySearchFilter ConvertToFacilitySearchFilter(IndustrialActivitySearchFilter filter)
        {
            FacilitySearchFilter converted = new FacilitySearchFilter();

            converted.AreaFilter     = clone(filter.AreaFilter) as AreaFilter;
            converted.YearFilter     = clone(filter.YearFilter) as YearFilter;
            converted.ActivityFilter = clone(filter.ActivityFilter) as ActivityFilter;
            return(converted);
        }
Exemple #3
0
        public static FacilitySearchFilter ConvertToFacilitySearchFilter(PollutantReleaseSearchFilter filter)
        {
            FacilitySearchFilter converted = new FacilitySearchFilter();

            converted.AreaFilter      = clone(filter.AreaFilter) as AreaFilter;
            converted.YearFilter      = clone(filter.YearFilter) as YearFilter;
            converted.ActivityFilter  = clone(filter.ActivityFilter) as ActivityFilter;
            converted.PollutantFilter = clone(filter.PollutantFilter) as PollutantFilter;
            converted.MediumFilter    = clone(filter.MediumFilter) as MediumFilter;
            return(converted);
        }
Exemple #4
0
        public static FacilitySearchFilter ConvertToFacilitySearchFilter(WasteTransferSearchFilter filter)
        {
            FacilitySearchFilter converted = new FacilitySearchFilter();

            converted.AreaFilter           = clone(filter.AreaFilter) as AreaFilter;
            converted.YearFilter           = clone(filter.YearFilter) as YearFilter;
            converted.ActivityFilter       = clone(filter.ActivityFilter) as ActivityFilter;
            converted.WasteTypeFilter      = clone(filter.WasteTypeFilter) as WasteTypeFilter;
            converted.WasteTreatmentFilter = clone(filter.WasteTreatmentFilter) as WasteTreatmentFilter;
            converted.WasteReceiverFilter  = null;

            return(converted);
        }
Exemple #5
0
        public static FacilitySearchFilter ConvertToFacilitySearchFilter(PollutantTransfersSearchFilter filter)
        {
            FacilitySearchFilter converted = new FacilitySearchFilter();

            converted.AreaFilter      = clone(filter.AreaFilter) as AreaFilter;
            converted.YearFilter      = clone(filter.YearFilter) as YearFilter;
            converted.ActivityFilter  = clone(filter.ActivityFilter) as ActivityFilter;
            converted.PollutantFilter = clone(filter.PollutantFilter) as PollutantFilter;

            // create medium filter with transfers
            MediumFilter mediumFilter = new MediumFilter();

            mediumFilter.TransferToWasteWater = true;
            converted.MediumFilter            = mediumFilter;

            return(converted);
        }