public AbstractRecoverableSyntaxRoot(
                AbstractSyntaxTreeFactoryService service,
                string filePath,
                ParseOptions options,
                ValueSource <TextAndVersion> text,
                TRoot root)
            {
                System.Diagnostics.Debug.Assert(service != null);
                System.Diagnostics.Debug.Assert(filePath != null);
                System.Diagnostics.Debug.Assert(options != null);
                System.Diagnostics.Debug.Assert(text != null);
                System.Diagnostics.Debug.Assert(root != null);

                this.service    = service;
                this.filePath   = filePath;
                this.options    = options;
                this.textSource = text;
                this.length     = root.FullSpan.Length;

                this.syntaxTreeCache = WorkspaceServices.GetService <ISyntaxTreeCacheService>();
                System.Diagnostics.Debug.Assert(this.syntaxTreeCache != null);

                this.evictAction = new WeakAction <AbstractRecoverableSyntaxRoot <TRoot>, SyntaxNode>(this, (r, d) => r.OnEvicted(d));

                this.rootSource = new ConstantValueSource <TRoot>(root);
            }
 public ReparsedSyntaxRoot(
     AbstractSyntaxTreeFactoryService service,
     string fileName,
     ParseOptions options,
     ValueSource <TextAndVersion> text,
     TRoot root)
     : base(service, fileName, options, text, root)
 {
 }