コード例 #1
0
 static void VisitShorthandUnavailableAttribute(LiteralExpression oldAttr, string platformName)
 {
     var newAttr = new InvocationExpression ("Unavailable");
     newAttr.AddArgument (new LiteralExpression (platformName));
     oldAttr.Parent.InsertChildBefore (oldAttr, newAttr);
     oldAttr.Remove ();
 }
コード例 #2
0
 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 ();
 }