Exemplo n.º 1
0
		public override SyntaxNode VisitClassDeclaration(ClassDeclarationSyntax node)
		{
			if (node.HasAttribute<SlideAttribute>())
			{
				var arguments =
					node.GetAttributes<SlideAttribute>()
					.Select(a => new { title = a.GetArgument(0), id = a.GetArgument(1) })
					.Single();
				Title = arguments.title;
				Id = Guid.Parse(arguments.id);
			}
			return VisitMemberDeclaration(node, base.VisitClassDeclaration(node));
		}
Exemplo n.º 2
0
		public override SyntaxNode VisitClassDeclaration(ClassDeclarationSyntax node)
		{
			if (node.HasAttribute<ExerciseAttribute>())
				ExerciseClassName = FindParentClassName(node);
			return VisitMemberDeclaration(node, base.VisitClassDeclaration(node));
		}