Beispiel #1
0
 public void SetParent(DecoratorNamespaceInformation parentInfo)
 {
     if (ParentInformation == null)
     {
         ParentInformation = parentInfo;
     }
 }
Beispiel #2
0
        private void GenerateDecoratorUsingTemplate(
            GeneratorExecutionContext context,
            DecoratorNamespaceInformation factoryInformation)
        {
            CodeGenNamespace generatedNamespace  = _NamespaceFactory.Create(factoryInformation);
            string           generatedCodeString = generatedNamespace.GenerateCode();

            SourceText sourceText = SourceText.From(generatedCodeString, Encoding.UTF8);

            context.AddSource($"{factoryInformation.DecoratorName}.cs", sourceText);
        }