예제 #1
0
		/// <summary>
		///   Normalizes the <paramref name="declaration" />.
		/// </summary>
		public override SyntaxNode VisitClassDeclaration(ClassDeclarationSyntax declaration)
		{
			var classSymbol = declaration.GetTypeSymbol(SemanticModel);
			if (!classSymbol.IsFaultEffect(SemanticModel))
			{
				declaration = (ClassDeclarationSyntax)base.VisitClassDeclaration(declaration);

				if (classSymbol.IsComponent(SemanticModel))
					declaration = ChangeComponentBaseType(classSymbol, declaration);

				return declaration;
			}

			AddFaultField(classSymbol);

			declaration = (ClassDeclarationSyntax)base.VisitClassDeclaration(declaration);
			return ChangeFaultEffectBaseType(classSymbol, declaration);
		}