private static void AssignDeploymentType()

in src/Elastic.Markdown/Myst/FrontMatter/ApplicableTo.cs [169:192]


	private static void AssignDeploymentType(Dictionary<object, object?> dictionary, ApplicableTo applicableTo)
	{
		if (!dictionary.TryGetValue("deployment", out var deploymentType))
			return;

		if (deploymentType is null || (deploymentType is string s && string.IsNullOrWhiteSpace(s)))
			applicableTo.Deployment = DeploymentApplicability.All;
		else if (deploymentType is string deploymentTypeString)
		{
			var av = AppliesCollection.TryParse(deploymentTypeString, out var a) ? a : null;
			applicableTo.Deployment = new DeploymentApplicability
			{
				Ece = av,
				Eck = av,
				Ess = av,
				Self = av
			};
		}
		else if (deploymentType is Dictionary<object, object?> deploymentDictionary)
		{
			if (TryGetDeployment(deploymentDictionary, out var applicability))
				applicableTo.Deployment = applicability;
		}
	}