@@ -388,13 +388,13 @@ extension ProgressManager {
388388 /// - Parameter property: The type of the integer property to summarize. Must be a property
389389 /// where both the value and summary types are `Int`.
390390 /// - Returns: An `Int` summary value for the specified property.
391- public func summary< P: Property > ( of property: P . Type ) -> P . Summary where P. Value == Int , P. Summary == Int {
392- if property . self == ProgressManager . Properties. TotalFileCount. self {
391+ public func summary< P: Property > ( of property: KeyPath < ProgressManager . Properties , P . Type > ) -> P . Summary where P. Value == Int , P. Summary == Int {
392+ if P . self == ProgressManager . Properties. TotalFileCount. self {
393393 self . access ( keyPath: \. totalFileCount)
394394 self . access ( keyPath: \. totalFileCountSummary)
395395 self . didSet ( keyPath: \. totalFileCountSummary)
396396 return updatedFileCount ( type: . total)
397- } else if property . self == ProgressManager . Properties. CompletedFileCount. self {
397+ } else if P . self == ProgressManager . Properties. CompletedFileCount. self {
398398 self . access ( keyPath: \. completedFileCount)
399399 self . access ( keyPath: \. completedFileCountSummary)
400400 self . didSet ( keyPath: \. completedFileCountSummary)
@@ -403,7 +403,7 @@ extension ProgressManager {
403403 self . access ( keyPath: \. customPropertiesInt)
404404 self . access ( keyPath: \. customPropertiesIntSummary)
405405 self . didSet ( keyPath: \. customPropertiesIntSummary)
406- return updatedIntSummary ( property: MetatypeWrapper ( property ) )
406+ return updatedIntSummary ( property: MetatypeWrapper ( P . self ) )
407407 }
408408 }
409409
@@ -415,13 +415,13 @@ extension ProgressManager {
415415 /// - Parameter property: The type of the unsigned integer property to summarize. Must be a property
416416 /// where both the value and summary types are `UInt64`.
417417 /// - Returns: An `UInt64` summary value for the specified property.
418- public func summary< P: Property > ( of property: P . Type ) -> P . Summary where P. Value == UInt64 , P. Summary == UInt64 {
419- if property . self == ProgressManager . Properties. TotalByteCount. self {
418+ public func summary< P: Property > ( of property: KeyPath < ProgressManager . Properties , P . Type > ) -> P . Summary where P. Value == UInt64 , P. Summary == UInt64 {
419+ if P . self == ProgressManager . Properties. TotalByteCount. self {
420420 self . access ( keyPath: \. totalByteCount)
421421 self . access ( keyPath: \. totalByteCountSummary)
422422 self . didSet ( keyPath: \. totalByteCountSummary)
423423 return updatedByteCount ( type: . total)
424- } else if property . self == ProgressManager . Properties. CompletedByteCount. self {
424+ } else if P . self == ProgressManager . Properties. CompletedByteCount. self {
425425 self . access ( keyPath: \. completedByteCount)
426426 self . access ( keyPath: \. completedByteCountSummary)
427427 self . didSet ( keyPath: \. completedByteCountSummary)
@@ -430,7 +430,7 @@ extension ProgressManager {
430430 self . access ( keyPath: \. customPropertiesUInt64)
431431 self . access ( keyPath: \. customPropertiesUInt64Summary)
432432 self . didSet ( keyPath: \. customPropertiesUInt64Summary)
433- return updatedUInt64Summary ( property: MetatypeWrapper ( property ) )
433+ return updatedUInt64Summary ( property: MetatypeWrapper ( P . self ) )
434434 }
435435 }
436436
@@ -442,11 +442,11 @@ extension ProgressManager {
442442 /// - Parameter property: The type of the double property to summarize. Must be a property
443443 /// where both the value and summary types are `Double`.
444444 /// - Returns: A `Double` summary value for the specified property.
445- public func summary< P: Property > ( of property: P . Type ) -> P . Summary where P. Value == Double , P. Summary == Double {
445+ public func summary< P: Property > ( of property: KeyPath < ProgressManager . Properties , P . Type > ) -> P . Summary where P. Value == Double , P. Summary == Double {
446446 self . access ( keyPath: \. customPropertiesDouble)
447447 self . access ( keyPath: \. customPropertiesDoubleSummary)
448448 self . didSet ( keyPath: \. customPropertiesDoubleSummary)
449- return updatedDoubleSummary ( property: MetatypeWrapper ( property ) )
449+ return updatedDoubleSummary ( property: MetatypeWrapper ( P . self ) )
450450 }
451451
452452 /// Returns a summary for a custom string property across the progress subtree.
@@ -457,11 +457,11 @@ extension ProgressManager {
457457 /// - Parameter property: The type of the string property to summarize. Must be a property
458458 /// where both the value type is `String?` and the summary type is `[String?]`.
459459 /// - Returns: A `[String?]` summary value for the specified property.
460- public func summary< P: Property > ( of property: P . Type ) -> P . Summary where P. Value == String ? , P. Summary == [ String ? ] {
460+ public func summary< P: Property > ( of property: KeyPath < ProgressManager . Properties , P . Type > ) -> P . Summary where P. Value == String ? , P. Summary == [ String ? ] {
461461 self . access ( keyPath: \. customPropertiesString)
462462 self . access ( keyPath: \. customPropertiesStringSummary)
463463 self . didSet ( keyPath: \. customPropertiesStringSummary)
464- return updatedStringSummary ( property: MetatypeWrapper ( property ) )
464+ return updatedStringSummary ( property: MetatypeWrapper ( P . self ) )
465465 }
466466
467467 /// Returns a summary for a custom URL property across the progress subtree.
@@ -472,11 +472,11 @@ extension ProgressManager {
472472 /// - Parameter property: The type of the URL property to summarize. Must be a property
473473 /// where the value type is `URL?` and the summary type is `[URL?]`.
474474 /// - Returns: A `[URL?]` summary value for the specified property.
475- public func summary< P: Property > ( of property: P . Type ) -> P . Summary where P. Value == URL ? , P. Summary == [ URL ? ] {
475+ public func summary< P: Property > ( of property: KeyPath < ProgressManager . Properties , P . Type > ) -> P . Summary where P. Value == URL ? , P. Summary == [ URL ? ] {
476476 self . access ( keyPath: \. customPropertiesURL)
477477 self . access ( keyPath: \. customPropertiesURLSummary)
478478 self . didSet ( keyPath: \. customPropertiesURLSummary)
479- return updatedURLSummary ( property: MetatypeWrapper ( property ) )
479+ return updatedURLSummary ( property: MetatypeWrapper ( P . self ) )
480480 }
481481
482482 /// Returns a summary for a custom unsigned integer property across the progress subtree.
@@ -487,8 +487,8 @@ extension ProgressManager {
487487 /// - Parameter property: The type of the unsigned integer property to summarize. Must be a property
488488 /// where the value type is `UInt64` and the summary type is `[UInt64]`.
489489 /// - Returns: A `[UInt64]` summary value for the specified property.
490- public func summary< P: Property > ( of property: P . Type ) -> P . Summary where P. Value == UInt64 , P. Summary == [ UInt64 ] {
491- if property . self == ProgressManager . Properties. Throughput. self {
490+ public func summary< P: Property > ( of property: KeyPath < ProgressManager . Properties , P . Type > ) -> P . Summary where P. Value == UInt64 , P. Summary == [ UInt64 ] {
491+ if P . self == ProgressManager . Properties. Throughput. self {
492492 self . access ( keyPath: \. throughput)
493493 self . access ( keyPath: \. throughputSummary)
494494 self . didSet ( keyPath: \. throughputSummary)
@@ -497,7 +497,7 @@ extension ProgressManager {
497497 self . access ( keyPath: \. customPropertiesUInt64Array)
498498 self . access ( keyPath: \. customPropertiesUInt64ArraySummary)
499499 self . didSet ( keyPath: \. customPropertiesUInt64ArraySummary)
500- return updatedUInt64ArraySummary ( property: MetatypeWrapper ( property ) )
500+ return updatedUInt64ArraySummary ( property: MetatypeWrapper ( P . self ) )
501501 }
502502 }
503503
@@ -509,8 +509,8 @@ extension ProgressManager {
509509 /// - Parameter property: The type of the duration property to summarize. Must be a property
510510 /// where the value type is `Duration` and the summary type is `Duration`.
511511 /// - Returns: A `Duration` summary value for the specified property.
512- public func summary< P: Property > ( of property: P . Type ) -> P . Summary where P. Value == Duration , P. Summary == Duration {
513- if property . self == ProgressManager . Properties. EstimatedTimeRemaining. self {
512+ public func summary< P: Property > ( of property: KeyPath < ProgressManager . Properties , P . Type > ) -> P . Summary where P. Value == Duration , P. Summary == Duration {
513+ if P . self == ProgressManager . Properties. EstimatedTimeRemaining. self {
514514 self . access ( keyPath: \. estimatedTimeRemaining)
515515 self . access ( keyPath: \. estimatedTimeRemainingSummary)
516516 self . didSet ( keyPath: \. estimatedTimeRemainingSummary)
@@ -519,7 +519,7 @@ extension ProgressManager {
519519 self . access ( keyPath: \. customPropertiesDuration)
520520 self . access ( keyPath: \. customPropertiesDurationSummary)
521521 self . didSet ( keyPath: \. customPropertiesDurationSummary)
522- return updatedDurationSummary ( property: MetatypeWrapper ( property ) )
522+ return updatedDurationSummary ( property: MetatypeWrapper ( P . self ) )
523523 }
524524 }
525525}
0 commit comments