Example #1
0
 public RockOptions(OptimizationSetting level         = OptimizationSetting.Release,
                    CodeFileOption codeFile           = CodeFileOption.None,
                    SerializationOption serialization = SerializationOption.NotSupported,
                    CachingOption caching             = CachingOption.UseCache,
                    AllowWarning allowWarning         = AllowWarning.No,
                    string?codeFileDirectory          = null) =>
 (this.Optimization, this.CodeFile, this.Serialization, this.Caching, this.AllowWarning, this.CodeFileDirectory) =
Example #2
0
 private static void AssertOptions(RockOptions options,
                                   OptimizationSetting level, CodeFileOption codeFile, SerializationOption serialization,
                                   CachingOption caching, AllowWarning allowWarnings, string codeFileDirectory)
 {
     Assert.That(options.Optimization, Is.EqualTo(level), nameof(options.Optimization));
     Assert.That(options.CodeFile, Is.EqualTo(codeFile), nameof(options.CodeFile));
     Assert.That(options.Serialization, Is.EqualTo(serialization), nameof(options.Serialization));
     Assert.That(options.Caching, Is.EqualTo(caching), nameof(options.Caching));
     Assert.That(options.AllowWarning, Is.EqualTo(allowWarnings), nameof(options.AllowWarning));
     Assert.That(options.CodeFileDirectory, Is.EqualTo(codeFileDirectory), nameof(options.CodeFileDirectory));
 }