internal static DocumentInfo Create( DocumentId id, string name, IReadOnlyList <string> folders, SourceCodeKind sourceCodeKind, TextLoader?loader, string?filePath, bool isGenerated, bool designTimeOnly, IDocumentServiceProvider?documentServiceProvider ) { return(new DocumentInfo( new DocumentAttributes( id, name, folders, sourceCodeKind, filePath, isGenerated, designTimeOnly: designTimeOnly ), loader, documentServiceProvider )); }
/// <summary> /// Create a new instance of a <see cref="DocumentInfo"/>. /// </summary> internal DocumentInfo( DocumentAttributes attributes, TextLoader?loader, IDocumentServiceProvider?documentServiceProvider ) { Attributes = attributes; TextLoader = loader; DocumentServiceProvider = documentServiceProvider; }
public static DocumentInfo Create( DocumentId id, string name, IEnumerable <string>?folders = null, SourceCodeKind sourceCodeKind = SourceCodeKind.Regular, TextLoader?loader = null, string?filePath = null, bool isGenerated = false) { return(Create(id, name, folders, sourceCodeKind, loader, filePath, isGenerated, documentServiceProvider: null)); }
internal static DocumentInfo Create( DocumentId id, string name, IEnumerable <string>?folders, SourceCodeKind sourceCodeKind, TextLoader?loader, string?filePath, bool isGenerated, IDocumentServiceProvider?documentServiceProvider) { return(new DocumentInfo(new DocumentAttributes(id, name, folders.ToBoxedImmutableArray(), sourceCodeKind, filePath, isGenerated), loader, documentServiceProvider)); }
public static DocumentInfo Create( DocumentId id, string name, IEnumerable <string>?folders, SourceCodeKind sourceCodeKind, TextLoader?loader, string?filePath, bool isGenerated, RazorDocumentServiceProviderWrapper documentServiceProvider) { return(DocumentInfo.Create(id, name, folders.ToBoxedImmutableArray(), sourceCodeKind, loader, filePath, isGenerated, documentServiceProvider)); }
public static DocumentInfo Create( DocumentId id, string name, IEnumerable <string>?folders = null, SourceCodeKind sourceCodeKind = SourceCodeKind.Regular, TextLoader?loader = null, string?filePath = null, bool isGenerated = false) { return(Create( id ?? throw new ArgumentNullException(nameof(id)), name ?? throw new ArgumentNullException(nameof(name)), folders.AsBoxedImmutableArrayWithNonNullItems() ?? throw new ArgumentNullException(nameof(folders)), sourceCodeKind, loader, filePath, isGenerated, documentServiceProvider: null)); }
public DocumentInfo CreateDocumentInfo( DocumentId id, string name, IReadOnlyList <string>?folders = null, SourceCodeKind sourceCodeKind = SourceCodeKind.Regular, TextLoader?loader = null, string?filePath = null, bool isGenerated = false, bool designTimeOnly = false, IRazorDocumentServiceProvider?razorDocumentServiceProvider = null) { folders ??= new List <string>(); IDocumentServiceProvider?documentServiceProvider = null; if (razorDocumentServiceProvider is not null) { documentServiceProvider = new RazorDocumentServiceProviderWrapper(razorDocumentServiceProvider); } return(DocumentInfo.Create(id, name, folders, sourceCodeKind, loader, filePath, isGenerated, designTimeOnly, documentServiceProvider)); }
public DocumentInfo WithTextLoader(TextLoader?loader) { return(With(loader: loader)); }