CleanableLaunchEnvironmentWithMultipleValues
public protocol CleanableLaunchEnvironmentWithMultipleValues : CleanableLaunchEnvironment, LaunchEnvironmentWithMultipleValues
CleanableLaunchEnvironment specialized for launch environment options with multiple values.
If predefined in AutoMate option implements LaunchEnvironmentWithMultipleValues
and it’s specific enables clean data before saving new one, it conforms to this protocol.
It provides few initializers extending LaunchEnvironmentWithMultipleValues initializers.
Example:
public struct CleanableArrayLaunchEnvironment: CleanableLaunchEnvironmentWithMultipleValues {
public typealias Value = String
public let valuesCollection: [String]
public let shouldCleanBefore: Bool
public init(shouldCleanBefore: Bool, valuesCollection: [Value]) {
self.valuesCollection = valuesCollection
self.shouldCleanBefore = shouldCleanBefore
}
}
Note
internal initializer would be generated automatically but it would not fulfill requirement of public protocol.
-
Initializer for
LaunchEnvironmentoptions enabling clean data before saving new one.Declaration
Swift
init(shouldCleanBefore: Bool, valuesCollection: [Value])Parameters
shouldCleanBeforeBoolindicating if flag to handle clean data should be passed with option value.valuesCollection[Value]array of LaunchEnvironment values.
-
init(valuesCollection:)Extension methodCalls
init(shouldCleanBefore: Bool, valuesCollection: [Value])with before clean turned off.Declaration
Swift
init(valuesCollection: [Value]) -
init(arrayLiteral:)Extension methodCalls
init(shouldCleanBefore: Bool, valuesCollection: [Value])with before clean turned off.Declaration
Swift
init(arrayLiteral elements: Value...)
-
init(shouldCleanBefore:resources:)Extension methodCalls
init(shouldCleanBefore: Bool, valuesCollection: [Value])with before clean turned off.Declaration
Swift
init(shouldCleanBefore: Bool, resources: (fileName: String, bundleName: String?)...)
CleanableLaunchEnvironmentWithMultipleValues Protocol Reference