public GeneratorContext(DirectoryInfo?cacheFolder = null, DirectoryInfo?tempFolder = null, Func <object, string?>?objectToStingRepresentation = null) { this.CacheFolder = cacheFolder ?? new DirectoryInfo("Cache"); this.TempFolder = tempFolder ?? new DirectoryInfo("Temp"); this.EmptyMetadata = MetadataContainer.EmptyFromContext(this); this.objectToStingRepresentation = objectToStingRepresentation; }
IDocument IDocument.With(MetadataContainer metadata) => this.With(metadata);
public IDocument <T> With(MetadataContainer metadata) => new Document <T>(this.Value, this.Hash, this.Id, metadata, this.Context);
public IDocument <T> With(MetadataContainer metadata) => new DocumentLazy <T>(this.valueCallback, this.Hash, this.Id, metadata, this.Context);
public IDocument <Stream> With(MetadataContainer metadata) => new GitFileDocument(this.Id, this.Hash, this.createStreamCallback, metadata, this.Context);
private GitFileDocument(string id, string contentHash, Func <Stream> createStreamCallback, MetadataContainer metadata, GeneratorContext context) : base(id, metadata, contentHash, context) { this.createStreamCallback = createStreamCallback; }