@@ -851,102 +851,6 @@ public bool Equals(LookupClientSettings other)
851851 && Equals ( MaximumCacheTimeout , other . MaximumCacheTimeout )
852852 && base . Equals ( other ) ;
853853 }
854-
855- // TODO: remove if LookupClient settings can be made readonly
856- internal LookupClientSettings Copy (
857- IReadOnlyCollection < NameServer > nameServers ,
858- TimeSpan ? minimumCacheTimeout ,
859- bool ? continueOnDnsError = null ,
860- bool ? enableAuditTrail = null ,
861- bool ? recursion = null ,
862- int ? retries = null ,
863- bool ? throwDnsErrors = null ,
864- TimeSpan ? timeout = null ,
865- bool ? useCache = null ,
866- bool ? useRandomNameServer = null ,
867- bool ? useTcpFallback = null ,
868- bool ? useTcpOnly = null )
869- {
870- // auto resolved flag might get lost here. But this stuff gets deleted anyways.
871- return new LookupClientSettings ( new LookupClientOptions ( nameServers ? . ToArray ( ) )
872- {
873- MinimumCacheTimeout = minimumCacheTimeout ,
874- ContinueOnDnsError = continueOnDnsError ?? ContinueOnDnsError ,
875- EnableAuditTrail = enableAuditTrail ?? EnableAuditTrail ,
876- Recursion = recursion ?? Recursion ,
877- Retries = retries ?? Retries ,
878- ThrowDnsErrors = throwDnsErrors ?? ThrowDnsErrors ,
879- Timeout = timeout ?? Timeout ,
880- UseCache = useCache ?? UseCache ,
881- UseRandomNameServer = useRandomNameServer ?? UseRandomNameServer ,
882- UseTcpFallback = useTcpFallback ?? UseTcpFallback ,
883- UseTcpOnly = useTcpOnly ?? UseTcpOnly ,
884- MaximumCacheTimeout = MaximumCacheTimeout ,
885- ExtendedDnsBufferSize = ExtendedDnsBufferSize ,
886- RequestDnsSecRecords = RequestDnsSecRecords ,
887- ContinueOnEmptyResponse = ContinueOnEmptyResponse
888- } ) ;
889- }
890-
891- // TODO: remove if LookupClient settings can be made readonly
892- internal LookupClientSettings WithContinueOnDnsError ( bool value )
893- {
894- return Copy ( NameServers , MinimumCacheTimeout , continueOnDnsError : value ) ;
895- }
896-
897- // TODO: remove if LookupClient settings can be made readonly
898- internal LookupClientSettings WithEnableAuditTrail ( bool value )
899- {
900- return Copy ( NameServers , MinimumCacheTimeout , enableAuditTrail : value ) ;
901- }
902-
903- // TODO: remove if LookupClient settings can be made readonly
904- internal LookupClientSettings WithMinimumCacheTimeout ( TimeSpan ? value )
905- {
906- return Copy ( NameServers , minimumCacheTimeout : value ) ;
907- }
908-
909- // TODO: remove if LookupClient settings can be made readonly
910- internal LookupClientSettings WithRecursion ( bool value )
911- {
912- return Copy ( NameServers , MinimumCacheTimeout , recursion : value ) ;
913- }
914-
915- // TODO: remove if LookupClient settings can be made readonly
916- internal LookupClientSettings WithRetries ( int value )
917- {
918- return Copy ( NameServers , MinimumCacheTimeout , retries : value ) ;
919- }
920-
921- // TODO: remove if LookupClient settings can be made readonly
922- internal LookupClientSettings WithThrowDnsErrors ( bool value )
923- {
924- return Copy ( NameServers , MinimumCacheTimeout , throwDnsErrors : value ) ;
925- }
926-
927- // TODO: remove if LookupClient settings can be made readonly
928- internal LookupClientSettings WithTimeout ( TimeSpan value )
929- {
930- return Copy ( NameServers , MinimumCacheTimeout , timeout : value ) ;
931- }
932-
933- // TODO: remove if LookupClient settings can be made readonly
934- internal LookupClientSettings WithUseCache ( bool value )
935- {
936- return Copy ( NameServers , MinimumCacheTimeout , useCache : value ) ;
937- }
938-
939- // TODO: remove if LookupClient settings can be made readonly
940- internal LookupClientSettings WithUseTcpFallback ( bool value )
941- {
942- return Copy ( NameServers , MinimumCacheTimeout , useTcpFallback : value ) ;
943- }
944-
945- // TODO: remove if LookupClient settings can be made readonly
946- internal LookupClientSettings WithUseTcpOnly ( bool value )
947- {
948- return Copy ( NameServers , MinimumCacheTimeout , useTcpOnly : value ) ;
949- }
950854 }
951855
952856#pragma warning restore CS0659 // Type overrides Object.Equals(object o) but does not override Object.GetHashCode()
0 commit comments