public ClassOutputModel Build() { var res = _outputModel; _outputModel = null; return(res); }
private void CreateClassInternal(string className, INamespace classNamespace, bool isInterface) { classNamespace = classNamespace ?? _designModel?.Namespace; if (classNamespace == null) { throw new CodeGenerationException("Namespace and design model is not set."); } CheckOutputModel(false); _outputModel = new ClassOutputModel(_outputModelType, classNamespace, _designModel) { ClassName = _namingConvention.GetClassName(className, isInterface), ClassNamespace = _namingConvention.GetNamespaceName(classNamespace) }; _outputModel.Modifiers.Add(Modifiers.Public); _outputModel.NamespaceImports.Add("System"); _outputModel.NamespaceImports.Add("System.Linq"); }