public static TypePropertyBuilder Create(GroupingInfo groupingInfo, CodeTypeDeclaration decl, CodeTypeDeclItems declItems) { switch (groupingInfo.ContentModelType) { case ContentModelType.None: case ContentModelType.All: return(new DefaultPropertyBuilder(decl, declItems)); case ContentModelType.Sequence: if (groupingInfo.IsComplex) { return(new DefaultPropertyBuilder(decl, declItems)); } return(new SequencePropertyBuilder(groupingInfo, decl, declItems)); case ContentModelType.Choice: if (groupingInfo.IsComplex) { return(new DefaultPropertyBuilder(decl, declItems)); } return(new ChoicePropertyBuilder(groupingInfo, decl, declItems)); default: throw new InvalidOperationException(); } }
public ChoicePropertyBuilder(GroupingInfo grouping, CodeTypeDeclaration decl, CodeTypeDeclItems declItems) : base(grouping, decl, declItems) { flatChoice = !grouping.IsNested && !grouping.IsRepeating && !grouping.HasChildGroups; hasDuplicateType = false; if (flatChoice) { propertyTypeNameTable = new Dictionary<string,ClrBasePropertyInfo>(); } }
public static TypePropertyBuilder Create(ContentModelPropertyBuilder parentBuilder, GroupingInfo groupingInfo, CodeTypeDeclaration decl, CodeTypeDeclItems declItems, GeneratedTypesVisibility visibility = GeneratedTypesVisibility.Public) { switch (groupingInfo.ContentModelType) { case ContentModelType.None: case ContentModelType.All: return(new DefaultPropertyBuilder(decl, declItems, visibility)); case ContentModelType.Sequence: return(new SequencePropertyBuilder(parentBuilder, groupingInfo, decl, declItems, visibility)); case ContentModelType.Choice: return(new ChoicePropertyBuilder(parentBuilder, groupingInfo, decl, declItems, visibility)); default: throw new InvalidOperationException(); } }
protected new void InnerInit() { base.InnerInit(); this.propertyBuilder = null; if (this.propertyBuilderStack != null) { this.propertyBuilderStack.Clear(); } if (this.propertyDictionaryAddStatements != null) { this.propertyDictionaryAddStatements.Clear(); } if (this.declItemsInfo != null) { this.declItemsInfo.Init(); } else { this.declItemsInfo = new CodeTypeDeclItems(); } }
public static TypePropertyBuilder Create(GroupingInfo groupingInfo, CodeTypeDeclaration decl, CodeTypeDeclItems declItems) { switch (groupingInfo.ContentModelType) { case ContentModelType.None: case ContentModelType.All: return new DefaultPropertyBuilder(decl, declItems); case ContentModelType.Sequence: if (groupingInfo.IsComplex) { return new DefaultPropertyBuilder(decl, declItems); } return new SequencePropertyBuilder(groupingInfo, decl, declItems); case ContentModelType.Choice: if (groupingInfo.IsComplex) { return new DefaultPropertyBuilder(decl, declItems); } return new ChoicePropertyBuilder(groupingInfo, decl, declItems); default: throw new InvalidOperationException(); } }
internal DefaultPropertyBuilder(CodeTypeDeclaration decl, CodeTypeDeclItems declItems) : base(decl, declItems) { }
public static TypePropertyBuilder Create(CodeTypeDeclaration decl, CodeTypeDeclItems declItems) { return(new DefaultPropertyBuilder(decl, declItems)); }
public TypePropertyBuilder(CodeTypeDeclaration decl, CodeTypeDeclItems declItems) { this.decl = decl; this.declItems = declItems; }
public SequencePropertyBuilder(GroupingInfo grouping, CodeTypeDeclaration decl, CodeTypeDeclItems declItems) : base(grouping, decl, declItems) { }
// InnerInit is a non-virtual function to // prevent virtual methods from being called // in the call stack of the constructor protected new void InnerInit() { base.InnerInit(); propertyBuilder = null; if (propertyBuilderStack != null) { propertyBuilderStack.Clear(); } if (propertyDictionaryAddStatements != null) { propertyDictionaryAddStatements.Clear(); } if (declItemsInfo == null) { declItemsInfo = new CodeTypeDeclItems(); } else { declItemsInfo.Init(); } }
public static TypePropertyBuilder Create(CodeTypeDeclaration decl, CodeTypeDeclItems declItems, GeneratedTypesVisibility visibility = GeneratedTypesVisibility.Public) { return(new DefaultPropertyBuilder(decl, declItems, visibility)); }
internal DefaultPropertyBuilder(CodeTypeDeclaration decl, CodeTypeDeclItems declItems, GeneratedTypesVisibility visibility = GeneratedTypesVisibility.Public) : base(decl, declItems, visibility) { }
public TypePropertyBuilder(CodeTypeDeclaration decl, CodeTypeDeclItems declItems, GeneratedTypesVisibility visibility) { this.decl = decl; this.declItems = declItems; this.visibility = visibility; }
public ChoicePropertyBuilder(ContentModelPropertyBuilder parentBuilder, GroupingInfo grouping, CodeTypeDeclaration decl, CodeTypeDeclItems declItems, GeneratedTypesVisibility visibility = GeneratedTypesVisibility.Public) : base(parentBuilder, grouping, decl, declItems, visibility) { flatChoice = !grouping.IsNested && !grouping.IsRepeating && !grouping.HasChildGroups; hasDuplicateType = false; if (flatChoice) { propertyTypeNameTable = new Dictionary <string, ClrBasePropertyInfo>(); } }
public SequencePropertyBuilder(ContentModelPropertyBuilder parentBuilder, GroupingInfo grouping, CodeTypeDeclaration decl, CodeTypeDeclItems declItems, GeneratedTypesVisibility visibility = GeneratedTypesVisibility.Public) : base(parentBuilder, grouping, decl, declItems, visibility) { }
public static TypePropertyBuilder Create(CodeTypeDeclaration decl, CodeTypeDeclItems declItems) { return new DefaultPropertyBuilder(decl, declItems); }
public ContentModelPropertyBuilder(GroupingInfo grouping, CodeTypeDeclaration decl, CodeTypeDeclItems declItems) : base(decl, declItems) { this.grouping = grouping; //The grouping the contentmodelbuilder works on }
public ContentModelPropertyBuilder(ContentModelPropertyBuilder parentBuilder, GroupingInfo grouping, CodeTypeDeclaration decl, CodeTypeDeclItems declItems, GeneratedTypesVisibility visibility) : base(decl, declItems, visibility) { this.ParentBuilder = parentBuilder; this.grouping = grouping; //The grouping the contentmodelbuilder works on }
public ContentModelPropertyBuilder(GroupingInfo grouping, CodeTypeDeclaration decl, CodeTypeDeclItems declItems) : base(decl, declItems) { this.grouping = grouping; }
public static TypePropertyBuilder Create(GroupingInfo groupingInfo, CodeTypeDeclaration decl, CodeTypeDeclItems declItems) { TypePropertyBuilder defaultPropertyBuilder; switch (groupingInfo.ContentModelType) { case ContentModelType.None: case ContentModelType.All: { defaultPropertyBuilder = new DefaultPropertyBuilder(decl, declItems); break; } case ContentModelType.Sequence: { if (!groupingInfo.IsComplex) { defaultPropertyBuilder = new SequencePropertyBuilder(groupingInfo, decl, declItems); break; } else { defaultPropertyBuilder = new DefaultPropertyBuilder(decl, declItems); break; } } case ContentModelType.Choice: { if (!groupingInfo.IsComplex) { defaultPropertyBuilder = new ChoicePropertyBuilder(groupingInfo, decl, declItems); break; } else { defaultPropertyBuilder = new DefaultPropertyBuilder(decl, declItems); break; } } default: { throw new InvalidOperationException(); } } return(defaultPropertyBuilder); }
public ChoicePropertyBuilder(GroupingInfo grouping, CodeTypeDeclaration decl, CodeTypeDeclItems declItems) : base(grouping, decl, declItems) { flatChoice = !grouping.IsNested && !grouping.IsRepeating && !grouping.HasChildGroups; hasDuplicateType = false; if (flatChoice) { propertyTypeNameTable = new Dictionary <string, ClrBasePropertyInfo>(); } }
public SequencePropertyBuilder(GroupingInfo grouping, CodeTypeDeclaration decl, CodeTypeDeclItems declItems, GeneratedTypesVisibility visibility = GeneratedTypesVisibility.Public) : base(grouping, decl, declItems, visibility) { }