static void VisitShorthandUnavailableAttribute(LiteralExpression oldAttr, string platformName) { var newAttr = new InvocationExpression("Unavailable"); newAttr.AddArgument(new LiteralExpression(platformName)); oldAttr.Parent.InsertChildBefore(oldAttr, newAttr); oldAttr.Remove(); }
static void VisitMacNamedIntroducedAttribute(LiteralExpression oldAttr, string macMinorVersion) { var newAttr = new InvocationExpression("Introduced"); newAttr.AddArgument(new LiteralExpression("PlatformName.MacOSX")); newAttr.AddArgument(new LiteralExpression("10")); newAttr.AddArgument(new LiteralExpression(macMinorVersion)); oldAttr.Parent.InsertChildBefore(oldAttr, newAttr); oldAttr.Remove(); }