Пример #1
0
        public ICodeLensDataPoint CreateDataPoint(ICodeLensDescriptor descriptor)
        {
            if (serviceProvider == null)
            {
                return(null);
            }

            ICodeElementDescriptor codeElement = descriptor as ICodeElementDescriptor;
            string         filePath            = codeElement.FilePath;
            EditingSession editingSession      = EditingSessionFactory.WaitForSession(filePath);

            return(new ConflictDataPoint(editingSession, codeElement));
        }
Пример #2
0
        public bool CanCreateDataPoint(ICodeLensDescriptor descriptor)
        {
            if (serviceProvider == null)
            {
                return(false);
            }

            var codeElementDescriptor = descriptor as ICodeElementDescriptor;

            if (codeElementDescriptor != null &&
                (codeElementDescriptor.Kind == SyntaxNodeKind.Method ||
                 codeElementDescriptor.Kind == SyntaxNodeKind.Type ||
                 codeElementDescriptor.Kind == SyntaxNodeKind.Property))
            {
                return(true);
            }

            return(false);
        }
Пример #3
0
 public ICodeLensDataPoint CreateDataPoint(ICodeLensDescriptor codeLensDescriptor)
 {
     return(new CurrentUsersDataPoint(DataPointUpdater, WorkspaceUpdateManager, (ICodeElementDescriptor)codeLensDescriptor));
 }
Пример #4
0
 public bool CanCreateDataPoint(ICodeLensDescriptor descriptor)
 {
     return(descriptor is ICodeElementDescriptor);
 }
 public ICodeLensDataPoint CreateDataPoint(ICodeLensDescriptor descriptor)
 {
     return(new CodeHealthDataPoint((ICodeElementDescriptor)descriptor));
 }
 public bool CanCreateDataPoint(ICodeLensDescriptor descriptor)
 {
     return((descriptor is ICodeElementDescriptor codeElementDescriptor) && (codeElementDescriptor.Kind == SyntaxNodeKind.Method));
 }