public ChoCodeDomProvider(string[] statements, string[] namespaces = null, ChoCodeProviderLanguage language = ChoCodeProviderLanguage.CSharp) { ChoGuard.ArgumentNotNullOrEmpty(statements, "statements"); _statements = statements; _language = language; AddNamespaces(namespaces); }
public ChoCodeDomProvider(string codeBlockFilePath, string[] namespaces = null, ChoCodeProviderLanguage language = ChoCodeProviderLanguage.CSharp) { ChoGuard.ArgumentNotNullOrEmpty(codeBlockFilePath, "codeBlockFilePath"); if (!ChoFile.Exists(codeBlockFilePath)) { throw new ArgumentException("{0} file not exists.".FormatString(codeBlockFilePath)); } _statements = File.ReadAllLines(codeBlockFilePath); AddNamespaces(namespaces); }