Exemplo n.º 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");
 }
Exemplo n.º 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));
 }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 5
0
 internal EventManagerType()
     : base("System.Windows.EventManager")
 {
     this.RegisterClassHandler = new QualifiedMethod(this, nameof(this.RegisterClassHandler));
     this.RegisterRoutedEvent  = new QualifiedMethod(this, nameof(this.RegisterRoutedEvent));
 }
Exemplo n.º 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 } } &&
Exemplo n.º 7
0
 internal ObjectType()
     : base("System.Object", "object")
 {
     this.Equals          = new QualifiedMethod(this, nameof(this.Equals));
     this.ReferenceEquals = new QualifiedMethod(this, nameof(this.ReferenceEquals));
 }