IIntermediateGenericParameter[] IIntermediateGenericParameterDictionary.AddRange(params GenericParameterData[] genericParameterData) { var resultOriginal = this.AddRange(genericParameterData); var result = new IIntermediateGenericParameter[resultOriginal.Length]; for (int i = 0; i < resultOriginal.Length; i++) { result[i] = resultOriginal[i]; } return(result); }
public IGenericParameterUniqueIdentifier GetIdentifier(IIntermediateGenericParameter member) { if (member.Position > -1) { return(TypeSystemIdentifiers.GetGenericParameterIdentifier(member.Position, member.Name, member is IGenericTypeParameter)); } else { return(TypeSystemIdentifiers.GetGenericParameterIdentifier(member.Name, member is IGenericTypeParameter)); } }
public string Visit <TGenericParameter, TIntermediateGenericParameter, TParent, TIntermediateParent>(IIntermediateGenericParameter <TGenericParameter, TIntermediateGenericParameter, TParent, TIntermediateParent> parameter, IntermediateNameRequestDetails context) where TGenericParameter : Abstract.IGenericParameter <TGenericParameter, TParent> where TIntermediateGenericParameter : TGenericParameter, IIntermediateGenericParameter <TGenericParameter, TIntermediateGenericParameter, TParent, TIntermediateParent> where TParent : Abstract.IGenericParamParent <TGenericParameter, TParent> where TIntermediateParent : TParent, IIntermediateGenericParameterParent <TGenericParameter, TIntermediateGenericParameter, TParent, TIntermediateParent> { return(VisitIntermediateType(@parameter, context)); }
void IIntermediateTypeVisitor.Visit <TGenericParameter, TIntermediateGenericParameter, TParent, TIntermediateParent>(IIntermediateGenericParameter <TGenericParameter, TIntermediateGenericParameter, TParent, TIntermediateParent> intermediateType) { this.Translate(intermediateType); }
public TestLinkerResult Visit <TGenericParameter, TIntermediateGenericParameter, TParent, TIntermediateParent>(IIntermediateGenericParameter <TGenericParameter, TIntermediateGenericParameter, TParent, TIntermediateParent> parameter, ICompilationContext context) where TGenericParameter : IGenericParameter <TGenericParameter, TParent> where TIntermediateGenericParameter : TGenericParameter, IIntermediateGenericParameter <TGenericParameter, TIntermediateGenericParameter, TParent, TIntermediateParent> where TParent : IGenericParamParent <TGenericParameter, TParent> where TIntermediateParent : TParent, IIntermediateGenericParameterParent <TGenericParameter, TIntermediateGenericParameter, TParent, TIntermediateParent> { throw new NotImplementedException(); }
AddIntermediateMethodByDelegate < TSignatureParameter, TIntermediateSignatureParameter, TSignature, TIntermediateSignature, TSignatureParent, TIntermediateSignatureParent> ( string name, IDelegateType signature, Func <string, TIntermediateSignature> addHelper, Func <TypedName, TypedNameSeries, TIntermediateSignature> addHelperAlt ) where TSignatureParameter : IMethodSignatureParameterMember <TSignatureParameter, TSignature, TSignatureParent> where TIntermediateSignatureParameter : IIntermediateMethodSignatureParameterMember <TSignatureParameter, TIntermediateSignatureParameter, TSignature, TIntermediateSignature, TSignatureParent, TIntermediateSignatureParent>, TSignatureParameter where TSignature : IMethodSignatureMember <TSignatureParameter, TSignature, TSignatureParent> where TIntermediateSignature : IIntermediateMethodSignatureMember <TSignatureParameter, TIntermediateSignatureParameter, TSignature, TIntermediateSignature, TSignatureParent, TIntermediateSignatureParent>, TSignature where TSignatureParent : ISignatureParent <IGeneralGenericSignatureMemberUniqueIdentifier, TSignature, TSignatureParameter, TSignatureParent> where TIntermediateSignatureParent : IIntermediateSignatureParent <IGeneralGenericSignatureMemberUniqueIdentifier, TSignature, TIntermediateSignature, TSignatureParameter, TIntermediateSignatureParameter, TSignatureParent, TIntermediateSignatureParent>, TSignatureParent { /* * * If the method being added wants to mirror the declaration * of the delegate, and the delegate is a generic type with * no specific type references added: mirror the definition * down to the generic parameters. * */ if (signature.IsGenericConstruct && signature.IsGenericDefinition && signature.Parent == null) { var method = addHelper(name); var genericParameters = new IIntermediateGenericParameter[signature.TypeParameters.Count]; var originalGenericParameters = signature.TypeParameters.Values.ToArray(); for (int i = 0; i < originalGenericParameters.Length; i++) { genericParameters[i] = method.TypeParameters.Add(originalGenericParameters[i].Name); } var genericParameterCollection = new LockedTypeCollection(genericParameters); for (int i = 0; i < originalGenericParameters.Length; i++) { var originalGenericParameter = originalGenericParameters[i]; var currentGenericParameter = genericParameters[i]; foreach (var constraint in originalGenericParameter.Constraints) { currentGenericParameter.Constraints.Add(constraint.Disambiguify(genericParameterCollection, null, TypeParameterSources.Type)); } currentGenericParameter.SpecialConstraint = originalGenericParameter.SpecialConstraint; } method.Parameters.AddRange((from p in signature.Parameters.Values let paramType = p.ParameterType.Disambiguify(genericParameterCollection, null, TypeParameterSources.Type) select new TypedName(p.Name, paramType)).ToArray()); method.ReturnType = signature.ReturnType.Disambiguify(genericParameterCollection, null, TypeParameterSources.Type); return(method); } /* * * Otherwise, just copy the types defined in the parameters. * */ else if (!(signature.IsGenericConstruct && signature.IsGenericDefinition)) { return(addHelperAlt(new TypedName(name, signature.ReturnType), new TypedNameSeries((from p in signature.Parameters.Values select new TypedName(p.Name, p.ParameterType)).ToArray()))); } else { throw new NotSupportedException("Generic type provided must be a top-level type."); } }
public string Visit <TGenericParameter, TIntermediateGenericParameter, TParent, TIntermediateParent>(IIntermediateGenericParameter <TGenericParameter, TIntermediateGenericParameter, TParent, TIntermediateParent> parameter, DefaultAssemblyFilenameVisitorContext context) where TGenericParameter : Abstract.IGenericParameter <TGenericParameter, TParent> where TIntermediateGenericParameter : TGenericParameter, IIntermediateGenericParameter <TGenericParameter, TIntermediateGenericParameter, TParent, TIntermediateParent> where TParent : Abstract.IGenericParamParent <TGenericParameter, TParent> where TIntermediateParent : TParent, IIntermediateGenericParameterParent <TGenericParameter, TIntermediateGenericParameter, TParent, TIntermediateParent> { return(context.CurrentResult); }
/// <summary> /// Creates a new <see cref="GenericParameterMovedEventArgs"/> /// instance with the <paramref name="from"/>, <paramref name="to"/> and /// <paramref name="parameter"/> /// </summary> /// <param name="from">The <see cref="Int32"/> of where the <paramref name="parameter"/> /// was.</param> /// <param name="to">The <see cref="Int32"/> of where the <paramref name="parameter"/> /// went to.</param> /// <param name="parameter">The <see cref="IIntermediateGenericParameter"/> /// that was moved.</param> public GenericParameterMovedEventArgs(int from, int to, IIntermediateGenericParameter parameter) { this.Parameter = parameter; this.From = from; this.To = to; }
public abstract void Translate <TGenericParameter, TIntermediateGenericParameter, TParent, TIntermediateParent>(IIntermediateGenericParameter <TGenericParameter, TIntermediateGenericParameter, TParent, TIntermediateParent> intermediateType) where TGenericParameter : IGenericParameter <TGenericParameter, TParent> where TIntermediateGenericParameter : TGenericParameter, IIntermediateGenericParameter <TGenericParameter, TIntermediateGenericParameter, TParent, TIntermediateParent> where TParent : IGenericParamParent <TGenericParameter, TParent> where TIntermediateParent : TParent, IIntermediateGenericParameterParent <TGenericParameter, TIntermediateGenericParameter, TParent, TIntermediateParent>;
public CSharpAssemblyFileInfo Visit <TGenericParameter, TIntermediateGenericParameter, TParent, TIntermediateParent>(IIntermediateGenericParameter <TGenericParameter, TIntermediateGenericParameter, TParent, TIntermediateParent> parameter, CSharpAssemblyFileContext context) where TGenericParameter : Abstract.IGenericParameter <TGenericParameter, TParent> where TIntermediateGenericParameter : TGenericParameter, IIntermediateGenericParameter <TGenericParameter, TIntermediateGenericParameter, TParent, TIntermediateParent> where TParent : Abstract.IGenericParamParent <TGenericParameter, TParent> where TIntermediateParent : TParent, IIntermediateGenericParameterParent <TGenericParameter, TIntermediateGenericParameter, TParent, TIntermediateParent> { return(context.CurrentResult); }
public IGenericParameterUniqueIdentifier GetIdentifier(IIntermediateGenericParameter member) { throw new NotSupportedException(); }
public TransformationKind Visit <TGenericParameter, TIntermediateGenericParameter, TParent, TIntermediateParent>(IIntermediateGenericParameter <TGenericParameter, TIntermediateGenericParameter, TParent, TIntermediateParent> parameter, ITransformationContext context) where TGenericParameter : IGenericParameter <TGenericParameter, TParent> where TIntermediateGenericParameter : TGenericParameter, IIntermediateGenericParameter <TGenericParameter, TIntermediateGenericParameter, TParent, TIntermediateParent> where TParent : IGenericParamParent <TGenericParameter, TParent> where TIntermediateParent : TParent, IIntermediateGenericParameterParent <TGenericParameter, TIntermediateGenericParameter, TParent, TIntermediateParent> { throw new NotImplementedException(); }