public AppDeploymentConfig RemoveClusterId(string clusterId) { if (!TargetClusters.Contains(clusterId)) { return(this); } var clusterIds = TargetClusters.Where(c => c != clusterId); return(new AppDeploymentConfig(AppIdentity, clusterIds, Properties)); }
public AppDeploymentConfig RemoveClusterId(string clusterId) { if (!TargetClusters.Contains(clusterId)) { throw new InvalidOperationException(); } var clusterIds = TargetClusters.Where(c => c != clusterId); return(new AppDeploymentConfig(AppIdentity, clusterIds, Properties)); }