public BigStringConfiguration(BigStringMode mode, FileTypeSymbol?fileTypeSymbol) { this.Mode = mode; if (this.Mode != BigStringMode.Database && fileTypeSymbol == null) { throw new ArgumentNullException(nameof(fileTypeSymbol)); } this.FileTypeSymbol = fileTypeSymbol; }
public static void ConfigureBigString(SchemaBuilder sb) { BigStringMode mode = BigStringMode.File; FileTypeLogic.Register(BigStringFileType.Exceptions, new FileTypeAlgorithm(f => new PrefixPair(Starter.Configuration.Value.Folders.ExceptionsFolder))); BigStringLogic.RegisterAll <ExceptionEntity>(sb, new BigStringConfiguration(mode, BigStringFileType.Exceptions)); FileTypeLogic.Register(BigStringFileType.OperationLog, new FileTypeAlgorithm(f => new PrefixPair(Starter.Configuration.Value.Folders.OperationLogFolder))); BigStringLogic.RegisterAll <OperationLogEntity>(sb, new BigStringConfiguration(mode, BigStringFileType.OperationLog)); FileTypeLogic.Register(BigStringFileType.ViewLog, new FileTypeAlgorithm(f => new PrefixPair(Starter.Configuration.Value.Folders.ViewLogFolder))); BigStringLogic.RegisterAll <ViewLogEntity>(sb, new BigStringConfiguration(mode, BigStringFileType.ViewLog)); FileTypeLogic.Register(BigStringFileType.EmailMessage, new FileTypeAlgorithm(f => new PrefixPair(Starter.Configuration.Value.Folders.EmailMessageFolder))); BigStringLogic.RegisterAll <EmailMessageEntity>(sb, new BigStringConfiguration(mode, BigStringFileType.EmailMessage)); }//ConfigureBigString
public static void ConfigureBigString(SchemaBuilder sb) { BigStringMode mode = BigStringMode.File; FileTypeLogic.Register(BigStringFileType.Exceptions, GetFileTypeAlgorithm(c => c.ExceptionsFolder)); BigStringLogic.RegisterAll <ExceptionEntity>(sb, new BigStringConfiguration(mode, BigStringFileType.Exceptions)); FileTypeLogic.Register(BigStringFileType.OperationLog, GetFileTypeAlgorithm(c => c.OperationLogFolder)); BigStringLogic.RegisterAll <OperationLogEntity>(sb, new BigStringConfiguration(mode, BigStringFileType.OperationLog)); FileTypeLogic.Register(BigStringFileType.ViewLog, GetFileTypeAlgorithm(c => c.ViewLogFolder)); BigStringLogic.RegisterAll <ViewLogEntity>(sb, new BigStringConfiguration(mode, BigStringFileType.ViewLog)); FileTypeLogic.Register(BigStringFileType.EmailMessage, GetFileTypeAlgorithm(c => c.EmailMessageFolder)); BigStringLogic.RegisterAll <EmailMessageEntity>(sb, new BigStringConfiguration(mode, BigStringFileType.EmailMessage)); }//ConfigureBigString