private static void Main(string[] args) { if ((args == null) || (args.Length != 2)) { throw new ArgumentException(WrapperSR.GetString("InvalidArgumentsToMain"), "args"); } CompilerInput input = ReadCompilerInput(args[0]); WorkflowCompilerResults results = new WorkflowCompiler().Compile(MultiTargetingInfo.MultiTargetingUtilities.RenormalizeReferencedAssemblies(input.Parameters), input.Files); WriteCompilerOutput(args[1], results); }
private static string SerializeInputToWrapper(WorkflowCompilerParameters parameters, string[] files) { string tempFileName = Path.GetTempFileName(); using (Stream stream = new FileStream(tempFileName, FileMode.Create, FileAccess.Write, FileShare.Read)) { XmlWriterSettings settings = new XmlWriterSettings { Indent = true }; using (XmlWriter writer = XmlWriter.Create(stream, settings)) { CompilerInput graph = new CompilerInput(MultiTargetingInfo.MultiTargetingUtilities.NormalizeReferencedAssemblies(parameters), files); new DataContractSerializer(typeof(CompilerInput)).WriteObject(writer, graph); } } return(tempFileName); }
private static string SerializeInputToWrapper(WorkflowCompilerParameters parameters, string[] files) { string tempFileName = Path.GetTempFileName(); using (Stream stream = new FileStream(tempFileName, FileMode.Create, FileAccess.Write, FileShare.Read)) { XmlWriterSettings settings = new XmlWriterSettings { Indent = true }; using (XmlWriter writer = XmlWriter.Create(stream, settings)) { CompilerInput graph = new CompilerInput(MultiTargetingInfo.MultiTargetingUtilities.NormalizeReferencedAssemblies(parameters), files); new DataContractSerializer(typeof(CompilerInput)).WriteObject(writer, graph); } } return tempFileName; }