コード例 #1
0
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 public override IFeature DeepClone()
 {
     return(new PaperChart
     {
         FeatureName = FeatureName == null
             ? new[] { new FeatureName() }
             : Array.ConvertAll(FeatureName, fn => fn.DeepClone() as IFeatureName),
         FixedDateRange = FixedDateRange == null
             ? new DateRange()
             : FixedDateRange.DeepClone() as IDateRange,
         Id = Id,
         PeriodicDateRange = PeriodicDateRange == null
             ? new DateRange[0]
             : Array.ConvertAll(PeriodicDateRange, p => p.DeepClone() as IDateRange),
         SourceIndication = SourceIndication == null
             ? new SourceIndication()
             : SourceIndication.DeepClone() as ISourceIndication,
         TextContent = TextContent == null
             ? new TextContent[0]
             : Array.ConvertAll(TextContent, t => t.DeepClone() as ITextContent),
         Geometry = Geometry,
         Classification = Classification,
         Copyright = Copyright,
         MaximumDisplayScale = MaximumDisplayScale,
         HorizontalDatumReference = HorizontalDatumReference,
         HorizontalDatumValue = HorizontalDatumValue,
         VerticalDatum = VerticalDatum,
         SoundingDatum = SoundingDatum,
         ProductType = ProductType,
         MinimumDisplayScale = MinimumDisplayScale,
         IssueDate = IssueDate,
         Purpose = Purpose,
         Information = Information == null
             ? new Information[0]
             : Array.ConvertAll(Information, i => i.DeepClone() as IInformation),
         Price = Price == null
             ? new Price[0]
             : Array.ConvertAll(Price, p => p.DeepClone() as IPrice),
         ProducingAgency = ProducingAgency == null
             ? new ProducingAgency()
             : ProducingAgency.DeepClone() as IProducingAgency,
         ChartNumber = ChartNumber,
         DistributionStatus = DistributionStatus,
         CompilationScale = CompilationScale,
         EditionNumber = EditionNumber,
         SpecificUsage = SpecificUsage,
         ProducerCode = ProducerCode,
         ProducerNation = ProducerNation,
         FrameDimensions = FrameDimensions,
         PrintInformation = PrintInformation == null
             ? new PrintInformation()
             : PrintInformation.DeepClone() as IPrintInformation,
         Links = Links == null
             ? new Link[0]
             : Array.ConvertAll(Links, l => l.DeepClone() as ILink)
     });
 }
コード例 #2
0
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 public override IFeature DeepClone()
 {
     return(new NauticalProducts
     {
         FeatureName = FeatureName == null
             ? new[] { new FeatureName() }
             : Array.ConvertAll(FeatureName, fn => fn.DeepClone() as IFeatureName),
         FixedDateRange = FixedDateRange == null
             ? new DateRange()
             : FixedDateRange.DeepClone() as IDateRange,
         Id = Id,
         PeriodicDateRange = PeriodicDateRange == null
             ? new DateRange[0]
             : Array.ConvertAll(PeriodicDateRange, p => p.DeepClone() as IDateRange),
         SourceIndication = SourceIndication == null
             ? new SourceIndication()
             : SourceIndication.DeepClone() as ISourceIndication,
         TextContent = TextContent == null
             ? new TextContent[0]
             : Array.ConvertAll(TextContent, t => t.DeepClone() as ITextContent),
         Geometry = Geometry,
         Classification = Classification,
         Copyright = Copyright,
         MaximumDisplayScale = MaximumDisplayScale,
         HorizontalDatumReference = HorizontalDatumReference,
         HorizontalDatumValue = HorizontalDatumValue,
         VerticalDatum = VerticalDatum,
         SoundingDatum = SoundingDatum,
         ProductType = ProductType,
         MinimumDisplayScale = MinimumDisplayScale,
         IssueDate = IssueDate,
         Purpose = Purpose,
         Information = Information == null
             ? new Information[0]
             : Array.ConvertAll(Information, i => i.DeepClone() as IInformation),
         Price = Price == null
             ? new Price[0]
             : Array.ConvertAll(Price, p => p.DeepClone() as IPrice),
         ProducingAgency = ProducingAgency == null
             ? new ProducingAgency()
             : ProducingAgency.DeepClone() as IProducingAgency,
         PublicationNumber = PublicationNumber,
         DataSetName = DataSetName,
         Version = Version,
         ServiceStatus = ServiceStatus,
         Keywords = Keywords,
         ProductSpecification = ProductSpecification == null
             ? new ReferenceSpecification()
             : ProductSpecification.DeepClone() as IReferenceSpecification,
         OnlineResource = OnlineResource == null
             ? new OnlineResource()
             : OnlineResource.DeepClone() as IOnlineResource,
         ServiceSpecification = ServiceSpecification == null
             ? new ReferenceSpecification()
             : ServiceSpecification.DeepClone() as IReferenceSpecification,
         ServiceDesign = ServiceDesign == null
             ? new ReferenceSpecification()
             : ServiceDesign.DeepClone() as IReferenceSpecification,
         Links = Links == null
             ? new Link[0]
             : Array.ConvertAll(Links, l => l.DeepClone() as ILink)
     });
 }