Exemplo n.º 1
0
        public override bool CanApplyChange(ApplyChangesKind feature)
        {
            switch (feature)
            {
            case ApplyChangesKind.AddDocument:
            case ApplyChangesKind.RemoveDocument:
            case ApplyChangesKind.AddAdditionalDocument:
            case ApplyChangesKind.RemoveAdditionalDocument:
            case ApplyChangesKind.AddAnalyzerConfigDocument:
            case ApplyChangesKind.RemoveAnalyzerConfigDocument:
            case ApplyChangesKind.AddAnalyzerReference:
            case ApplyChangesKind.RemoveAnalyzerReference:
            case ApplyChangesKind.AddSolutionAnalyzerReference:
            case ApplyChangesKind.RemoveSolutionAnalyzerReference:
                return(true);

            case ApplyChangesKind.ChangeDocument:
            case ApplyChangesKind.ChangeAdditionalDocument:
            case ApplyChangesKind.ChangeAnalyzerConfigDocument:
            case ApplyChangesKind.ChangeDocumentInfo:
                return(this.CanApplyChangeDocument);

            case ApplyChangesKind.AddProjectReference:
            case ApplyChangesKind.AddMetadataReference:
                return(true);

            default:
                return(false);
            }
        }
 public override bool CanApplyChange(ApplyChangesKind feature)
 {
     return(feature == ApplyChangesKind.ChangeDocument ||
            feature == ApplyChangesKind.ChangeParseOptions ||
            feature == ApplyChangesKind.ChangeCompilationOptions ||
            feature == ApplyChangesKind.AddMetadataReference ||
            feature == ApplyChangesKind.RemoveMetadataReference);
 }
Exemplo n.º 3
0
        public override bool CanApplyChange(ApplyChangesKind feature)
        {
            if (feature == ApplyChangesKind.ChangeDocument)
            {
                return(true);
            }

            return(base.CanApplyChange(feature));
        }
Exemplo n.º 4
0
 public override bool CanApplyChange(ApplyChangesKind feature)
 {
     switch (feature)
     {
         case ApplyChangesKind.ChangeDocument:
             return true;
         default:
             return false;
     }
 }
Exemplo n.º 5
0
        public override bool CanApplyChange(ApplyChangesKind feature)
        {
            switch (feature)
            {
            case ApplyChangesKind.AddProject:
            case ApplyChangesKind.AddProjectReference:
                return(true);
            }

            return(false);
        }
Exemplo n.º 6
0
        public override bool CanApplyChange(ApplyChangesKind feature)
        {
            switch (feature)
            {
            case ApplyChangesKind.ChangeDocument:
                return(true);

            default:
                return(false);
            }
        }
        /// <inheritdoc />
        public override bool CanApplyChange(ApplyChangesKind feature)
        {
            switch (feature)
            {
                case ApplyChangesKind.ChangeDocument:
                case ApplyChangesKind.AddDocument:
                case ApplyChangesKind.RemoveDocument:
                    return true;

                default:
                    return false;
            }
        }
Exemplo n.º 8
0
        public override bool CanApplyChange(ApplyChangesKind feature)
        {
            switch (feature)
            {
            case ApplyChangesKind.ChangeDocument:
            case ApplyChangesKind.ChangeDocumentInfo:
            case ApplyChangesKind.AddMetadataReference:
            case ApplyChangesKind.RemoveMetadataReference:
                return(true);

            default:
                return(false);
            }
        }
Exemplo n.º 9
0
        public override bool CanApplyChange(ApplyChangesKind feature)
        {
            switch (feature)
            {
            case ApplyChangesKind.AddDocument:
            case ApplyChangesKind.RemoveDocument:
            case ApplyChangesKind.AddAdditionalDocument:
            case ApplyChangesKind.RemoveAdditionalDocument:
                return(true);

            case ApplyChangesKind.ChangeDocument:
            case ApplyChangesKind.ChangeAdditionalDocument:
                return(this.CanApplyChangeDocument);

            default:
                return(false);
            }
        }
