protected Mfconsulting.General.Prj2Make.Schema.Prjx.File[] GetContents(Mfconsulting.General.Prj2Make.Schema.Csproj.File[] Include) { Mfconsulting.General.Prj2Make.Schema.Prjx.File[] theFiles = null; int i = 0; if (Include != null && Include.Length > 0) { theFiles = new Mfconsulting.General.Prj2Make.Schema.Prjx.File[Include.Length]; } else { return(null); } // Iterate through the file collection of the csproj file foreach (Mfconsulting.General.Prj2Make.Schema.Csproj.File fl in Include) { Mfconsulting.General.Prj2Make.Schema.Prjx.File flOut = new Mfconsulting.General.Prj2Make.Schema.Prjx.File(); flOut.name = String.Format(".{0}{1}", Path.DirectorySeparatorChar, fl.RelPath); switch (fl.SubType) { case "Code": flOut.subtype = Mfconsulting.General.Prj2Make.Schema.Prjx.FileSubtype.Code; break; } switch (fl.BuildAction) { case Mfconsulting.General.Prj2Make.Schema.Csproj.FileBuildAction.Compile: flOut.buildaction = Mfconsulting.General.Prj2Make.Schema.Prjx.FileBuildaction.Compile; break; case Mfconsulting.General.Prj2Make.Schema.Csproj.FileBuildAction.Content: flOut.buildaction = Mfconsulting.General.Prj2Make.Schema.Prjx.FileBuildaction.Exclude; break; case Mfconsulting.General.Prj2Make.Schema.Csproj.FileBuildAction.EmbeddedResource: flOut.buildaction = Mfconsulting.General.Prj2Make.Schema.Prjx.FileBuildaction.EmbedAsResource; break; case Mfconsulting.General.Prj2Make.Schema.Csproj.FileBuildAction.None: flOut.buildaction = Mfconsulting.General.Prj2Make.Schema.Prjx.FileBuildaction.Exclude; break; } flOut.dependson = fl.DependentUpon; flOut.data = ""; // increment the iterator value theFiles[i++] = flOut; } return(theFiles); }
protected Mfconsulting.General.Prj2Make.Schema.Prjx.File[] GetContents(Mfconsulting.General.Prj2Make.Schema.Csproj.File[] Include) { Mfconsulting.General.Prj2Make.Schema.Prjx.File[] theFiles = null; int i = 0; if(Include != null && Include.Length > 0) { theFiles = new Mfconsulting.General.Prj2Make.Schema.Prjx.File[Include.Length]; } else { return null; } // Iterate through the file collection of the csproj file foreach(Mfconsulting.General.Prj2Make.Schema.Csproj.File fl in Include) { Mfconsulting.General.Prj2Make.Schema.Prjx.File flOut = new Mfconsulting.General.Prj2Make.Schema.Prjx.File(); flOut.name = String.Format(".{0}{1}", Path.DirectorySeparatorChar, fl.RelPath); switch(fl.SubType) { case "Code": flOut.subtype = Mfconsulting.General.Prj2Make.Schema.Prjx.FileSubtype.Code; break; } switch(fl.BuildAction) { case Mfconsulting.General.Prj2Make.Schema.Csproj.FileBuildAction.Compile: flOut.buildaction = Mfconsulting.General.Prj2Make.Schema.Prjx.FileBuildaction.Compile; break; case Mfconsulting.General.Prj2Make.Schema.Csproj.FileBuildAction.Content: flOut.buildaction = Mfconsulting.General.Prj2Make.Schema.Prjx.FileBuildaction.Exclude; break; case Mfconsulting.General.Prj2Make.Schema.Csproj.FileBuildAction.EmbeddedResource: flOut.buildaction = Mfconsulting.General.Prj2Make.Schema.Prjx.FileBuildaction.EmbedAsResource; break; case Mfconsulting.General.Prj2Make.Schema.Csproj.FileBuildAction.None: flOut.buildaction = Mfconsulting.General.Prj2Make.Schema.Prjx.FileBuildaction.Exclude; break; } flOut.dependson = fl.DependentUpon; flOut.data = ""; // increment the iterator value theFiles[i++ ] = flOut; } return theFiles; }