示例#1
0
 public CodeCellState(
     CodeCellId codeCellId,
     CodeCellBuffer buffer)
 {
     CodeCellId = codeCellId;
     Buffer     = buffer;
 }
示例#2
0
        public void Empty()
        {
            CodeCellId emptySubmissionId     = default;
            DocumentId emptyDocumentId       = default;
            DocumentId convertedSubmissionId = emptySubmissionId.ToDocumentId();

            Assert.Equal(emptyDocumentId, convertedSubmissionId);
        }
示例#3
0
        public void Create()
        {
            var projectId    = Guid.NewGuid();
            var id           = Guid.NewGuid();
            var submissionId = new CodeCellId(projectId, id);

            Assert.Equal(projectId, submissionId.ProjectId);
            Assert.Equal(id, submissionId.Id);
        }
示例#4
0
        public void Parse()
        {
            var projectId    = Guid.NewGuid();
            var id           = Guid.NewGuid();
            var submissionId = CodeCellId.Parse($"{projectId}/{id}");

            Assert.Equal(projectId, submissionId.ProjectId);
            Assert.Equal(id, submissionId.Id);
        }
 internal CapturedOutputSegment(
     CodeCellId codeCellId,
     int fileDescriptor,
     char singleChar) : this(
         codeCellId,
         fileDescriptor,
         singleChar.ToString())
 {
 }
 CapturedOutputSegment(
     CodeCellId codeCellId,
     int fileDescriptor,
     string value)
 {
     CodeCellId     = codeCellId;
     FileDescriptor = fileDescriptor;
     Value          = value;
 }
示例#7
0
 internal CapturedOutputSegment(
     CodeCellId codeCellId,
     int fileDescriptor,
     char singleChar)
 {
     CodeCellId     = codeCellId;
     FileDescriptor = fileDescriptor;
     Value          = singleChar.ToString();
 }
 internal CapturedOutputSegment(
     CodeCellId codeCellId,
     int fileDescriptor,
     char [] buffer,
     int index,
     int count) : this(
         codeCellId,
         fileDescriptor,
         new string (buffer, index, count))
 {
 }
示例#9
0
 internal CapturedOutputSegment(
     CodeCellId codeCellId,
     int fileDescriptor,
     char [] buffer,
     int index,
     int count)
 {
     CodeCellId     = codeCellId;
     FileDescriptor = fileDescriptor;
     Value          = new string (buffer, index, count);
 }
示例#10
0
 public Compilation(
     CodeCellId codeCellId,
     int submissionNumber,
     EvaluationEnvironment evaluationEnvironment,
     bool isResultAnExpression,
     AssemblyDefinition executableAssembly,
     IReadOnlyList <AssemblyDefinition> references)
 {
     CodeCellId            = codeCellId;
     SubmissionNumber      = submissionNumber;
     EvaluationEnvironment = evaluationEnvironment;
     IsResultAnExpression  = isResultAnExpression;
     ExecutableAssembly    = executableAssembly;
     References            = references;
 }
示例#11
0
 public CodeCellState(CodeCellId codeCellId)
 => CodeCellId = codeCellId;
示例#12
0
 internal CapturedOutputSegment(int fileDescriptor, char [] buffer, int index, int count, CodeCellId context)
 {
     FileDescriptor = fileDescriptor;
     Value          = new string (buffer, index, count);
     Context        = context;
 }
示例#13
0
 public static DocumentId ToDocumentId(this CodeCellId codeCellId)
 => DocumentId.CreateFromSerialized(
     ProjectId.CreateFromSerialized(codeCellId.ProjectId),
     codeCellId.Id);
 public Writer(int fileDescriptor, CapturedOutputWriter monitor)
 {
     this.fileDescriptor = fileDescriptor;
     this.monitor        = monitor;
     this.codeCellId     = monitor.codeCellId;
 }
 public CapturedOutputWriter(CodeCellId codeCellId)
 {
     this.codeCellId = codeCellId;
     StandardOutput  = new Writer(StandardOutputFd, this);
     StandardError   = new Writer(StandardErrorFd, this);
 }
示例#16
0
 internal CapturedOutputSegment(int fileDescriptor, char singleChar, CodeCellId context)
 {
     FileDescriptor = fileDescriptor;
     Value          = singleChar.ToString();
     Context        = context;
 }
 public Writer(int fileDescriptor, CapturedOutputWriter monitor)
 {
     this.fileDescriptor = fileDescriptor;
     this.monitor        = monitor;
     this.context        = monitor.context;
 }