예제 #1
0
 public Library(
     string name,
     Optional.Class <string> directory =
     new Optional.Class <string>(),
     Optional.Class <IEnumerable <SrcPackage> > packageList =
     new Optional.Class <IEnumerable <SrcPackage> >())
 {
     Name        = name;
     Directory   = directory.Cast();
     PackageList = packageList.OneIfAbsent();
 }
예제 #2
0
 public ItemDefinitionGroup(
     Optional.Class <string> condition =
     new Optional.Class <string>(),
     Optional.Class <ClCompile> clCompile =
     new Optional.Class <ClCompile>(),
     Optional.Class <Link> link =
     new Optional.Class <Link>())
 {
     Condition = condition.Cast();
     ClCompile = clCompile.Cast();
     Link      = link.Cast();
 }
예제 #3
0
 public Package(
     Optional.Class <string> name = new Optional.Class <string>(),
     Optional.Class <IEnumerable <string> > preprocessorDefinitions =
     new Optional.Class <IEnumerable <string> >(),
     Optional.Class <IEnumerable <string> > lineList =
     new Optional.Class <IEnumerable <string> >(),
     Optional.Class <IEnumerable <string> > fileList =
     new Optional.Class <IEnumerable <string> >(),
     bool skip = false)
 {
     Name = name.Cast();
     PreprocessorDefinitions = preprocessorDefinitions.SelectMany();
     LineList = lineList.SelectMany();
     FileList = fileList.SelectMany();
     Skip     = skip;
 }
예제 #4
0
 public ClCompile(
     Optional.Class <string> include =
     new Optional.Class <string>(),
     Optional.Struct <PrecompiledHeader> precompiledHeader =
     new Optional.Struct <PrecompiledHeader>(),
     Optional.Class <IEnumerable <string> > preprocessorDefinitions =
     new Optional.Class <IEnumerable <string> >(),
     Optional.Class <IEnumerable <string> > additionalIncludeDirectories =
     new Optional.Class <IEnumerable <string> >(),
     Optional.Struct <bool> sDLCheck =
     new Optional.Struct <bool>(),
     Optional.Struct <ExceptionHandling> exceptionHandling =
     new Optional.Struct <ExceptionHandling>())
 {
     Include                      = include.Cast();
     PrecompiledHeader            = precompiledHeader.Cast();
     PreprocessorDefinitions      = preprocessorDefinitions.SelectMany();
     AdditionalIncludeDirectories =
         additionalIncludeDirectories.SelectMany();
     SDLCheck          = sDLCheck.Cast();
     ExceptionHandling = exceptionHandling.Cast();
 }
예제 #5
0
 public static IEnumerable <T> OneIfAbsent <T>(
     this Optional.Class <IEnumerable <T> > value)
     where T : new()
 {
     return(value.Cast().Select(v => v, () => new[] { new T() }));
 }