private static string ExtendNamespace(this string modelNamespace, GeneratorSettings settings) { if (string.IsNullOrEmpty(modelNamespace)) { return(settings.PackageNamespace ?? string.Empty); } if (modelNamespace.StartsWith(".", StringComparison.Ordinal)) { if (string.IsNullOrEmpty(settings.PackageNamespace)) { modelNamespace = modelNamespace.Substring(1); } else { modelNamespace = settings.PackageNamespace + modelNamespace; } } return(modelNamespace); }
public CommunityModel(GeneratorSettings generatorSettings = null, AgentModel[] agents = null, MessageModel[] messages = null) { GeneratorSettings = generatorSettings ?? new GeneratorSettings(); Agents = agents ?? new AgentModel[0]; Messages = messages ?? new MessageModel[0]; }