Example #1
0
 internal DependencyObjectType()
     : base("System.Windows.DependencyObject")
 {
     this.GetValue        = new QualifiedMethod(this, "GetValue");
     this.SetValue        = new QualifiedMethod(this, "SetValue");
     this.SetCurrentValue = new QualifiedMethod(this, "SetCurrentValue");
 }
Example #2
0
 private static bool TryGetCall(InvocationExpressionSyntax invocation, QualifiedMethod qualifiedMethod, int expectedArgs, SemanticModel semanticModel, CancellationToken cancellationToken, out IMethodSymbol method)
 {
     method = null;
     return(invocation.ArgumentList is ArgumentListSyntax argumentList &&
            argumentList.Arguments.Count == expectedArgs &&
            semanticModel.TryGetSymbol(invocation, qualifiedMethod, cancellationToken, out method));
 }
Example #3
0
        internal DependencyPropertyType()
            : base("System.Windows.DependencyProperty")
        {
            this.Register                 = new QualifiedMethod(this, nameof(this.Register));
            this.RegisterReadOnly         = new QualifiedMethod(this, nameof(this.RegisterReadOnly));
            this.RegisterAttached         = new QualifiedMethod(this, nameof(this.RegisterAttached));
            this.RegisterAttachedReadOnly = new QualifiedMethod(this, nameof(this.RegisterAttachedReadOnly));

            this.AddOwner         = new QualifiedMethod(this, nameof(this.AddOwner));
            this.OverrideMetadata = new QualifiedMethod(this, nameof(this.OverrideMetadata));
        }
Example #4
0
        private static bool TryGetCall(InvocationExpressionSyntax invocation, QualifiedMethod qualifiedMethod, int expectedArgs, SemanticModel semanticModel, CancellationToken cancellationToken, out IMethodSymbol method)
        {
            method = null;
            if (invocation == null ||
                invocation.ArgumentList == null ||
                invocation.ArgumentList.Arguments.Count != expectedArgs)
            {
                return(false);
            }

            return(semanticModel.TryGetSymbol(invocation, qualifiedMethod, cancellationToken, out method));
        }
Example #5
0
 internal EventManagerType()
     : base("System.Windows.EventManager")
 {
     this.RegisterClassHandler = new QualifiedMethod(this, nameof(this.RegisterClassHandler));
     this.RegisterRoutedEvent  = new QualifiedMethod(this, nameof(this.RegisterRoutedEvent));
 }
Example #6
0
 private static bool TryGetCall(InvocationExpressionSyntax invocation, QualifiedMethod qualifiedMethod, SemanticModel semanticModel, CancellationToken cancellationToken, [NotNullWhen(true)] out IMethodSymbol?method)
 {
     method = null;
     return(invocation is { ArgumentList : { Arguments : { } arguments } } &&
Example #7
0
 internal ObjectType()
     : base("System.Object", "object")
 {
     this.Equals          = new QualifiedMethod(this, nameof(this.Equals));
     this.ReferenceEquals = new QualifiedMethod(this, nameof(this.ReferenceEquals));
 }