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(); }
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(); }
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; }
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(); }
public static IEnumerable <T> OneIfAbsent <T>( this Optional.Class <IEnumerable <T> > value) where T : new() { return(value.Cast().Select(v => v, () => new[] { new T() })); }