Esempio n. 1
0
 internal Compilation PrepareNewCompilation()
 {
     LastCompilationId = Guid.NewGuid();
     IEnumerable <string> enumerable = rawCmdLineArguments.Split(new string[1]
     {
         " "
     }, StringSplitOptions.RemoveEmptyEntries);
     CommandLineArguments val  = CommandLineParser.Parse(enumerable, baseDirectory, sdkDirectory, null);
     SyntaxTree           val2 = ParseSyntaxTree(source, val.ParseOptions);
     CompilationOptions   val3 = val.CompilationOptions.WithOutputKind((OutputKind)2).WithOptimizationLevel((OptimizationLevel)((!debug) ? 1 : 0))
                                 .WithAssemblyIdentityComparer(DesktopAssemblyIdentityComparer.Default);
     IEnumerable <MetadataReference> second = from x in ImmutableArrayExtensions.Select(val.MetadataReferences, (CommandLineReference x) => x.Reference)
                                              select MetadataReference.CreateFromFile(x, default, null);
Esempio n. 2
0
 public void SelectEmpty()
 {
     Assert.Throws <ArgumentNullException>(() => ImmutableArrayExtensions.Select <int, bool>(empty, null));
     Assert.False(ImmutableArrayExtensions.Select(empty, n => true).Any());
 }
Esempio n. 3
0
 public void SelectEmptyDefault()
 {
     Assert.Throws <NullReferenceException>(() => ImmutableArrayExtensions.Select <int, bool>(emptyDefault, null));
     Assert.Throws <NullReferenceException>(() => ImmutableArrayExtensions.Select(emptyDefault, n => true));
 }
Esempio n. 4
0
 public void Select()
 {
     Assert.Equal(new[] { 4, 5, 6 }, ImmutableArrayExtensions.Select(manyElements, n => n + 3));
     Assert.Throws <ArgumentNullException>(() => ImmutableArrayExtensions.Select <int, bool>(manyElements, null));
 }
 public void SelectEmptyDefault()
 {
     TestExtensionsMethods.ValidateDefaultThisBehavior(() => ImmutableArrayExtensions.Select <int, bool>(s_emptyDefault, null));
     TestExtensionsMethods.ValidateDefaultThisBehavior(() => ImmutableArrayExtensions.Select(s_emptyDefault, n => true));
 }