public void SetParent(DecoratorClassInformation parentInfo) { if (ParentInformation == null) { ParentInformation = parentInfo; } }
public DecoratorNamespaceInformation( string decoratedClassNamespace, string decoratorName, DecoratorClassInformation classInformaiton) { DecoratedClassNamespace = decoratedClassNamespace ?? throw new ArgumentNullException(nameof(decoratedClassNamespace)); DecoratorName = decoratorName ?? throw new ArgumentNullException(nameof(decoratorName)); ClassInformaiton = classInformaiton ?? throw new ArgumentNullException(nameof(classInformaiton)); ClassInformaiton.SetParent(this); }
private DecoratorNamespaceInformation GetDecoratorNamespaceFactoryInformation( TypeDeclarationSyntax typeDeclaration, ISymbol classSymbol, ClassTemplate template, SemanticModel semanticModel) { string decoratorName = $"{typeDeclaration.Identifier.Text}{template.Label}Decorator"; DecoratorClassInformation classInformation = GetDecoratorClassFactoryInformation(typeDeclaration, template, semanticModel); return(new DecoratorNamespaceInformation( classSymbol.ContainingNamespace.Name, decoratorName, classInformation)); }