InterfaceDeclaration ParseExternInterfaceDeclaration() { // inputOnly fieldType inputOnlyId | outputOnly fieldType outputOnlyId | // initializeOnly fieldType initializeOnlyId | inputOutput fieldType inputOutputFieldId InterfaceDeclaration ret = new InterfaceDeclaration(); string type = GetNextIDToken(); switch (type) { case "eventIn": case "inputOnly": ret.InterfaceDeclarationType = InterfaceDeclarationType.EventIn; break; case "eventOut": case "outputOnly": ret.InterfaceDeclarationType = InterfaceDeclarationType.EventOut; break; case "field": case "initializeOnly": ret.InterfaceDeclarationType = InterfaceDeclarationType.Field; break; case "exposedField": case "inputOutput": ret.InterfaceDeclarationType = InterfaceDeclarationType.ExposedField; break; default: ErrorParsingToken("interface declaration keyword", type, "EXTERNPROTO statement interface declarations"); return(null); } ret.FieldType = GetNextFieldTypeToken(); ret.FieldId = GetNextIDToken(); return(ret); }
protected override IEnumerable <object> EnumerateReferences(InterfaceDeclaration record) { yield return(record.AttributeListCollection); yield return(record.BaseList); yield return(record.ConstraintClauseList); yield return(record.ConstructorList); yield return(record.DocumentationCommentList); yield return(record.FieldList); yield return(record.Identifier); yield return(record.MethodList); yield return(record.ModifierList); yield return(record.Namespace); yield return(record.PropertyList); yield return(record.TypeParameterList); yield return(record.UsingDirectiveList); }
private static MethodDeclaration GenerateInterfaceMethod(InterfaceDeclaration clientInterface, Method method, TypeReference requestType) { var m = clientInterface.AddMember(new MethodDeclaration(GetMethodName(method))); GenerateMethodSignature(method, m, requestType, out _, out _, out _); return(m); }
private MethodDeclaration GenerateInterfaceMethod(InterfaceDeclaration clientInterface, Method method) { var m = clientInterface.AddMember(new MethodDeclaration(method.Name + "Async")); GenerateMethodSignature(method, m, out _, out _, out _, out _); return(m); }
public void CSharpCodeGenerator_InterfaceDeclaration_Generic() { var type = new InterfaceDeclaration("Sample"); type.Parameters.Add(new TypeParameter("T1") { Constraints = { new ValueTypeTypeParameterConstraint() } }); type.Parameters.Add(new TypeParameter("T2") { Constraints = { new ConstructorParameterConstraint(), new ClassTypeParameterConstraint(), new BaseTypeParameterConstraint(typeof(ICloneable)) } }); var generator = new CSharpCodeGenerator(); var result = generator.Write(type); Assert.That.StringEquals(@"interface Sample<T1, T2> where T1 : struct where T2 : class, System.ICloneable, new() { } ", result); }
public override void VisitInterfaceDeclaration(InterfaceDeclaration interfaceSignature) { Writer.Write($"public class {interfaceSignature.Name}"); RenderGenericTypeParameters(interfaceSignature.GenericTypeParameters); var inherits = interfaceSignature.Inherits?.ToList(); if (inherits?.Any() == true) { Writer.Write(" : "); for (var i = 0; i < inherits.Count; i++) { Visit(inherits[i]); if (i + 1 < inherits.Count) { Writer.Write(", "); } } } Writer.WriteLine("{"); Writer.CurrentIndent += 4; Visit(interfaceSignature.Members); Writer.CurrentIndent -= 4; Writer.WriteLine("}"); }
int INamespaceMemberVisitor <int> .VisitInterfaceDeclaration(InterfaceDeclaration declaration) { WriteInterfaceDeclaration(declaration); _Writer.WriteLine(); return(0); }
// 7.1 int IRootStatementVisitor <int> .VisitInterfaceDeclaration(InterfaceDeclaration declaration) { WriteInterfaceDeclaration(declaration); _Writer.WriteLine(); return(0); }
public void CanCreateInterfaceWithTypeArgs() { InterfaceDeclaration iface = new InterfaceDeclaration("ITrackPropertyChanges", new CodeDomTypeReference("Awish.Common.Models.Core.Company")); ClassDeclaration cdecl = new ClassDeclaration("Company"); cdecl.Implements(iface); new CodeBuilder().GenerateCode(Console.Out, "Poops.McGee", cdecl); }
public void TestInterfaceDeclaration() { var namedTypeReference = new NamedTypeReference(GetSymbolAtom(), GetTypeList(), DefaultLineInfo); InterfaceDeclaration node = new InterfaceDeclaration(GetSymbolAtom(), GetTypeParameterList(), new List <NamedTypeReference> { namedTypeReference, namedTypeReference }, GetExpressionList(), new ObjectType(GetCallSignatureList(), DefaultLineInfo), Declaration.DeclarationFlags.Export, DefaultLineInfo); CheckSerializationRoundTrip(node); }
public void CSharpCodeGenerator_InterfaceDeclaration() { var type = new InterfaceDeclaration("Sample"); var generator = new CSharpCodeGenerator(); var result = generator.Write(type); Assert.That.StringEquals(@"interface Sample { } ", result); }
public override void Accept(InterfaceDeclaration contractDecl) { IodineInterface contract = new IodineInterface(contractDecl.Name); foreach (AstNode node in contractDecl.Children) { FunctionDeclaration decl = node as FunctionDeclaration; contract.AddMethod(new IodineMethod(module, decl.Name, decl.InstanceMethod, decl.Parameters.Count, 0)); } module.SetAttribute(contractDecl.Name, contract); }
public static UstNode GetObject(string type) { UstNode ustNode = null; switch (type) { case IdConstants.RootIdName: ustNode = new RootUstNode(); break; case IdConstants.UsingDirectiveIdName: ustNode = new UsingDirective(); break; case IdConstants.NamespaceIdName: ustNode = new NamespaceDeclaration(); break; case IdConstants.ClassIdName: ustNode = new ClassDeclaration(); break; case IdConstants.InterfaceIdName: ustNode = new InterfaceDeclaration(); break; case IdConstants.BodyIdName: ustNode = new BlockStatement(); break; case IdConstants.ObjectCreationIdName: ustNode = new ObjectCreationExpression(); break; case IdConstants.InvocationIdName: ustNode = new InvocationExpression(); break; case IdConstants.LiteralIdName: ustNode = new LiteralExpression(); break; case IdConstants.MethodIdName: ustNode = new MethodDeclaration(); break; default: break; } return(ustNode); }
private static void __Execute(atom.Trace context, int level, InterfaceDeclaration data, string file, bool isShowPrivate) { if (__IsEnabled(data, isShowPrivate)) { context. SetComment(__GetType(data, "interface"), "[[[Data Type]]]"). SetUrl(file, __GetLine(data, data.Name.Pos.Value), __GetPosition(data, data.Name.Pos.Value)). Send(NAME.SOURCE.PREVIEW, NAME.TYPE.CLASS, level, __GetName(data.Name, true)); foreach (var a_Context in data.Members.OfType <MethodSignature>()) { __Execute(context, level + 1, a_Context, file, false, isShowPrivate); } } }
public void LoadBuiltinComposites() { var decl = new InterfaceDeclaration("tinterfacedobject", new InterfaceType(null, new ObjectSection())); decl.Type.inheritableContext = new SymbolContext <Declaration, Section>(decl.name, decl.Type.section); decl.Type.privateContext = new SymbolContext <Declaration, Section>(decl.name, decl.Type.section); decl.Type.Name = decl.name; builtinDecls.Add(decl.name, decl); if (!symEnv.Add(decl.name, decl)) { throw new IdentifierRedeclared(decl.name); } }
/// <summary> /// Creates a <see cref="InterfaceDeclarationTranslationUnit"/>. /// </summary> /// <returns>A <see cref="InterfaceDeclarationTranslationUnit"/>.</returns> public ITranslationUnit Create() { InterfaceDeclaration helper = new InterfaceDeclaration(this.Node as InterfaceDeclarationSyntax, this.SemanticModel); var interfaceDeclaration = this.CreateTranslationUnit(helper.Visibility, IdentifierTranslationUnit.Create(helper.Name)) as InterfaceDeclarationTranslationUnit; foreach (BaseTypeReference implementedInterface in helper.ExtendedInterfaces) { interfaceDeclaration.AddExtendedInterface(IdentifierTranslationUnit.Create(implementedInterface.FullName)); } return(interfaceDeclaration); }
public override void Accept(InterfaceDeclaration contractDecl) { IodineInterface contract = new IodineInterface(contractDecl.Name); foreach (AstNode node in contractDecl.Children) { FunctionDeclaration decl = node as FunctionDeclaration; contract.AddMethod(new IodineMethod(methodBuilder.Module, decl.Name, decl.InstanceMethod, decl.Parameters.Count, 0)); } methodBuilder.EmitInstruction(contractDecl.Location, Opcode.LoadConst, methodBuilder.Module.DefineConstant(contract)); methodBuilder.EmitInstruction(contractDecl.Location, Opcode.StoreLocal, symbolTable.GetSymbol(contractDecl.Name).Index); }
public void Display_Test() { var subject = new InterfaceDeclaration(new ExportKeyword(), new Identifier("JeppesTest"), null, ImmutableArray <IMemberDeclaration> .Empty .Add(new PropertyDeclaration("name", new PredefinedType(TypescriptBuiltInTypes.String))) .Add(new PropertyDeclaration("isTrue", new PredefinedType(TypescriptBuiltInTypes.Boolean))) .Add(new PropertyDeclaration("array", new ArrayType(new TypeReference("Super", ImmutableArray <TypeParameter> .Empty .Add(new TypeParameter(new PredefinedType(TypescriptBuiltInTypes.Boolean)))))) ) ); _testOutputHelper.WriteLine(subject.Display()); }
private void SeparateInterfaceMember(InterfaceDeclaration @interface, string memberName) { Node member = @interface.GetMember(memberName); if (member != null && member.Kind == NodeKind.MethodSignature) { MethodSignature method = member as MethodSignature; if (CanSeparate(method)) { int index = @interface.Members.IndexOf(method); @interface.RemoveMemberAt(index); List <Node> newMembers = this.Separate(method); @interface.InsertMembers(index, newMembers); } } }
public override IQueryElement VisitInterface_declaration([NotNull] QueryGrammarParser.Interface_declarationContext context) { InterfaceDeclaration interfaceDeclaration = new InterfaceDeclaration(); interfaceDeclaration.Name = context.NAME().GetText(); if (context.parent_type() != null) { ParentClasses parentClasses = (ParentClasses)Visit(context.parent_type()); parentClasses.InterfaceOnly = true; interfaceDeclaration.Add(parentClasses); } foreach (var attribute in context.attribute_dec_stm()) { IQueryElement attributeDeclaration = Visit(attribute); interfaceDeclaration.Add(attributeDeclaration); } return(interfaceDeclaration); }
InterfaceDeclaration ParseInterfaceDeclaration() { // inputOnly fieldType inputOnlyId | // outputOnly fieldType outputOnlyId | // initializeOnly fieldType initializeOnlyId fieldValue | // inputOutput fieldType fieldId fieldValue string type = GetNextIDToken(); InterfaceDeclaration ret = new InterfaceDeclaration(); switch (type) { case "eventIn": case "inputOnly": ret.InterfaceDeclarationType = InterfaceDeclarationType.EventIn; break; case "eventOut": case "outputOnly": ret.InterfaceDeclarationType = InterfaceDeclarationType.EventOut; break; case "field": case "initializeOnly": ret.InterfaceDeclarationType = InterfaceDeclarationType.Field; break; case "exposedField": case "inputOutput": ret.InterfaceDeclarationType = InterfaceDeclarationType.ExposedField; break; default: ErrorParsingToken("interface declaration keyword", type, "PROTO statement interface declarations"); return(null); } ret.FieldType = GetNextFieldTypeToken(); ret.FieldId = GetNextIDToken(); if (ret.InterfaceDeclarationType == InterfaceDeclarationType.Field || ret.InterfaceDeclarationType == InterfaceDeclarationType.ExposedField) { ret.DefaultValue = ParseFieldByType(ret.FieldType); } return(ret); }
public override void VisitInterfaceDeclaration(InterfaceDeclaration interfaceSignature) { var entryPoint = _entryPointDeclarations.FirstOrDefault(declaration => string.Equals(((ReferenceTypeToken)declaration.TypeToken).TypeName, interfaceSignature.Name)); if (entryPoint != null) { // Entry point, render implementation var implementationVisitor = new ImplementationRenderingVisitor(entryPoint.Name, _entryPointDeclarations, Writer); implementationVisitor.Visit(interfaceSignature); return; } Writer.Write($"public interface {interfaceSignature.Name}"); RenderGenericTypeParameters(interfaceSignature.GenericTypeParameters); var inherits = interfaceSignature.Inherits?.ToList(); if (inherits?.Any() == true) { Writer.Write(" : "); for (var i = 0; i < inherits.Count; i++) { Visit(inherits[i]); if (i + 1 < inherits.Count) { Writer.Write(", "); } } } Writer.WriteLine("{"); Writer.CurrentIndent += 4; Visit(interfaceSignature.Members); Writer.CurrentIndent -= 4; Writer.WriteLine("}"); }
protected override IEnumerable <object> EnumerateReferences(InterfaceDeclaration record) { yield return(record.DecoratorList); yield return(record.ExtendsList); yield return(record.Constructor); yield return(record.DocumentationComment); yield return(record.Identifier); yield return(record.ImportStatementList); yield return(record.MethodList); yield return(record.Namespace); yield return(record.PropertyList); yield return(record.TypeParameterList); }
public void Render(CodeObject target, DesignObject designObject) { var interfaceDeclaration = (Interface)designObject; var interfaceCodeObject = new InterfaceDeclaration { Name = interfaceDeclaration.Name, Scope = ScopeIdentifier.Public }; (target as CodeDom.Module).TypeDeclarations.Add(interfaceCodeObject); foreach (var member in interfaceDeclaration.Properties) { var propertyDeclaration = new InterfacePropertyDeclaration { Name = member.Name, Type = member.Type.Convert(), Nullable = !member.Required, ReadOnly = member.ReadOnly }; interfaceCodeObject.Properties.Add(propertyDeclaration); } }
private int WriteInterfaceDeclaration(InterfaceDeclaration declaration) { WriteIsDeclare(declaration.IsDeclare); WriteIsExport(declaration.IsExport); _Writer.Write("interface "); _Writer.Write(declaration.Name); if (declaration.HasTypeParameter) { _Writer.WriteTypeParameters(declaration.TypeParameters); } if (declaration.HasBaseType) { for (int i = 0; i < declaration.BaseTypes.Count; i++) { _Writer.Write(i == 0 ? " : " : ", "); declaration.BaseTypes[i].WriteTypeReference(_Writer); } } _Writer.WriteLine(" {"); if (declaration.HasMember) { _Writer.Indent++; var cv = new InterfaceMemberVisitor(this, false); for (var i = 0; i < declaration.Members.Count; i++) { declaration.Members[i].Accept(cv); } _Writer.Indent--; } _Writer.Write('}'); return(0); }
public FullInterfaceDeclaration(string FullName, InterfaceDeclaration ClassDeclaration, NamespaceDeclaration NamespaceDeclaration) { fullName = FullName; classDeclaration = ClassDeclaration; namespaceDeclaration = NamespaceDeclaration; }
/** * Call back method that must be called as soon as the given <code> * InterfaceDeclaration</code> object has been traversed. * * @param pInterfaceDeclaration The <code>InterfaceDeclaration</code> * object that has just been traversed. */ public void actionPerformed( InterfaceDeclaration pInterfaceDeclaration) { // Nothing to do. }
public override bool Visit(InterfaceDeclaration node) { Visit((CompositeDeclaration)node); return(true); }
public virtual T Visit(InterfaceDeclaration node) { return(Visit((CompositeDeclaration)node)); }
/** * Call back method that must be called when the given <code> * InterfaceDeclaration</code> will become the next <i>traverse * candidate</i>. * * @param pInterfaceDeclaration The <code>InterfaceDeclaration</code> * object that will become the next <i> * traverse candidate</i>. */ public void performAction( InterfaceDeclaration pInterfaceDeclaration) { // Nothing to do. }
protected override async Task <InterfaceDeclaration> AssignUpsertedReferences(InterfaceDeclaration record) { record.AttributeListCollection = await _attributeLists.UpsertAsync(record.AttributeListCollection); record.AttributeListCollectionId = record.AttributeListCollection?.AttributeListCollectionId ?? record.AttributeListCollectionId; record.BaseList = await _baseLists.UpsertAsync(record.BaseList); record.BaseListId = record.BaseList?.BaseListId ?? record.BaseListId; record.ConstraintClauseList = await _constraintClauseLists.UpsertAsync(record.ConstraintClauseList); record.ConstraintClauseListId = record.ConstraintClauseList?.ConstraintClauseListId ?? record.ConstraintClauseListId; record.ConstructorList = await _constuctorLists.UpsertAsync(record.ConstructorList); record.ConstructorListId = record.ConstructorList?.ConstructorListId ?? record.ConstructorListId; record.DocumentationCommentList = await _documentationCommentLists.UpsertAsync(record.DocumentationCommentList); record.DocumentationCommentListId = record.DocumentationCommentList?.DocumentationCommentListId ?? record.DocumentationCommentListId; record.FieldList = await _fieldLists.UpsertAsync(record.FieldList); record.FieldListId = record.FieldList?.FieldListId ?? record.FieldListId; record.Identifier = await _identifiers.UpsertAsync(record.Identifier); record.IdentifierId = record.Identifier?.IdentifierId ?? record.IdentifierId; record.MethodList = await _methodLists.UpsertAsync(record.MethodList); record.MethodListId = record.MethodList?.MethodListId ?? record.MethodListId; record.ModifierList = await _modifierLists.UpsertAsync(record.ModifierList); record.ModifierListId = record.ModifierList?.ModifierListId ?? record.ModifierListId; record.Namespace = await _namespaces.UpsertAsync(record.Namespace); record.NamespaceId = record.Namespace?.NamespaceId ?? record.NamespaceId; record.PropertyList = await _propertyLists.UpsertAsync(record.PropertyList); record.PropertyListId = record.PropertyList?.PropertyListId ?? record.PropertyListId; record.TypeParameterList = await _typeParameterLists.UpsertAsync(record.TypeParameterList); record.TypeParameterListId = record.TypeParameterList?.TypeParameterListId ?? record.TypeParameterListId; record.UsingDirectiveList = await _usingDirectiveLists.UpsertAsync(record.UsingDirectiveList); record.UsingDirectiveListId = record.UsingDirectiveList?.UsingDirectiveListId ?? record.UsingDirectiveListId; return(record); }
protected override Expression <Func <InterfaceDeclaration, bool> > FindExisting(InterfaceDeclaration record) => existing => existing.IdentifierId == record.IdentifierId && existing.NamespaceId == record.NamespaceId;
private void AddPropertyChangedPlumbing(ClassDeclaration cs) { var iface = new InterfaceDeclaration("EightyProofSolutions.BlogEngine.Core.Models.ITrackPropertyChanges", new CodeDomTypeReference(cs.FullName)); cs.Implements(iface); var pairCodeTypeReference = new CodeTypeReference("EightyProofSolutions.BlogEngine.Core.Pair", new CodeTypeReference("System.Object"), new CodeTypeReference("System.Object")); var changedPropertiesType = new CodeTypeReference("System.Collections.Generic.Dictionary"); changedPropertiesType.TypeArguments.Add(typeof(string)); changedPropertiesType.TypeArguments.Add(pairCodeTypeReference); var changedPropertiesField = new CodeMemberField(); changedPropertiesField.Name = "_changedProperties"; changedPropertiesField.Type = changedPropertiesType; changedPropertiesField.Attributes = MemberAttributes.Private; changedPropertiesField.InitExpression = new CodeObjectCreateExpression(changedPropertiesType); cs.Members.Add(changedPropertiesField); var changedPropertiesProperty = new CodeMemberProperty(); changedPropertiesProperty.Name = "ChangedProperties"; changedPropertiesProperty.PrivateImplementationType = new CodeTypeReference("EightyProofSolutions.BlogEngine.Core.Models.ITrackPropertyChanges"); changedPropertiesProperty.Type = changedPropertiesType; changedPropertiesProperty.GetStatements.Add(new CodeMethodReturnStatement(new CodeFieldReferenceExpression(new CodeThisReferenceExpression(), "_changedProperties"))); cs.Members.Add(changedPropertiesProperty); var changedMethod = new CodeMemberMethod(); changedMethod.Name = "Changed"; changedMethod.PrivateImplementationType = new CodeTypeReference("EightyProofSolutions.BlogEngine.Core.Models.ITrackPropertyChanges"); changedMethod.Parameters.Add(new CodeParameterDeclarationExpression(typeof(string), "propertyName")); changedMethod.ReturnType = new CodeTypeReference("System.Boolean"); changedMethod.Statements.Add(new CodeMethodReturnStatement(new CodeMethodInvokeExpression(new CodeFieldReferenceExpression(new CodeThisReferenceExpression(), "_changedProperties"), "ContainsKey", new CodeArgumentReferenceExpression("propertyName")))); cs.Members.Add(changedMethod); var trackingChangesField = new CodeMemberField(); trackingChangesField.Name = "_trackingChanges"; trackingChangesField.Type = new CodeTypeReference("System.Boolean"); trackingChangesField.InitExpression = new CodeSnippetExpression("true"); cs.Members.Add(trackingChangesField); var trackingChangesProperty = new CodeMemberProperty(); trackingChangesProperty.Name = "TrackingChanges"; trackingChangesProperty.PrivateImplementationType = new CodeTypeReference("EightyProofSolutions.BlogEngine.Core.Models.ITrackPropertyChanges"); trackingChangesProperty.Type = new CodeTypeReference("System.Boolean"); trackingChangesProperty.GetStatements.Add(new CodeMethodReturnStatement(new CodeFieldReferenceExpression(new CodeThisReferenceExpression(), "_trackingChanges"))); trackingChangesProperty.SetStatements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new CodeThisReferenceExpression(), "_trackingChanges"), new CodeSnippetExpression("value"))); cs.Members.Add(trackingChangesProperty); var propChangedEvent = new CodeMemberEvent(); propChangedEvent.Name = "PropertyChanged"; propChangedEvent.Type = new CodeTypeReference("System.ComponentModel.PropertyChangedEventHandler"); propChangedEvent.Attributes = MemberAttributes.Public | MemberAttributes.Final; cs.Members.Add(propChangedEvent); var propChangedMethod = new CodeMemberMethod(); propChangedMethod.Name = "OnPropertyChanged"; propChangedMethod.PrivateImplementationType = new CodeTypeReference("EightyProofSolutions.BlogEngine.Core.Models.ITrackPropertyChanges"); propChangedMethod.Parameters.Add(new CodeParameterDeclarationExpression(typeof(string), "propertyName")); propChangedMethod.Parameters.Add(new CodeParameterDeclarationExpression(typeof(object), "oldValue")); propChangedMethod.Parameters.Add(new CodeParameterDeclarationExpression(typeof(object), "newValue")); var iftrackchanges = new CodeConditionStatement( new CodeBinaryOperatorExpression( new CodePropertyReferenceExpression(new CodeCastExpression("EightyProofSolutions.BlogEngine.Core.Models.ITrackPropertyChanges", new CodeThisReferenceExpression()), "TrackingChanges"), CodeBinaryOperatorType.IdentityInequality, new CodeSnippetExpression("true"))); iftrackchanges.TrueStatements.Add(new CodeMethodReturnStatement()); propChangedMethod.Statements.Add(iftrackchanges); var changedPropertyIndexer = new CodeIndexerExpression( new CodeFieldReferenceExpression(new CodeThisReferenceExpression(), "_changedProperties")); changedPropertyIndexer.Indices.Add(new CodeArgumentReferenceExpression("propertyName")); propChangedMethod.Statements.Add(new CodeAssignStatement(changedPropertyIndexer, new CodeObjectCreateExpression(pairCodeTypeReference, new CodeArgumentReferenceExpression("oldValue"), new CodeArgumentReferenceExpression("newValue")))); var ifeventnotnull = new CodeConditionStatement( new CodeBinaryOperatorExpression( new CodeEventReferenceExpression(new CodeThisReferenceExpression(), "PropertyChanged"), CodeBinaryOperatorType.IdentityInequality, new CodeSnippetExpression("null"))); ifeventnotnull.TrueStatements.Add( new CodeMethodInvokeExpression( new CodeThisReferenceExpression(), "PropertyChanged", new CodeThisReferenceExpression(), new CodeObjectCreateExpression("System.ComponentModel.PropertyChangedEventArgs", new CodeArgumentReferenceExpression("propertyName")))); propChangedMethod.Statements.Add(ifeventnotnull); cs.Members.Add(propChangedMethod); }
/// <nodoc /> public virtual void Visit(InterfaceDeclaration interfaceDeclaration) { }
public void CanCreateDeclaration() { InterfaceDeclaration iface = new InterfaceDeclaration("ISuck"); new CodeBuilder().GenerateCode(Console.Out, "Blah.Blee", iface); }