예제 #1
0
        public override void ChangeSignatureParameterArraySupport <TParent, TIntermediateParent, TParameter, TIntermediateParameter>(IIntermediateParameterParent <TParent, TIntermediateParent, TParameter, TIntermediateParameter> target, IIntermediateAssembly associatedAssembly, bool support)
        {
            var metadatumType = this.IdentityManager.ObtainTypeReference(this.IdentityManager.RuntimeEnvironment.GetCoreIdentifier(CliRuntimeCoreType.ParamArrayMetadatum, associatedAssembly));

            if (metadatumType == null)
            {
                return;
            }
            if (target.Parameters.Count == 0)
            {
                return;
            }
            IIntermediateParameterMember <TParent, TIntermediateParent> lastParameter = target.Parameters.Values[target.Parameters.Count - 1];

            if (SignatureSupportsParameterArray(target, associatedAssembly))
            {
                if (support)
                {
                    return;
                }
                var metadatum = lastParameter.Metadata[metadatumType];
                lastParameter.Metadata.Remove(metadatum);
                return;
            }
            else if (support)
            {
                lastParameter.Metadata.Add(new MetadatumDefinitionParameterValueCollection(metadatumType));
            }
        }
예제 #2
0
 public abstract void ChangeSignatureParameterArraySupport <TParent, TIntermediateParent, TParameter, TIntermediateParameter>(IIntermediateParameterParent <TParent, TIntermediateParent, TParameter, TIntermediateParameter> target, IIntermediateAssembly associatedAssembly, bool support)
     where TParent :
 IParameterParent <TParent, TParameter>
     where TIntermediateParent :
 IIntermediateParameterParent <TParent, TIntermediateParent, TParameter, TIntermediateParameter>, TParent
     where TParameter :
 IParameterMember <TParent>
     where TIntermediateParameter :
 IIntermediateParameterMember <TParent, TIntermediateParent>, TParameter;