public static ProjectAttributes ReadFrom(ObjectReader reader) { var projectId = ProjectId.ReadFrom(reader); // var version = VersionStamp.ReadFrom(reader); var name = reader.ReadString(); var assemblyName = reader.ReadString(); var language = reader.ReadString(); var filePath = reader.ReadString(); var outputFilePath = reader.ReadString(); var outputRefFilePath = reader.ReadString(); var compilationOutputFilePaths = CompilationOutputInfo.ReadFrom(reader); var defaultNamespace = reader.ReadString(); var isSubmission = reader.ReadBoolean(); var hasAllInformation = reader.ReadBoolean(); var runAnalyzers = reader.ReadBoolean(); var telemetryId = reader.ReadGuid(); return(new ProjectAttributes( projectId, VersionStamp.Create(), name, assemblyName, language, filePath, outputFilePath, outputRefFilePath, compilationOutputFilePaths, defaultNamespace, isSubmission, hasAllInformation, runAnalyzers, telemetryId)); }
public ProjectAttributes( ProjectId id, VersionStamp version, string name, string assemblyName, string language, string?filePath, string?outputFilePath, string?outputRefFilePath, CompilationOutputInfo compilationOutputFilePaths, string?defaultNamespace, bool isSubmission, bool hasAllInformation, bool runAnalyzers, Guid telemetryId) { Id = id; Name = name; Language = language; AssemblyName = assemblyName; Version = version; FilePath = filePath; OutputFilePath = outputFilePath; OutputRefFilePath = outputRefFilePath; CompilationOutputInfo = compilationOutputFilePaths; DefaultNamespace = defaultNamespace; IsSubmission = isSubmission; HasAllInformation = hasAllInformation; RunAnalyzers = runAnalyzers; TelemetryId = telemetryId; }
public void WriteTo(ObjectWriter writer) { Id.WriteTo(writer); // TODO: figure out a way to send version info over as well // info.Version.WriteTo(writer); writer.WriteString(Name); writer.WriteString(AssemblyName); writer.WriteString(Language); writer.WriteString(FilePath); writer.WriteString(OutputFilePath); writer.WriteString(OutputRefFilePath); CompilationOutputInfo.WriteTo(writer); writer.WriteString(DefaultNamespace); writer.WriteBoolean(IsSubmission); writer.WriteBoolean(HasAllInformation); writer.WriteBoolean(RunAnalyzers); writer.WriteGuid(TelemetryId); // TODO: once CompilationOptions, ParseOptions, ProjectReference, MetadataReference, AnalyzerReference supports // serialization, we should include those here as well. }