Exemplo n.º 10
0
        public override bool CanApplyChange(ApplyChangesKind feature)
        {
            switch (feature)
            {
            case ApplyChangesKind.AddDocument:
            case ApplyChangesKind.RemoveDocument:
            case ApplyChangesKind.ChangeDocument:
            case ApplyChangesKind.AddMetadataReference:
            case ApplyChangesKind.RemoveMetadataReference:
            case ApplyChangesKind.AddProjectReference:
            case ApplyChangesKind.RemoveProjectReference:
            case ApplyChangesKind.AddAnalyzerReference:
            case ApplyChangesKind.RemoveAnalyzerReference:
            case ApplyChangesKind.AddAdditionalDocument:
            case ApplyChangesKind.RemoveAdditionalDocument:
            case ApplyChangesKind.ChangeAdditionalDocument:
            case ApplyChangesKind.ChangeParseOptions:
                return(true);

            default:
                return(false);
            }
        }
Exemplo n.º 11
0
		public override bool CanApplyChange (ApplyChangesKind feature)
		{
			return true;
		}
Exemplo n.º 12
0
 public override bool CanApplyChange(ApplyChangesKind feature)
 {
     // one can manipulate preview workspace solution as mush as they want.
     return true;
 }
 public override bool CanApplyChange(ApplyChangesKind feature)
 {
     return(true);
 }
 public override bool CanApplyChange(ApplyChangesKind feature)
 {
     return feature == ApplyChangesKind.ChangeDocument;
 }
 public override bool CanApplyChange(ApplyChangesKind feature)
 {
     // one can manipulate preview workspace solution as mush as they want.
     return(true);
 }
Exemplo n.º 16
0
 public override bool CanApplyChange(ApplyChangesKind feature)
 {
     // all kinds supported.
     return(true);
 }
Exemplo n.º 17
0
 public override bool CanApplyChange(ApplyChangesKind feature)
 {
     switch (feature)
     {
         case ApplyChangesKind.ChangeDocument:
         case ApplyChangesKind.AddDocument:
         case ApplyChangesKind.RemoveDocument:
         case ApplyChangesKind.AddMetadataReference:
         case ApplyChangesKind.RemoveMetadataReference:
         case ApplyChangesKind.AddProjectReference:
         case ApplyChangesKind.RemoveProjectReference:
         case ApplyChangesKind.AddAnalyzerReference:
         case ApplyChangesKind.RemoveAnalyzerReference:
             return true;
         default:
             return false;
     }
 }
Exemplo n.º 18
0
 // this workspace doesn't allow modification by calling TryApplyChanges.
 // consumer of solution is still free to fork solution as they want, they just can't apply those changes
 // back to primary workspace. only solution service can update primary workspace
 public override bool CanApplyChange(ApplyChangesKind feature) => false;
Exemplo n.º 19
0
 public override bool CanApplyChange(ApplyChangesKind feature)
 {
     // Whitespace formatting should only produce document changes; no other types of changes are supported.
     return(feature == ApplyChangesKind.ChangeDocument);
 }
Exemplo n.º 20
0
 public override bool CanApplyChange(ApplyChangesKind feature)
 => feature == ApplyChangesKind.ChangeDocument;
Exemplo n.º 21
0
 public override bool CanApplyChange(ApplyChangesKind feature)
 {
     // all kinds supported.
     return true;
 }
Exemplo n.º 22
0
 /// <summary>
 /// Determines if the specific kind of change is supported by the ApplyChanges method.
 /// </summary>
 public virtual bool CanApplyChange(ApplyChangesKind feature)
 {
     return(false);
 }
Exemplo n.º 23
0
 public override bool CanApplyChange(ApplyChangesKind feature)
 {
     return(feature == ApplyChangesKind.ChangeDocument || base.CanApplyChange(feature));
 }
Exemplo n.º 24
0
 public override bool CanApplyChange(ApplyChangesKind feature)
 {
     return(_allowedKinds.Contains(feature));
 }
Exemplo n.º 25
0
 // for now, temproary workspace is not mutable. consumer can still freely fork solution as they wish
 // they just can't apply thsoe changes back to the workspace.
 public override bool CanApplyChange(ApplyChangesKind feature) => false;