Пример #1
0
 public OwnedTypeParameterReference(ISymbolReference owner, int index)
 {
     if (owner == null)
     {
         throw new ArgumentNullException("owner");
     }
     this.owner = owner;
     this.index = index;
 }
 void SetCurrentSymbol(ISymbol symbol)
 {
     currentSymbolReference = null;
     if (symbol != null)
     {
         currentSymbolReference = symbol.ToReference();
     }
     currentReferences = null;
     textView.InvalidateLayer(KnownLayer.Selection);
 }
Пример #3
0
        private static string GetDecoratedSymbolName(ISymbolReference symbolReference)
        {
            string name = symbolReference.SymbolName;

            if (symbolReference.SymbolType == SymbolType.Configuration ||
                symbolReference.SymbolType == SymbolType.Function ||
                symbolReference.SymbolType == SymbolType.Workflow)
            {
                name += " { }";
            }

            return(name);
        }
Пример #4
0
        public static bool NodeShouldBeBound(ISymbolReference symbolReference, SemanticModel semanticModel)
        {
            if (!(symbolReference is InstanceFunctionCallSyntax instanceFunctionCallSyntax))
            {
                return(true);
            }

            if (instanceFunctionCallSyntax.BaseExpression is VariableAccessSyntax baseVariableSyntax &&
                semanticModel.Root.ImportedNamespaces.ContainsKey(baseVariableSyntax.Name.IdentifierName))
            {
                // we only expect to have bound InstanceFunctionCallsSyntax if they accessed on a namespace - e.g. sys.concat(..)
                return(true);
            }

            return(false);
        }
Пример #5
0
 public static bool NodeShouldBeBound(ISymbolReference symbolReference)
 => symbolReference is not InstanceFunctionCallSyntax
Пример #6
0
 public ExpressionResult WithNewSymbolReferenceAndTypeOfExpression(ISymbolReference symbolReference, DataType typeOfExpressin)
 {
     return(new ExpressionResult(symbolReference, typeOfExpressin, this.RefinementCases));
 }
Пример #7
0
 public ExpressionResult(ISymbolReference symbolReference, DataType typeOfExpression) : this(symbolReference, typeOfExpression, RefinementSetCases.Empty)
 {
 }
Пример #8
0
 public ExpressionResult(ISymbolReference symbolReference, DataType typeOfExpression, RefinementSetCases refinementCases)
 {
     _symbolReference  = symbolReference;
     _typeOfExpression = typeOfExpression;
     _refinementCases  = refinementCases;
 }
		void SetCurrentSymbol(ISymbol symbol)
		{
			currentSymbolReference = null;
			if (symbol != null)
				currentSymbolReference = symbol.ToReference();
			currentReferences = null;
			textView.InvalidateLayer(KnownLayer.Selection);
		}
Пример #10
0
 public Refinement(ISymbolReference reference, DataType dataType)
 {
     _reference = reference;
     _dataType  = dataType;
 }