Наследование: WrappedParameterSymbol
Пример #1
0
        //internal override OverriddenOrHiddenMembersResult OverriddenOrHiddenMembers
        //{
        //    get
        //    {
        //        if (_lazyOverriddenOrHiddenMembers == null)
        //        {
        //            Interlocked.CompareExchange(ref _lazyOverriddenOrHiddenMembers, this.MakeOverriddenOrHiddenMembers(), null);
        //        }
        //        return _lazyOverriddenOrHiddenMembers;
        //    }
        //}

        private ImmutableArray <ParameterSymbol> SubstituteParameters()
        {
            var unsubstitutedParameters = _originalDefinition.Parameters;

            if (unsubstitutedParameters.IsEmpty)
            {
                return(unsubstitutedParameters);
            }
            else
            {
                int count       = unsubstitutedParameters.Length;
                var substituted = new ParameterSymbol[count];
                for (int i = 0; i < count; i++)
                {
                    substituted[i] = new SubstitutedParameterSymbol(this, _containingType.TypeSubstitution, unsubstitutedParameters[i]);
                }
                return(substituted.AsImmutableOrNull());
            }
        }
Пример #2
0
        //internal override OverriddenOrHiddenMembersResult OverriddenOrHiddenMembers
        //{
        //    get
        //    {
        //        if (_lazyOverriddenOrHiddenMembers == null)
        //        {
        //            Interlocked.CompareExchange(ref _lazyOverriddenOrHiddenMembers, this.MakeOverriddenOrHiddenMembers(), null);
        //        }
        //        return _lazyOverriddenOrHiddenMembers;
        //    }
        //}

        private ImmutableArray<ParameterSymbol> SubstituteParameters()
        {
            var unsubstitutedParameters = _originalDefinition.Parameters;

            if (unsubstitutedParameters.IsEmpty)
            {
                return unsubstitutedParameters;
            }
            else
            {
                int count = unsubstitutedParameters.Length;
                var substituted = new ParameterSymbol[count];
                for (int i = 0; i < count; i++)
                {
                    substituted[i] = new SubstitutedParameterSymbol(this, _containingType.TypeSubstitution, unsubstitutedParameters[i]);
                }
                return substituted.AsImmutableOrNull();
            }
        }