示例#1
0
        public static Stream Serialize(CoveragePrepareResult instrumentState)
        {
            MemoryStream ms = new MemoryStream();

            new DataContractSerializer(typeof(CoveragePrepareResult)).WriteObject(ms, instrumentState);
            ms.Position = 0;
            return(ms);
        }
示例#2
0
 public Coverage(CoveragePrepareResult prepareResult, ILogger logger)
 {
     this._identifier    = prepareResult.Identifier;
     this._module        = prepareResult.Module;
     this._mergeWith     = prepareResult.MergeWith;
     this._useSourceLink = prepareResult.UseSourceLink;
     this._results       = new List <InstrumenterResult>(prepareResult.Results);
     _logger             = logger;
 }
示例#3
0
 public Coverage(CoveragePrepareResult prepareResult, ILogger logger, IInstrumentationHelper instrumentationHelper)
 {
     _identifier            = prepareResult.Identifier;
     _module                = prepareResult.Module;
     _mergeWith             = prepareResult.MergeWith;
     _useSourceLink         = prepareResult.UseSourceLink;
     _results               = new List <InstrumenterResult>(prepareResult.Results);
     _logger                = logger;
     _instrumentationHelper = instrumentationHelper;
 }
示例#4
0
 public Coverage(CoveragePrepareResult prepareResult, ILogger logger, IInstrumentationHelper instrumentationHelper, IFileSystem fileSystem)
 {
     _identifier            = prepareResult.Identifier;
     _module                = prepareResult.Module;
     _mergeWith             = prepareResult.MergeWith;
     _useSourceLink         = prepareResult.UseSourceLink;
     _pathOverrides         = prepareResult.PathOverrides;
     _results               = new List <InstrumenterResult>(prepareResult.Results);
     _logger                = logger;
     _instrumentationHelper = instrumentationHelper;
     _fileSystem            = fileSystem;
 }
示例#5
0
        public static Stream Serialize(CoveragePrepareResult instrumentState)
        {
            var          serializer = new JsonSerializer();
            MemoryStream ms         = new MemoryStream();

            using (var sw = new StreamWriter(ms, Encoding.UTF8, 1024, true))
            {
                serializer.Serialize(sw, instrumentState);
                sw.Flush();
                ms.Position = 0;
                return(ms);
            }
        }
示例#6
0
 public Coverage(CoveragePrepareResult prepareResult,
                 ILogger logger,
                 IInstrumentationHelper instrumentationHelper,
                 IFileSystem fileSystem,
                 ISourceRootTranslator sourceRootTranslator)
 {
     Identifier            = prepareResult.Identifier;
     _moduleOrAppDirectory = prepareResult.ModuleOrDirectory;
     _parameters           = prepareResult.Parameters;
     _results = new List <InstrumenterResult>(prepareResult.Results);
     _logger  = logger;
     _instrumentationHelper = instrumentationHelper;
     _fileSystem            = fileSystem;
     _sourceRootTranslator  = sourceRootTranslator;
 }
示例#7
0
 public Coverage(CoveragePrepareResult prepareResult,
                 ILogger logger,
                 IInstrumentationHelper instrumentationHelper,
                 IFileSystem fileSystem,
                 ISourceRootTranslator sourceRootTranslator)
 {
     _identifier           = prepareResult.Identifier;
     _moduleOrAppDirectory = prepareResult.ModuleOrDirectory;
     _mergeWith            = prepareResult.MergeWith;
     _useSourceLink        = prepareResult.UseSourceLink;
     _results = new List <InstrumenterResult>(prepareResult.Results);
     _logger  = logger;
     _instrumentationHelper = instrumentationHelper;
     _fileSystem            = fileSystem;
     _sourceRootTranslator  = sourceRootTranslator;
 }